Test markdown pour patrick

This commit is contained in:
2022-05-14 17:17:02 +02:00
parent a82b688e92
commit ceb6d4f0ff
7 changed files with 253 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
### CRÉER UNE VERSION DE NEXTCLOUD POUR TESTER LUPGRADE (NEXTCLOUD2)
1. créer dans [FREENOM](http://www.freenom.com/fr/index.html) un DNS “nextcloud2” puis reporter ces DNS dans les fichiers "certs-faivre.sh" et "ml.faivre-all.conf" de damia :
```
sudo nano /root/bin/certs-faivre.sh
sudo nano /etc/apache2/sites-available/ml.faivre-all.conf
```
2. forcer le renouvellement des certificats :
```
sudo /root/bin/certs-faivre.sh -c
```
3. copier le répertoire “nextcloud” en “nextcloud2”:
```
sudo rsync -aHixv /home/www/ml.faivre/nextcloud/ /home/www/ml.faivre/nextcloud2
```
4. créer une nouvelle base :
```
mysql -u root -p
CREATE DATABASE IF NOT EXISTS `nextcloud2` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
```
5. puis créer un nouvel utilisateur et lui donner tous les privilèges sur cette nouvelle base (mot de passe à saisir en fin de la 1ère commande):
```
GRANT ALL ON nextcloud2.* TO 'nextcloud2'@'localhost' IDENTIFIED BY 'mon_mot_de_passe';
FLUSH PRIVILEGES;
```
6. quitter MYSQL
```
exit
```
7. copier la base nextcloud.sql.gz en nextcloud2 (patience, ça peut durer un bon moment ≈ 25 mn):
```
cd /var/lib/mysql/
zcat nextcloud.sql.gz | sudo mysql nextcloud2
```
8. modifier le fichier “config.php” de nextcloud2 en remplaçant “nextcloud” par “nextcloud2”
```
sudo nano /home/www/ml.faivre/nextcloud2/config/config.php
```
9. ajouter une tâche cron pour nextcloud2 (en copiant celle existant) :
```
sudo crontab -u www-data -e
```
---
### RESTAURATION DE NEXTCLOUD ET DE SA BASE :
```
sudo rsync -aHixv /mnt/backup1/damia-mountpoint/daily-01/www/ml.faivre/nextcloud/ /home/www/ml.faivre/nextcloud
gunzip < /mnt/backup1/damia-mountpoint/daily-01/mysql/nextcloud.sql.gz | mysql -u root -p"MY-PASSWORD" nextcloud
```