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 09:14] – [MariaDB] 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: | ||
- | </ | ||
- | |||
- | ==== PHP ==== | ||
- | <code bash> | ||
- | # apt update && apt install php7.3-fpm php7.3-gd php7.3-mysql php7.3-curl php7.3-xml php7.3-zip php7.3-intl php7.3-mbstring php7.3-json php7.3-bz2 php7.3-ldap php-apcu imagemagick php-imagick php-smbclient -y | ||
- | </ | ||
- | |||
- | <WRAP center round important 60%> | ||
- | Je ne mets pas de "#" | ||
- | </ | ||
- | |||
- | |||
- | Backup des configurations : | ||
- | <code bash> | ||
- | cp / | ||
- | cp / | ||
- | cp / | ||
- | cp / | ||
- | cp / | ||
- | </ | ||
- | |||
- | <code bash> | ||
- | cp / | ||
- | cp / | ||
- | cp / | ||
- | cp / | ||
- | cp / | ||
- | |||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | |||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | |||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | |||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | sed -i " | ||
- | </ | ||
- | |||
- | <code bash> | ||
- | # service php7.3-fpm restart | ||
- | # service nginx restart | ||
- | </ | ||
- | |||
- | ==== MariaDB ==== | ||
- | <code bash> | ||
- | # apt update && apt install mariadb-server -y | ||
- | |||
- | # mysql --version | ||
- | mysql Ver 15.1 Distrib 10.4.8-MariaDB, | ||
- | </ | ||
- | |||
- | Le service ne démarre pas : | ||
- | <code bash> | ||
- | root@nextcloud3:/ | ||
- | ● mariadb.service - MariaDB 10.4.8 database server | ||
- | | ||
- | Drop-In: / | ||
- | | ||
- | | ||
- | Docs: man: | ||
- | | ||
- | |||
- | oct 29 09:02:09 nextcloud3 systemd[1]: Starting MariaDB 10.4.8 database server... | ||
- | oct 29 09:02:09 nextcloud3 systemd[18087]: | ||
- | oct 29 09:02:09 nextcloud3 systemd[18087]: | ||
- | oct 29 09:02:09 nextcloud3 systemd[1]: mariadb.service: | ||
- | oct 29 09:02:09 nextcloud3 systemd[1]: mariadb.service: | ||
- | oct 29 09:02:09 nextcloud3 systemd[1]: Failed to start MariaDB 10.4.8 database server. | ||
- | </ |
nextcloud_dans_lxc_-_2.1572340462.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)