nextcloud_dans_lxc_-_2
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édente | ||
| nextcloud_dans_lxc_-_2 [2019/10/29 08:49] – [Nginx] simon | nextcloud_dans_lxc_-_2 [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== Nextcloud dans lxc - 2 ====== | ||
| - | <WRAP center round important 60%> | ||
| - | 29/10/2019 : Essais d'une installation complète en suivant le tutoriel [[https:// | ||
| - | </ | ||
| - | ===== lxc ===== | ||
| - | <code bash> | ||
| - | lxc-create -t download -n nextcloud2 -- --dist debian --release buster --arch amd64 | ||
| - | </ | ||
| - | |||
| - | On configure ce qu'il faut pour avoir une IP statique (voir [[lxc]]). | ||
| - | |||
| - | ===== prérequis ===== | ||
| - | <code bash> | ||
| - | # lxc-attach nextcloud2 | ||
| - | |||
| - | root@nextcloud3:/# | ||
| - | |||
| - | root@nextcloud3:/# | ||
| - | </ | ||
| - | |||
| - | ===== Dépôts pour Nginx, PHP et MariaDB ===== | ||
| - | ==== Nginx ==== | ||
| - | <code bash> | ||
| - | # cd / | ||
| - | |||
| - | # echo "deb [arch=amd64] http:// | ||
| - | |||
| - | # curl -fsSL https:// | ||
| - | </ | ||
| - | |||
| - | ==== PHP ==== | ||
| - | <code bash> | ||
| - | # cd / | ||
| - | |||
| - | # echo "deb [arch=amd64] https:// | ||
| - | |||
| - | # root@nextcloud3:/ | ||
| - | OK | ||
| - | </ | ||
| - | |||
| - | ==== MariaDB ==== | ||
| - | <code bash> | ||
| - | # cd / | ||
| - | |||
| - | # echo "deb [arch=amd64] http:// | ||
| - | |||
| - | # apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 | ||
| - | Executing: / | ||
| - | gpg: clef F1656F24C74CD1D8 : | ||
| - | gpg: | ||
| - | gpg: | ||
| - | </ | ||
| - | |||
| - | ==== Upgrade ==== | ||
| - | |||
| - | On met à jour : | ||
| - | <code bash> | ||
| - | # apt update && apt upgrade -y | ||
| - | |||
| - | # make-ssl-cert generate-default-snakeoil -y | ||
| - | |||
| - | # apt remove nginx nginx-extras nginx-common nginx-full -y --allow-change-held-packages | ||
| - | |||
| - | # apt autoremove | ||
| - | </ | ||
| - | |||
| - | ===== Installations et configurations ===== | ||
| - | ==== Nginx ==== | ||
| - | <code bash> | ||
| - | # apt install nginx -y | ||
| - | |||
| - | # nginx -V | ||
| - | nginx version: nginx/ | ||
| - | |||
| - | # systemctl enable nginx.service | ||
| - | |||
| - | # mv / | ||
| - | |||
| - | root@nextcloud3:/ | ||
| - | (...) | ||
| - | 27: eth0@if28: < | ||
| - | (...) | ||
| - | inet 10.0.3.162/ | ||
| - | (...) | ||
| - | |||
| - | root@nextcloud3:/ | ||
| - | |||
| - | root@nextcloud3:/ | ||
| - | user www-data; | ||
| - | worker_processes auto; | ||
| - | pid / | ||
| - | |||
| - | events { | ||
| - | worker_connections 1024; | ||
| - | multi_accept on; | ||
| - | use epoll; | ||
| - | } | ||
| - | |||
| - | http { | ||
| - | server_names_hash_bucket_size 64; | ||
| - | upstream php-handler { | ||
| - | server unix:/ | ||
| - | } | ||
| - | |||
| - | set_real_ip_from 127.0.0.1; | ||
| - | set_real_ip_from 10.0.3.0/ | ||
| - | real_ip_header X-Forwarded-For; | ||
| - | real_ip_recursive on; | ||
| - | include / | ||
| - | #include / | ||
| - | #include / | ||
| - | #include / | ||
| - | #include / | ||
| - | default_type application/ | ||
| - | access_log / | ||
| - | error_log / | ||
| - | sendfile on; | ||
| - | send_timeout 3600; | ||
| - | tcp_nopush on; | ||
| - | tcp_nodelay on; | ||
| - | open_file_cache max=500 inactive=10m; | ||
| - | open_file_cache_errors on; | ||
| - | keepalive_timeout 65; | ||
| - | reset_timedout_connection on; | ||
| - | server_tokens off; | ||
| - | resolver 10.0.3.162 valid=30s; | ||
| - | #resolver 127.0.0.53 valid=30s; is recommended but reuqires a valid resolver configuration | ||
| - | resolver_timeout 5s; | ||
| - | include / | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | On teste la config et on redémarre nginx : | ||
| - | <code bash> | ||
| - | # nginx -t && service nginx restart | ||
| - | </ | ||
| - | |||
| - | On crée le dossier nextcloud et on lui met les bons droits : | ||
| - | <code bash> | ||
| - | # mkdir -p / | ||
| - | |||
| - | # chown -R www-data: | ||
| - | </ | ||
nextcloud_dans_lxc_-_2.1572338974.txt.gz · Dernière modification : (modification externe)
