Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
nextcloud:installation [2019/04/13 09:53] – madko | nextcloud:installation [2019/04/16 07:11] (Version actuelle) – madko | ||
---|---|---|---|
Ligne 9: | Ligne 9: | ||
< | < | ||
yum install httpd | yum install httpd | ||
+ | </ | ||
+ | |||
+ | Pour activer le service : | ||
+ | |||
+ | < | ||
+ | systemctl enable --now httpd | ||
</ | </ | ||
Ligne 23: | Ligne 29: | ||
< | < | ||
yum install yum-utils | yum install yum-utils | ||
+ | </ | ||
+ | |||
+ | Pour activer le dépôt REMI pour PHP 7.3 : | ||
+ | |||
+ | < | ||
+ | yum install http:// | ||
+ | </ | ||
+ | |||
+ | Les paquets nécessaires à nextcloud : | ||
+ | |||
+ | < | ||
+ | yum install php73-php-cli php73-php-fpm php73-php-gd php73-php-intl php73-php-pdo php73-php-mbstring php73-php-mysqlnd php73-php-opcache php73-php-pecl-apcu php73-php-pecl-igbinary php73-php-pecl-memcached php73-php-pecl-msgpack php73-php-pecl-mysql php73-php-pecl-zip php73-php-process php73-php-xml | ||
+ | </ | ||
+ | |||
+ | Pour activer le service php-fpm : | ||
+ | |||
+ | < | ||
+ | systemctl enable --now php73-php-fpm | ||
</ | </ | ||
Ligne 39: | Ligne 63: | ||
mysql> GRANT ALL ON nextcloud.* TO nextcloud@localhost IDENTIFIED BY ' | mysql> GRANT ALL ON nextcloud.* TO nextcloud@localhost IDENTIFIED BY ' | ||
</ | </ | ||
+ | |||
+ | ===== NextCloud ===== | ||
+ | |||
+ | Téléchargement de nextcloud : | ||
+ | |||
+ | < | ||
+ | wget https:// | ||
+ | </ | ||
+ | |||
+ | Installation de nextcloud dans / | ||
+ | |||
+ | < | ||
+ | unzip nextcloud-15.0.7.zip -d / | ||
+ | </ | ||
+ | |||
+ | Déplacer tous les fichier de / | ||
+ | |||
+ | < | ||
+ | chown -R apache. / | ||
+ | </ | ||
+ | |||
+ | ===== SELinux ===== | ||
+ | |||
+ | Il faut autoriser php-fpm à faire des execmem : | ||
+ | |||
+ | < | ||
+ | setsebool -P httpd_execmem 1 | ||
+ | </ | ||
+ | |||
+ | Il faut relancer le service php-fpm : | ||
+ | |||
+ | < | ||
+ | systemctl restart php73-php-fpm | ||
+ | </ | ||
+ | |||
+ | Le reste concerne les contextes par défaut des fichiers nextcloud, surtout ceux où nextcloud doit pouvoir écrire : | ||
+ | |||
+ | < | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | </ | ||
+ | |||
+ | S' | ||
+ | |||
+ | < | ||
+ | restorecon -Rv / | ||
+ | </ | ||
+ | |||
+ | ===== Configuration du vhost ===== | ||
+ | |||
+ | Fichier / | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | SSLEngine on | ||
+ | |||
+ | DocumentRoot / | ||
+ | ErrorLog / | ||
+ | CustomLog / | ||
+ | ServerName cloud.nextcloud.lan | ||
+ | SSLCertificateFile / | ||
+ | SSLCACertificateFile / | ||
+ | SSLCertificateKeyFile / | ||
+ | < | ||
+ | Options +FollowSymlinks | ||
+ | AllowOverride All | ||
+ | < | ||
+ | Dav off | ||
+ | </ | ||
+ | SetEnv HOME / | ||
+ | SetEnv HTTP_HOME / | ||
+ | </ | ||
+ | < | ||
+ | #Header always set Strict-Transport-Security " | ||
+ | #Header set Referrer-Policy " | ||
+ | #Header set X-Content-Type-Options " | ||
+ | #Header always set X-Frame-Options " | ||
+ | #Header always set Feature-Policy " | ||
+ | #Header set Content-Security-Policy " | ||
+ | #Header set Content-Security-Policy: | ||
+ | #Header set Content-Security-Policy: | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Redirection des pages php vers les FPM (à intégrer à la conf vhost peut-être), | ||
+ | |||
+ | < | ||
+ | <Files " | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | AddType text/html .php | ||
+ | |||
+ | DirectoryIndex index.php | ||
+ | |||
+ | SetEnvIfNoCase ^Authorization$ " | ||
+ | |||
+ | < | ||
+ | SetHandler " | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Ensuite, voir éventuellement la configuration de [[: | ||