04-03-2022

This commit is contained in:
2022-03-04 17:56:50 +01:00
parent e6fc2251ec
commit 5b45dc0863
70 changed files with 3189 additions and 673 deletions

View File

@@ -2,23 +2,23 @@
#### Installer WordPress:
### Installer WordPress:
Téléchargement:
####
```bash
$ cd /volume1/web
$ wget https://wordpress.org/latest.tar.gz
$ tar -xzvf latest.tar.gz
```bash title="Télécharger Wordpress"
cd /volume1/web
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
```
Régler les permissions:
```bash
$ sudo chown -R http:http wordpress
$ sudo chmod -R 755 /volume1/web/wordpress/
$ sudo find /volume1/web/wordpress/ -type d -exec chmod 755 {} \;
$ sudo find /volume1/web/wordpress/ -type f -exec chmod 644 {} \;
```bash title="Régler les permissions"
sudo chown -R http:http wordpress
sudo chmod -R 755 /volume1/web/wordpress/
sudo find /volume1/web/wordpress/ -type d -exec chmod 755 {} \;
sudo find /volume1/web/wordpress/ -type f -exec chmod 644 {} \;
```
@@ -41,11 +41,11 @@ DSM ajustera les permissions pour les fichiers WordPress.
#### Créer une base MariaDB:
```bash
$ sudo mysql -u root -p
```bash title="Se connecter à MySQL"
sudo mysql -u root -p
```
```mariadb
```mysql title="Créer une base"
# Supprimer une ancienne base:
# DROP DATABASE wordpress;
@@ -70,9 +70,9 @@ MariaDB > GRANT ALL PRIVILEGES ON wordpress . * TO 'adm_wp'@'localhost';
MariaDB > FLUSH PRIVILEGES;
```
Vérifier la base créee:
```mariadb
```mariadb title="Vérifier la base créée"
MariaDB > SHOW DATABASES;
+--------------------+
| Database |
@@ -121,7 +121,7 @@ Aller à https://clicclac.synology.me/wordpress dans Firefox.
Identification du dossier *réceptacle*:
```bash
$ sudo nano /usr/local/etc/nginx/sites-enabled/server.webstation-vhost.conf
sudo nano /usr/local/etc/nginx/sites-enabled/server.webstation-vhost.conf
```
```nginx
@@ -138,7 +138,7 @@ Création du fichier:
cd /usr/local/etc/nginx/conf.d/2bbf5ec3-353e-48c2-8564-f5ad432bb05e/
# Créer un fichier de configuration nginx pour gérer les permaliens
$ sudo nano user.conf.wordpress-permalink
sudo nano user.conf.wordpress-permalink
```
```nginx
@@ -147,12 +147,14 @@ location /{
}
```
Tester la configuration et recharger nginx:
```bash
$ sudo nginx -t
$ sudo systemctl reload nginx
```bash title="Tester la configuration"
sudo nginx -t
```
```bash title="Recharger nginx"
sudo systemctl reload nginx
```