sysadmin
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
sysadmin [2020/12/08 12:36] – [Administration système] lpieri | sysadmin [2020/12/08 15:05] – lpieri | ||
---|---|---|---|
Ligne 29: | Ligne 29: | ||
</ | </ | ||
- | Si demandé, | + | Si demandé, |
- | + | ||
- | ==== Nginx ==== | + | |
- | + | ||
- | < | + | |
- | apt install nginx | + | |
- | </ | + | |
==== MySQL ==== | ==== MySQL ==== | ||
Ligne 76: | Ligne 70: | ||
mysql> exit | mysql> exit | ||
</ | </ | ||
+ | |||
+ | ==== PHP ==== | ||
+ | |||
+ | < | ||
+ | apt install php-fpm php-mysql php-ctype php-iconv php-intl php-gd php-xml php-zip php-mbstring | ||
+ | </ | ||
+ | |||
+ | === Composer === | ||
+ | |||
+ | < | ||
+ | php -r " | ||
+ | php -r "if (hash_file(' | ||
+ | php composer-setup.php && \ | ||
+ | php -r " | ||
+ | mv composer.phar / | ||
+ | composer -v | ||
+ | </ | ||
+ | |||
+ | ==== Symfony ==== | ||
+ | |||
+ | < | ||
+ | wget https:// | ||
+ | mv ~/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | cp .env .env.local | ||
+ | </ | ||
+ | |||
+ | > Remplir .env.local avec les valeurs de productions | ||
+ | |||
+ | < | ||
+ | symfony composer install --no-dev --optimize-autoloader | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | symfony check: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | symfony console doctrine: | ||
+ | symfony console doctrine: | ||
+ | symfony console doctrine: | ||
+ | </ | ||
+ | |||
+ | ==== Nginx ==== | ||
+ | |||
+ | < | ||
+ | apt install nginx | ||
+ | </ | ||
+ | |||
+ | === Virtual host === | ||
+ | |||
+ | < | ||
+ | vim / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | server { | ||
+ | server_name mybusiness.betterb.fr; | ||
+ | root / | ||
+ | |||
+ | location / { | ||
+ | try_files $uri / | ||
+ | } | ||
+ | |||
+ | location ~ ^/ | ||
+ | fastcgi_pass unix:/ | ||
+ | fastcgi_split_path_info ^(.+\.php)(/ | ||
+ | include fastcgi_params; | ||
+ | fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
+ | fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
+ | internal; | ||
+ | } | ||
+ | |||
+ | location ~ \.php$ { | ||
+ | return 404; | ||
+ | } | ||
+ | |||
+ | error_log / | ||
+ | access_log / | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | unlink / | ||
+ | ln -s / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | nginx -t | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | systemctl reload nginx | ||
+ | </ | ||
+ | |||
===== Ajouter un nouvel utilisateur sur un serveur ===== | ===== Ajouter un nouvel utilisateur sur un serveur ===== | ||