meta données pour cette page

Installer Nextcloud

Install

On créér la base et le compte utilisateur de nextcloud:

su - postgres psql
CREATE USER nextcloud WITH PASSWORD 'your_password';
CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UNICODE';
ALTER DATABASE nextcloud OWNER TO nextcloud;
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;
cd /var/www/
wget https://download.nextcloud.com/server/releases/nextcloud-22.2.3.zip
unzip
chown www-data nextcloud/ -R

Il reste plus qu'a configurer les services PHP et Nginx

Commandes CLI

php occ user:resetpassword admin

Upgrade

Procédure pour mettre à jour manuellement l'instance. Admettons que l'on mette à jour de la version 21 → 22 :

# su - postgres
$ pg_dump nextcloud > nextcloud-26-12-2021-v21.sql
$ exit

# cd /var/www/
# mv -i nextcloud nextcloud.bak-v21
# wget https://download.nextcloud.com/server/releases/nextcloud-22.2.3.zip
# unzip nextcloud-22.2.3.zip

# cp -i nextcloud.bak-v21/config/config.php nextcloud/config/
# cp -r nextcloud.bak-v21/data/ nextcloud/

# ls -1 nextcloud/apps/ > /tmp/out
# ls -1 nextcloud.bak-v21/apps/ > /tmp/out2
# diff -u /tmp/out*
# cp -ir nextcloud.bak-v21/apps/audioplayer/ nextcloud.bak-v21/apps/calendar/ nextcloud.bak-v21/apps/contacts nextcloud.bak-v21/apps/deck/ nextcloud.bak-v21/apps/files_markdown/ nextcloud.bak-v21/apps/files_mindmap/ nextcloud.bak-v21/apps/keeweb/ nextcloud/apps/

# chown www-data: /var/www/nextcloud/ -R
# cd /var/www/nextcloud/
# sudo -u www-data php occ upgrade

Modules