nextcloud_dans_lxc_-_2
Ceci est une ancienne révision du document !
Table des matières
Nextcloud dans lxc - 2
29/10/2019 : Essais d'une installation complète en suivant le tutoriel https://www.c-rieger.de/nextcloud-installation-guide-debian-9-10/ et mes notes sur lxc.
lxc
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
# lxc-attach nextcloud2 root@nextcloud3:/# apt update root@nextcloud3:/# apt install curl wget sudo gnupg2 git lsb-release ssl-cert ca-certificates apt-transport-https tree locate software-properties-common dirmngr htop net-tools zip unzip curl ffmpeg ghostscript libfile-fcntllock-perl -y
Dépôts pour Nginx, PHP et MariaDB
Nginx
# cd /etc/apt/sources.list.d # echo "deb [arch=amd64] http://nginx.org/packages/mainline/debian $(lsb_release -cs) nginx" | tee nginx.list # curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
PHP
# cd /etc/apt/sources.list.d # echo "deb [arch=amd64] https://packages.sury.org/php/ $(lsb_release -cs) main" | tee php.list # root@nextcloud3:/etc/apt/sources.list.d# wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - OK
MariaDB
# cd /etc/apt/sources.list.d # echo "deb [arch=amd64] http://mirror2.hs-esslingen.de/mariadb/repo/10.4/debian $(lsb_release -cs) main" | tee mariadb.list # apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 Executing: /tmp/apt-key-gpghome.RwXWJVNDat/gpg.1.sh --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 gpg: clef F1656F24C74CD1D8 : clef publique « MariaDB Signing Key <signing-key@mariadb.org> » importée gpg: Quantité totale traitée : 1 gpg: importées : 1
Upgrade
On met à jour :
# 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
# apt install nginx -y # nginx -V nginx version: nginx/1.17.5 # systemctl enable nginx.service # mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak && touch /etc/nginx/nginx.conf root@nextcloud3:/etc/apt/sources.list.d# ip a (...) 27: eth0@if28: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 (...) inet 10.0.3.162/24 brd 10.0.3.255 scope global dynamic eth0 (...) root@nextcloud3:/etc/apt/sources.list.d# vim /etc/nginx/nginx.conf root@nextcloud3:/etc/apt/sources.list.d# cat /etc/nginx/nginx.conf user www-data; worker_processes auto; pid /var/run/nginx.pid; events { worker_connections 1024; multi_accept on; use epoll; } http { server_names_hash_bucket_size 64; upstream php-handler { server unix:/run/php/php7.3-fpm.sock; } set_real_ip_from 127.0.0.1; set_real_ip_from 10.0.3.0/24; real_ip_header X-Forwarded-For; real_ip_recursive on; include /etc/nginx/mime.types; #include /etc/nginx/proxy.conf; #include /etc/nginx/ssl.conf; #include /etc/nginx/header.conf; #include /etc/nginx/optimization.conf; default_type application/octet-stream; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log warn; 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 /etc/nginx/conf.d/*.conf; }
nextcloud_dans_lxc_-_2.1572338874.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)