Last active
July 8, 2021 10:42
-
-
Save michaelkarrer81/ba63b116cc9200194162dcde940c8016 to your computer and use it in GitHub Desktop.
[Nextcloud] Nextcloud Administration and Setup #nextcloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Migrate files between users | |
# https://docs.nextcloud.com/server/12/admin_manual/configuration_files/file_sharing_configuration.html#transferring-files-to-another-user | |
# Transfers Shars and Links | |
occ files:transfer-ownership user1 user2 | |
# -------------------------- | |
# Onlyoffice Update Prozess: | |
# -------------------------- | |
docker ps -a | |
docker stop 3f14ec4587d8 | |
docker rm 3f14ec4587d8 | |
docker pull onlyoffice/documentserver | |
docker run --name=ONLYOFFICEDOCKER -i -t -d -p 8443:80 -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data -v /var/log/onlyoffice:/var/log/onlyoffice -e JWT_ENABLED='true' -e JWT_SECRET='...' --restart=always onlyoffice/documentserver | |
docker logs <Container-ID> | |
# ------------------------- | |
# Nextcloud Update Prozess: | |
# ------------------------- | |
# 1.) Einloggen mit nc_admin (pw in saltstack nextcloud_map.jinja) | |
# 2.) Einstellungen > Allg. - dann hier den Updater starten | |
# (Info: ginge auch über Kommandozeile) | |
# 3.) Nach Update über Web Client Aktualisirung Starten auf auf der command line ./occ upgrade | |
# 4.) Überprüfen ob es zu irgend welchen Warnungen gekommen ist (z.B.: weil PHP nicht mehr neu genug) | |
# Gegebennenfalls Update-Prozess wiederholen falls noch weitere Updates zur Verfügung stehen! | |
# (Nur wenn es keine Fehler oder Warungnen in Einstellungen > Übersicht gibt!) | |
# Optionale Schritte nach dem Upgrade: | |
# ------------------------------------ | |
sudo -u www-data php occ maintenance:mode --on | |
sudo -u www-data php occ db:add-missing-indices | |
sudo -u www-data php occ db:add-missing-primary-keys | |
sudo -u www-data php occ db:convert-filecache-bigint | |
sudo -u www-data php occ maintenance:mode --off | |
# Was tun wenn es einen Fehler gibt beim Upgrade und NC Wartungsmodus hängen bleibt: | |
# ---------------------------------------------------------------------------------- | |
# Upgrade auf der Kommandozeile neu anstarten auf der Command Line: | |
sudo -u www-data php occ upgrade | |
# Wenn das upgrade geklappt hat: | |
sudo -u www-data php occ maintenance:mode --off | |
# Was tun wenn ein addon nicht aktualisiert werden kann und dadurch das Upgrade nicht geht: | |
# ----------------------------------------------------------------------------------------- | |
# Addon per command line deaktivieren oder deinstallieren | |
# Upgrade erneut durchführen | |
############## | |
PHP8 for Nextcloud 21 | |
------- | |
https://www.c-rieger.de/nextcloud-21-mit-php-8-0-nachruesten/ | |
------- | |
Creating config file /etc/php/8.0/cli/php.ini with new version | |
php8.0-redis (5.3.4+4.3.0-1+ubuntu18.04.1+deb.sury.org+1) wird eingerichtet ... | |
php8.0-gd (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) wird eingerichtet ... | |
Creating config file /etc/php/8.0/mods-available/gd.ini with new version | |
php-apcu-bc (1.0.5-13+ubuntu18.04.1+deb.sury.org+1) wird eingerichtet ... | |
php8.0-fpm (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) wird eingerichtet ... | |
Creating config file /etc/php/8.0/fpm/php.ini with new version | |
NOTICE: Not enabling PHP 8.0 FPM by default. | |
NOTICE: To enable PHP 8.0 FPM in Apache2 do: | |
NOTICE: a2enmod proxy_fcgi setenvif | |
NOTICE: a2enconf php8.0-fpm | |
NOTICE: You are seeing this message because you have apache2 package installed. | |
Created symlink /etc/systemd/system/multi-user.target.wants/php8.0-fpm.service → /lib/systemd/system/php8.0-fpm.service. | |
Trigger für libc-bin (2.27-3ubuntu1.4) werden verarbeitet ... | |
Trigger für systemd (237-3ubuntu10.48) werden verarbeitet ... | |
Trigger für man-db (2.8.3-2ubuntu0.1) werden verarbeitet ... | |
Trigger für fontconfig (2.12.6-0ubuntu2) werden verarbeitet ... | |
Trigger für ureadahead (0.100.0-21) werden verarbeitet ... | |
Trigger für php8.0-cli (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) werden verarbeitet ... | |
Trigger für php8.0-fpm (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) werden verarbeitet ... | |
NOTICE: Not enabling PHP 8.0 FPM by default. | |
NOTICE: To enable PHP 8.0 FPM in Apache2 do: | |
NOTICE: a2enmod proxy_fcgi setenvif | |
NOTICE: a2enconf php8.0-fpm | |
NOTICE: You are seeing this message because you have apache2 package installed. | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;env\[HOSTNAME\] = /env[HOSTNAME] = /" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;env\[TMP\] = /env[TMP] = /" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;env\[TMPDIR\] = /env[TMPDIR] = /" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;env\[TEMP\] = /env[TEMP] = /" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;env\[PATH\] = /env[PATH] = /" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/pm.max_children =.*/pm.max_children = 120/" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/pm.start_servers =.*/pm.start_servers = 20/" /etc/php/8.0/fpm/pool.d/www.conf | |
uests =.*/pm.max_requests = 1000/" /etc/php/8.0/fpm/pool.d/www.conf | |
sed -i "s/allow_url_fopen =.*/allow_url_fopen = 1/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/output_buffering =.*/output_buffering = 'Off'/" /etc/php/8.0/cli/php.ini | |
sed -i "s/max_execution_time =.*/max_execution_time = 3600/" /etc/php/8.0/cli/php.ini | |
sed -i "s/max_input_time =.*/max_input_time = 3600/" /etc/php/8.0/cli/php.ini | |
sed -i "s/post_max_size =.*/post_max_size = 10240M/" /etc/php/8.0/cli/php.ini | |
sed -i "s/upload_max_filesize =.*/upload_max_filesize = 10240M/" /etc/php/8.0/cli/php.ini | |
sed -i "s/;date.timezone.*/date.timezone = Europe\/\Berlin/" /etc/php/8.0/cli/php.ini | |
sed -i "s/memory_limit = 128M/memory_limit = 2048M/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/output_buffering =.*/output_buffering = 'Off'/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/max_execution_time =.*/max_execution_time = 3600/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/max_input_time =.*/max_input_time = 3600/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/post_max_size =.*/post_max_size = 10240M/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/upload_max_filesize =.*/upload_max_filesize = 10240M/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;date.timezone.*/date.timezone = Europe\/\Berlin/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;session.cookie_secure.*/session.cookie_secure = True/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;opcache.enable=.*/opcache.enable=1/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;opcache.enable_cli=.*/opcache.enable_cli=1/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;opcache.memory_consumption=.*/opcache.memory_consumptroot@ubuntu1804:/var/www/nextcloud/config# sed -i "s/pm.min_spare_servers =.*/pm.min_spare_servers = 10/" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/pm.max_spare_servers =.*/pm.max_spare_servers = 30/" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;pm.max_requests =.*/pm.max_requests = 1000/" /etc/php/8.0/fpm/pool.d/www.conf | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/allow_url_fopen =.*/allow_url_fopen = 1/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/output_buffering =.*/output_buffering = 'Off'/" /etc/php/8.0/cli/php.ini | |
ion=128/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;opcache.interned_strings_buffer=.*/opcache.interned_strings_buffer=8/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;opcache.max_accelerated_files=.*/opcache.max_accelerated_files=10000/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;opcache.revalidate_freq=.*/opcache.revalidate_freq=1/" /etc/php/8.0/fpm/php.ini | |
sed -i "s/;opcache.save_comments=.*/opcache.save_comments=1/" /etc/php/8.0/fpm/php.ini | |
sed -i '$aapc.enable_cli=1' /etc/php/8.0/mods-available/apcu.ini | |
sed -i "s/rights=\"none\" pattern=\"PS\"/rights=\"read|write\" pattern=\"PS\"/" /etc/ImageMagick-6/policy.xml | |
sed -i "s/rights=\"none\" pattern=\"EPS\"/rights=\"read|write\" pattern=\"EPS\"/" /etc/ImageMagick-6/policy.xml | |
sed -i "s/rights=\"none\" pattern=\"PDF\"/rights=\"read|write\" pattern=\"PDF\"/" /etc/ImageMagick-6/policy.xml | |
sed -i "s/rights=\"none\" pattern=\"XPS\"/rights=\"read|write\" pattern=\"XPS\"/" /etc/ImageMagick-6/policy.xmlroot@ubuntu1804:/var/www/nextcloud/config# sed -i "s/max_execution_time =.*/max_execution_time = 3600/" /etc/php/8.0/cli/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/max_input_time =.*/max_input_time = 3600/" /etc/php/8.0/cli/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/post_max_size =.*/post_max_size = 10240M/" /etc/php/8.0/cli/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/upload_max_filesize =.*/upload_max_filesize = 10240M/" /etc/php/8.0/cli/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;date.timezone.*/date.timezone = Europe\/\Berlin/" /etc/php/8.0/cli/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/memory_limit = 128M/memory_limit = 2048M/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/output_buffering =.*/output_buffering = 'Off'/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/max_execution_time =.*/max_execution_time = 3600/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/max_input_time =.*/max_input_time = 3600/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/post_max_size =.*/post_max_size = 10240M/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/upload_max_filesize =.*/upload_max_filesize = 10240M/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;date.timezone.*/date.timezone = Europe\/\Berlin/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;session.cookie_secure.*/session.cookie_secure = True/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;opcache.enable=.*/opcache.enable=1/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;opcache.enable_cli=.*/opcache.enable_cli=1/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;opcache.memory_consumption=.*/opcache.memory_consumption=128/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;opcache.interned_strings_buffer=.*/opcache.interned_strings_buffer=8/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;opcache.max_accelerated_files=.*/opcache.max_accelerated_files=10000/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;opcache.revalidate_freq=.*/opcache.revalidate_freq=1/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/;opcache.save_comments=.*/opcache.save_comments=1/" /etc/php/8.0/fpm/php.ini | |
root@ubuntu1804:/var/www/nextcloud/config# | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i '$aapc.enable_cli=1' /etc/php/8.0/mods-available/apcu.ini | |
root@ubuntu1804:/var/www/nextcloud/config# | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/rights=\"none\" pattern=\"PS\"/rights=\"read|write\" pattern=\"PS\"/" /etc/ImageMagick-6/policy.xml | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/rights=\"none\" pattern=\"EPS\"/rights=\"read|write\" pattern=\"EPS\"/" /etc/ImageMagick-6/policy.xml | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/rights=\"none\" pattern=\"PDF\"/rights=\"read|write\" pattern=\"PDF\"/" /etc/ImageMagick-6/policy.xml | |
root@ubuntu1804:/var/www/nextcloud/config# sed -i "s/rights=\"none\" pattern=\"XPS\"/rights=\"read|write\" pattern=\"XPS\"/" /etc/ImageMagick-6/policy.xml | |
root@ubuntu1804:/etc/apache2# apt search php8.0-p | |
Sortierung... Fertig | |
Volltextsuche... Fertig | |
php8.0-pcov/bionic 1.0.8-1+ubuntu18.04.1+deb.sury.org+1 amd64 | |
Code coverage driver | |
php8.0-pgsql/bionic 8.0.8-1+ubuntu18.04.1+deb.sury.org+1 amd64 | |
PostgreSQL module for PHP | |
php8.0-phpdbg/bionic 8.0.8-1+ubuntu18.04.1+deb.sury.org+1 amd64 | |
server-side, HTML-embedded scripting language (PHPDBG binary) | |
php8.0-protobuf/bionic 3.15.6+3.12.4-1+ubuntu18.04.1+deb.sury.org+1 amd64 | |
Protocol buffers bindings for PHP | |
php8.0-pspell/bionic 8.0.8-1+ubuntu18.04.1+deb.sury.org+1 amd64 | |
pspell module for PHP | |
php8.0-psr/bionic 1.0.1-6+ubuntu18.04.1+deb.sury.org+1 amd64 | |
PSR interfaces for PHP | |
root@ubuntu1804:/etc/apache2# apt install php8.0-pgsql | |
Paketlisten werden gelesen... Fertig | |
Abhängigkeitsbaum wird aufgebaut. | |
Statusinformationen werden eingelesen.... Fertig | |
Die folgenden NEUEN Pakete werden installiert: | |
php8.0-pgsql | |
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. | |
Es müssen noch 0 B von 55,8 kB an Archiven heruntergeladen werden. | |
Nach dieser Operation werden 217 kB Plattenplatz zusätzlich benutzt. | |
Vormals nicht ausgewähltes Paket php8.0-pgsql wird gewählt. | |
(Lese Datenbank ... 146638 Dateien und Verzeichnisse sind derzeit installiert.) | |
Vorbereitung zum Entpacken von .../php8.0-pgsql_8.0.8-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ... | |
Entpacken von php8.0-pgsql (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) ... | |
php8.0-pgsql (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) wird eingerichtet ... | |
Creating config file /etc/php/8.0/mods-available/pgsql.ini with new version | |
Creating config file /etc/php/8.0/mods-available/pdo_pgsql.ini with new version | |
Trigger für php8.0-fpm (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) werden verarbeitet ... | |
NOTICE: Not enabling PHP 8.0 FPM by default. | |
NOTICE: To enable PHP 8.0 FPM in Apache2 do: | |
NOTICE: a2enmod proxy_fcgi setenvif | |
NOTICE: a2enconf php8.0-fpm | |
NOTICE: You are seeing this message because you have apache2 package installed. | |
Trigger für php8.0-cli (8.0.8-1+ubuntu18.04.1+deb.sury.org+1) werden verarbeitet ... | |
root@ubuntu1804:/etc/apache2# a2enmod proxy_fcgi setenvif | |
Considering dependency proxy for proxy_fcgi: | |
Module proxy already enabled | |
Module proxy_fcgi already enabled | |
Module setenvif already enabled | |
root@ubuntu1804:/etc/apache2# a2enconf php8.0-fpm | |
Conf php8.0-fpm already enabled | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment