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 | ||
serveur_hebergement:nextcloud_et_collabora_online [2022/10/04 16:08] – fate | serveur_hebergement:nextcloud_et_collabora_online [2024/01/14 11:54] (Version actuelle) – [Prérequis] fate | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Nextcloud et Collabora Online ====== | ====== Nextcloud et Collabora Online ====== | ||
- | Nextcloud est un logiciel libre qui permet d' | + | Nextcloud est un logiciel libre qui permet d' |
Vous pouvez également créer et modifier des tableurs et fichiers docx/odt via Collabora Online. | Vous pouvez également créer et modifier des tableurs et fichiers docx/odt via Collabora Online. | ||
Ligne 16: | Ligne 16: | ||
On va activer le module apcu qui va gérer le cache de Nextcloud. Ouvrez le fichier php.ini : | On va activer le module apcu qui va gérer le cache de Nextcloud. Ouvrez le fichier php.ini : | ||
- | <code bash> | + | <code bash> |
Dans la partie Dynamic Extensions, ajoutez la ligne suivante : | Dans la partie Dynamic Extensions, ajoutez la ligne suivante : | ||
<code bash> | <code bash> | ||
+ | |||
+ | On va commencer par s' | ||
+ | |||
+ | ===== Collabora Online ===== | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | On va récupérer le dépôt officiel en commençant par récupérer les clés de signature : | ||
+ | <code bash> | ||
+ | cd / | ||
+ | sudo wget https:// | ||
+ | </ | ||
+ | |||
+ | On rajoute le dépôt. | ||
+ | Créez le fichier de source : | ||
+ | <code bash> | ||
+ | |||
+ | Collez-y les lignes suivantes : | ||
+ | <code bash> | ||
+ | Types: deb | ||
+ | URIs: https:// | ||
+ | Suites: ./ | ||
+ | Signed-By: / | ||
+ | </ | ||
+ | |||
+ | Ces lignes sont pour un ARM64 (mon Raspberry Pi 4). Si vous êtes sous un Debian 64 bits, remplacez l'url par : | ||
+ | < | ||
+ | |||
+ | Mettez à jour la liste des paquets : | ||
+ | <code bash> | ||
+ | |||
+ | Installez Collabora Online : | ||
+ | <code bash> | ||
+ | |||
+ | On passe à la configuration. | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | |||
+ | Ouvrez le fichier de configuration : | ||
+ | <code bash> | ||
+ | |||
+ | Dans la partie "SSL settings", | ||
+ | <code bash> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | Il faut que l' | ||
+ | |||
+ | On va diriger les logs dans un fichier distinct, / | ||
+ | <code bash>< | ||
+ | par | ||
+ | <code bash>< | ||
+ | |||
+ | On va également limiter les logs au niveau warning et supérieur. Remplacez la ligne : | ||
+ | <code bash>< | ||
+ | par | ||
+ | <code bash>< | ||
+ | |||
+ | |||
+ | Après la ligne "</ | ||
+ | <code bash>< | ||
+ | |||
+ | Créez le fichier de log : | ||
+ | <code bash> | ||
+ | |||
+ | Changez le propriétaire du fichier : | ||
+ | <code bash> | ||
+ | |||
+ | Redémarrez Collabora Online : | ||
+ | <code bash> | ||
+ | |||
+ | On va créer le vhost Apache2 pour y accéder. | ||
+ | |||
+ | ==== Configuration Apache2 ==== | ||
+ | |||
+ | Créez le fichier de configuration Apache2 : | ||
+ | <code bash> | ||
+ | |||
+ | Collez-y les lignes suivantes (remplacez domaine.fr par votre domaine) : | ||
+ | <code apache2> | ||
+ | < | ||
+ | | ||
+ | ServerName office.domaine.fr | ||
+ | ServerAdmin fate@domaine.fr | ||
+ | | ||
+ | Redirect / https:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | | ||
+ | ServerName office.domaine.fr | ||
+ | ServerAdmin fate@domaine.fr | ||
+ | |||
+ | LogLevel warn | ||
+ | CustomLog ${APACHE_LOG_DIR}/ | ||
+ | ErrorLog ${APACHE_LOG_DIR}/ | ||
+ | | ||
+ | SSLEngine on | ||
+ | SSLCertificateFile / | ||
+ | SSLCertificateKeyFile / | ||
+ | |||
+ | # Encoded slashes need to be allowed | ||
+ | AllowEncodedSlashes NoDecode | ||
+ | |||
+ | # Container uses a unique non-signed certificate | ||
+ | SSLProxyEngine On | ||
+ | SSLProxyVerify None | ||
+ | SSLProxyCheckPeerCN On | ||
+ | SSLProxyCheckPeerName On | ||
+ | |||
+ | # keep the host | ||
+ | ProxyPreserveHost On | ||
+ | |||
+ | # static html, js, images, etc. served from coolwsd | ||
+ | # browser is the client part of LibreOffice Online | ||
+ | ProxyPass | ||
+ | ProxyPassReverse | ||
+ | | ||
+ | # WOPI discovery URL | ||
+ | ProxyPass | ||
+ | ProxyPassReverse | ||
+ | |||
+ | # Main websocket | ||
+ | ProxyPassMatch "/ | ||
+ | # Admin Console websocket | ||
+ | ProxyPass | ||
+ | |||
+ | # Download as, Fullscreen presentation and Image upload operations | ||
+ | ProxyPass | ||
+ | ProxyPassReverse | ||
+ | |||
+ | # Endpoint with information about availability of various features | ||
+ | ProxyPass | ||
+ | ProxyPassReverse | ||
+ | |||
+ | </ | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Activez le fichier de configuration (modifiez le nom de domaine) : | ||
+ | <code bash> | ||
+ | |||
+ | Redémarrez Apache2 : | ||
+ | <code bash> | ||
+ | |||
+ | Passons à Nextcloud. | ||
+ | |||
+ | ===== Nextcloud ===== | ||
+ | |||
+ | ==== Téléchargement ==== | ||
Téléchargez la dernière version de Nextcloud : | Téléchargez la dernière version de Nextcloud : | ||
Ligne 32: | Ligne 184: | ||
<code bash> | <code bash> | ||
- | ===== Création de la base de données | + | ==== Création de la base de données ==== |
Lancez MySQL : | Lancez MySQL : | ||
Ligne 52: | Ligne 204: | ||
<code sql> | <code sql> | ||
- | ===== Configuration | + | ==== Configuration |
Créez le fichier de configuration Apache2 (remplacez le nom de domaine) : | Créez le fichier de configuration Apache2 (remplacez le nom de domaine) : | ||
Ligne 62: | Ligne 214: | ||
DocumentRoot / | DocumentRoot / | ||
- | |||
ServerName nextcloud.domaine.fr | ServerName nextcloud.domaine.fr | ||
- | ServerAdmin fate@domaine.fr | ||
Redirect / https:// | Redirect / https:// | ||
Ligne 74: | Ligne 224: | ||
DocumentRoot / | DocumentRoot / | ||
- | |||
ServerName nextcloud.domaine.fr | ServerName nextcloud.domaine.fr | ||
- | ServerAdmin fate@domaine.fr | ||
LogLevel warn | LogLevel warn | ||
Ligne 82: | Ligne 230: | ||
ErrorLog ${APACHE_LOG_DIR}/ | ErrorLog ${APACHE_LOG_DIR}/ | ||
- | | + | SSLEngine on |
- | | + | SSLCertificateFile / |
- | SSLCertificateFile / | + | SSLCertificateKeyFile / |
- | SSLCertificateKeyFile / | + | #Header set Content-Security-Policy " |
- | #Header set Content-Security-Policy " | + | |
- | </ | + | |
< | < | ||
Ligne 103: | Ligne 248: | ||
</ | </ | ||
- | |||
- | # modern configuration, | ||
- | SSLProtocol | ||
- | SSLCipherSuite | ||
- | SSLHonorCipherOrder | ||
- | SSLCompression | ||
- | SSLSessionTickets | ||
- | |||
- | # OCSP Stapling, only in httpd 2.3.3 and later | ||
- | SSLUseStapling | ||
- | SSLStaplingResponderTimeout 5 | ||
- | SSLStaplingReturnResponderErrors off | ||
- | SSLStaplingCache | ||
</ | </ | ||
Ligne 125: | Ligne 257: | ||
<code bash> | <code bash> | ||
- | ===== Configuration | + | ==== Installation |
+ | |||
+ | Allez à l' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Choisissez un nom d' | ||
+ | |||
+ | {{: | ||
+ | Cliquez sur " | ||
+ | Sur l' | ||
+ | {{: | ||
+ | Nextcloud est maintenant installé. Passons à la configuration. | ||
+ | ==== Configuration de Nextcloud ==== | ||
- | ===== Memory caching ===== | + | Cliquez sur l' |
+ | Allez dans la partie " | ||
+ | Cliquez de nouveau sur l' | ||
+ | Allez dans Administration > Paramètres de base et choisissez l' | ||
- | APCu | + | Allez maintenant dans Administration > Nextcloud Office et cliquez sur " |
- | APCu is a data cache, and it is available in most Linux distributions. On Red Hat/ | + | {{: |
- | After restarting your Web server, add this line to your config.php file: | + | Sur le serveur, il va falloir créer une tâche cron avec l' |
+ | <code bash> | ||
+ | Si on vous demande quel éditeur choisir, choisissez nano. | ||
- | ' | + | Ajoutez la ligne suivante pour exécuter le script cron.php toutes les 5 minutes : |
+ | <code bash> | ||
- | Refresh your Nextcloud admin page, and the cache warning should disappear. | + | Il ne nous reste plus qu'à activer le cache. |
+ | <code bash> | ||
- | Warning | + | Ajoutez la ligne suivante : |
+ | <code bash>' | ||
- | APCu is disabled by default on CLI which could cause issues with nextcloud’s cron jobs. Please make sure you set the apc.enable_cli to 1 on your php.ini config file or append --define apc.enable_cli=1 to the cron job call. | + | Voila. Nextcloud est installé et vous pouvez créer et éditer des fichiers type Word et Excel. |