From Mageia wiki
Jump to: navigation, search
(Configurer le moteur de base de données MariaDB.)
(Blanked the page)
(Tag: Blanking)
 
(372 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Modèles ==
 
Ils sont utilisés afin de mettre quelque chose d’important en avant.
 
  
{{note-fr|Pour écrire une note, écrivez <nowiki> {{note|Text …}}</nowiki> }}
 
 
{{attention-fr|Pour écrire un avertissement, écrivez <nowiki> {{attention-fr|Text …}}</nowiki> }}
 
 
{{dragons-fr|Pour donner une astuce, potentiellement dangereuse écrivez <nowiki> {{dragons-fr|Text …}}</nowiki> }}
 
 
{{information|Pour donner une information, écrivez <nowiki> {{information|Text …}}</nowiki> }}
 
 
Pour préparer un brouillon, écrivez <nowiki> {{ébauche-fr|Text …}}</nowiki> en haut de la page, et vous obtiendrez cette bannière :
 
{{ébauche-fr}}
 
 
{{root console|Pour afficher une commande qui sera inscrite dans une console en root, écrivez <nowiki> {{root console|command line}}</nowiki>}}
 
 
{{Console|Pour afficher une commande qui sera inscrite dans une console, écrivez <nowiki> {{Console|command line}}</nowiki>}}
 
 
Pour une liste des Modèles [https://wiki.mageia.org/en/Category:Templates Templates]
 
{{bandeau multi-langues-fr|[https://wiki.mageia.org/de/Wie_man_um_Hilfe_fragt Deutsch] ; [[How to ask help|English]] ; [[Comment demander de l’aide-fr|Francais]];}}
 
 
[[Category : Documentation]]
 
[[Category : Howtos]]
 
{{introduction|Pour l’instant, voir la page qui contient des renseignements sur les versions de ownCloud et Nextcloud. Nextcloud est issu de ownCloud et est néanmoins compatible. Les dépôts de Mageia 5 ont leurs propres paquetages de serveur Cloud, et un paquetage Nextcloud 10. Mageia 6 et au-delà bénéficient d’un serveur Nextcloud.}}
 
Le tout est de créer cette page sur Nextcloud avant la sortie de Mageia 7, en tant que clone de [[ownCloud]] légèrement simplifiée et actualisée.
 
 
{{introduction|ownCloud/[[Nextcloud]] server est un serveur cloud qui peut être installé à la maison, au sein de votre entreprise ou de votre organisation. Il peut synchroniser et partager automatiquement des fichiers, y compris certaines corrections. Il est en mesure de synchroniser des serveurs, et peut exécuter certaines applications comme le calendrier, le carnet d’adresses, et, aussi les applications bureautiques. [[Nextcloud]] est issu de ownCloud. Il existe à la fois des logiciels libres et une branche commerciale des deux. Les clients travaillent avec l’un ou l’autre serveur, et existent communément pour les ordinateurs de bureau et les téléphones portables.}}
 
 
==Informations générales.==
 
'''ownCloud/Nextcloud en comparaison avec les solutions de cloud communément utilisées en dehors de l’entreprise :'''
 
===Les avantages.===
 
* Vos données demeurent en interne, c’est-à-dire qu’elles ne sont pas placées sur les serveurs appartenant à des tierces parties où vous n’avez aucun contrôle sur les personnes qui les voient : gouvernements étrangers, cybercriminels, vos rivaux commerciaux, etc.
 
* Pas de dépendances externes (connexion Internet, fonctionnement du fournisseur d’accès Internet et du fournisseur de service cloud).
 
* Pas de coûts exogènes.
 
* Haute disponibilité sur des fichiers volumineux, des données importantes, des instantanés rapides et des sauvegardes (côté serveur).
 
* Contrôle minutieux des échanges https://ownCloud.com/how-to-avoid-oversharing-with-ownCloud/ et peut se connecter à d’autres serveurs.
 
 
===Les inconvénients.===
 
* Le serveur requiert de nombreux cycles CPU par fichier. Envisager plutôt Seafile si la performance est un problème.
 
* Le transfert n’est pas très bien conçu, c’est-à-dire qu’il peut transférer des fichiers identiques. ''(en fonction de la date et de l’heure, etc. anciennes informations – à vérifier)''
 
*  Même pour une petite modification, le fichier entier est envoyé. Notez que c’est plus difficile à résoudre [https://help.Nextcloud.com/t/desktop-client-delta-updates-to-files/7790/4 harder to solve and less useful] et moins utile que la simple pensée.
 
Besoin d’organiser les sauvegardes à l’extérieur du lieu par un autre moyen (ou de les partager avec le client ou le serveur en dehors du site).
 
* Il faut de la patience et des explications pour lire les instructions, comme cette page…
 
 
===Les différences.===
 
Comme la plupart des services de synchronisation, les clients propres à, ownCloud/Nexctloud [https://github.com/ownCloud/core/issues/6771 ne suivent pas les liens symboliques]. – C’est le cas de Dropbox. « Il semble y avoir des palabres sur les avantages et les inconvénients sur tous les forums de discussion pour chaque type de client…'''' »
 
 
===Les solutions de rechanges.===
 
====ownCloud et Nextcloud.====
 
Les deux versions les plus récentes sont toujours compatibles avec ces deux serveurs.
 
 
Mageia 5 dispose d’un serveur ownCloud jusqu’à la version 9.1 et de clients ownCloud, et d’un serveur Nextcloud 9 et 10. IMPORTANT : les dernières versions sont dans le dépôt backports. Pour les nouvelles installations, procédez à l’installation à partir de celui-ci et avant de faire la mise à jour vers Mageia 6, vous devez avoir fait la mise à niveau vers Nextcloud 10. La mise à jour ne doit pas omettre une version majeure ! – voir [[#Mise à niveau.]]
 
 
Mageia 6 dispose d’un serveur Nextcloud 11 qui est compatible avec Nextcloud 10 que l’on trouve dans les backports de Mageia 5. Nextcloud 12 fait l’objet de mises à jour, voir [[#Les nouvelles.]]
 
 
Cauldron a Nextcloud 13.
 
 
''Dans les textes qui suivent, qui décrivent en général chacun d’entre eux, « ownCloud » désigne également « Nextcloud ».''
 
 
===Autres serveurs de synchronisation de fichiers et clients packagés dans Mageia 6.===
 
====Seafile.====
 
https://github.com/haiwen/seafile https://www.seafile.com/
 
====La synchronisation.====
 
Synchronisation de fichiers en temps réel de type Open Source sans serveur en grappe .
 
 
https://syncthing.net/, https://docs.syncthing.net/users/faq.html
 
 
==Les nouvelles.==
 
* Mageia 5 a dans ses mises à jour principales : ownCloud server 8.0.15, client 1.8.3, mais aussi des versions plus récentes des deux dans les backports, et Nextcloud 10 – '''Pour les nouvelles installations, utilisez directement la dernière version dans le backport !
 
* Mageia 6 a basculé de ownCloud à Nextcloud – aussi bien le serveur que le client. Nextcloud 11 dans les médias, Nextcloud 12 pour les mises à jour.
 
* '''REMARQUE''' : Pour mettre à jour Mageia 5 vers Mageia 6, '''il est important de lire''' [[#Mise à niveau.]] – vous devez mettre à jour toutes les versions majeures, avec une intervention manuelle et vérifier entre chaque version ; vous devez d’abord lancer NC11 si vous aviez Nextcloud 10 sur mga5.
 
* Nextcloud 12 (12.0.6) est prévu (vers le 1er mai ?) dans Mageia 6 '''updates'''' Not in backports, car NC11 ne bénéficie déjà d’aucun support, et Mageia aurait déjà dû passer de mga5 et Nextcloud 10 vers mga6 et Nextcloud11''''.
 
* Sous-paquetages : À partir de Nextcloud 12 et au-delà, nous fournissons un sous-paquetage pour chaque alternative de base de données : Nextcloud-mysql, Nextcloud-postgresql, Nextcloud-sqlite.
 
 
« La fin de la vie des clients ownCloudloud et Nextcloud sont compatibles avec les deux serveurs en fin de vie. »
 
 
===En cours dans le présent document.===
 
Nextcloud 12 & 13.
 
 
===À faire dans ce document.===
 
 
* Rédigez un article au sujet de l’activation de la mise à jour intégrée dans Nextcloud ? (préférable à [[#Faciliter la mise à jour automatique.]] – voir également [[#Les autorisations sur les fichiers.]].
 
* mettre à jour quand cela est nécessaire
 
* Sur Mageia 7, vous pouvez cloner vers une page Nextcloud et supprimer/réécrire depuis ownCloud.
 
 
==Installation.==
 
''Pour une version abrégée, voir [[#Réinstallation exhaustive (force brute).]] mais ignorez la section UNINSTALL.''
 
 
Voir aussi la notice de la version que vous êtes en train d’installer, à savoir https://docs.Nextcloud.com/server/12/admin_manual/installation/ en anglais.
 
 
===Choix des bases de données.===
 
 
L’un des trois systèmes de base de données peut être utilisé : SQLite, PostgreSQL, MariaDB. À compter de Nextcloud 12 et au-delà, nous fournissons un sous-paquetage pour chaque alternative de base de données :  Nextcloud-mysql, Nextcloud-postgresql, Nextcloud-sqlite. Choisissez ''Nextcloud-mysql'' si vous vous référez à cette page wiki.
 
 
SQLite est déconseillé pour des critères de performance.
 
 
Pour un rapide exemple d’utilisation de PostgreSQL, voir [https://bugs.mageia.org/show_bug.cgi?id=22936#c34|ce test].
 
 
Cette page wiki utilisera MariaDB telle que la majorité des développeurs de ownCloud et Nextcloud le recommandent.
 
 
===Installer les paquetages.===
 
À la base, nous installons une pile LAMP, plus ownCloud pour le faire tourner dessus. Vous pouvez également consulter cette page http://www.unixmen.com/how-to-install-lamp-stack-on-mageia-5/
 
Quand il est disponible dans Mageia, la version 7.x de PHP est préférable (après Mageia 6).
 
 
====Les fondamentaux.====
 
Tous les paquetages de ce guide proviennent des dépôts Mageia.
 
* MariaDB – système de base de données préconisé.
 
* php-pdo_mysql – pour que php utilise MariaDB
 
* apache-mod_php – php5 pour utiliser avec apache
 
 
Ainsi que {{cmd|urpmi mariadb apache-mod_php php-pdo_mysql php-fileinfo}} tout ce qui est nécessaire, y compris Apache et de nombreux php.
 
 
* chrony – utiliser ntp pour que les serveurs de temps soit synchronisé, afin que ownCloud puisse décider exactement le fichier qui est le plus ancien. Il en va de même pour les clients ownCloud ! ''Vous avez probablement déjà ceci – il est bon d’avoir sans tenir compte de ownCloud…''
 
 
'''Remarque:''' le plus simple pour configurer chrony dans KDE/Plasma est de cliquer avec le bouton droit de la souris sur l’horloge dans la barre des tâches -> ajuster la date et l’heure -> vérifier {{menu|activate network time protocol}} - Cela installe chrony, et dans le menu déroulant le serveur NTP à synchroniser.
 
 
===== Mageia 7 : La dernière version est en cours de mise à jour.=====
 
Ainsi, avec les mises à jour simplement activées. {{cmd|urpmi Nextcloud}}
 
 
====Suggestions.====
 
* apache-mod_ssl – pour sécuriser les connexions (https) – pour lui permettre de voir [[#Configurez ownCloud.]]
 
* [[#PhpMyAdmin.]] et/ou [[#Webmin.]] – pour gérer la base de données par le biais de l’interface graphique
 
{{cmd|urpmi apache-mod_ssl phpmyadmin webmin}}
 
 
====Pour davantage de fonctionnalités.====
 
D’autres modules peuvent être nécessaires, voyez par exemple https://doc.ownCloud.org/server/9.1/admin_manual/installation/source_installation.html
 
 
==Configuration.==
 
===Configurer le moteur de base de données MariaDB.===
 
* Déjà pris en charge avec le paquetage mageia php-pdo_mysql : il ajoute {{file|/etc/php.d/73_pdo_mysql.ini}} contenant la ligne <code> extension=pdo_mysql.so </code> que la documentation d'installation de ownCloud nous dit d'ajouter à mysql.ini.
 
 
Toutes les commandes qui suivent doivent être saisies en tant que root.
 
* Start MariaDB (i.e it was just installed) {{cmd|systemctl start mysqld}}  ''It seems installing the rpm also sets MariaDB to start at boot (should it not, issue 'systemctl enable mysqld' )''
 
* Issue {{cmd|mysql_secure_installation}} to set/edit MariaDB administrative "root" password and perform a few security measures - just reply to the questions.
 
* Then log in using that password: {{cmd|mysql -uroot -p}}, and there create the database and define its user and password: enter lines below, but your credentials:
 
 
<code> CREATE USER 'OCserverUsername'@'localhost' IDENTIFIED BY 'OCserverPassWD';</code> - Invent a username and password for ownCloud to use for mariaDB, keep 'localhost' <br>
 
<code> CREATE DATABASE IF NOT EXISTS ownCloud;</code> - Name of the database is good to have as "ownCloud" <br>
 
<code> GRANT ALL PRIVILEGES ON ownCloud.* TO 'OCserverUsername'@'localhost' IDENTIFIED BY 'OCserverPassWD';</code> <br>
 
<code> quit; </code>
 
 
===Stockage des fichiers.===
 
By default user files are stored in {{file|/usr/share/ownCloud/data/}}, which is a link to {{file|/var/lib/ownCloud/}}
 
 
Also {{file|ownCloud.log}} is there, and if you chose to use SQLite, its database files.
 
 
You may choose to use another location, i.e a dedicated ext4 partition in an LVM so you can extend it and also make snapshots. You may also have that whole LVM encrypted. The cost is a slightly poorer performance. On a raid?  Your choice.
 
 
For this example lets say you mount it at /mnt/ownCloud. You must make a data folder, and following [[#Upload buffering folder]] also a tmp folder, and set the correct rights and ownership, example:<br>
 
{{cmd|mkdir -p /mnt/ownCloud/data}}<br>
 
{{cmd|mkdir /mnt/ownCloud/tmp}}<br>
 
{{cmd|chmod -R 770 /mnt/ownCloud}}<br>
 
{{cmd|chown -R apache:apache /mnt/ownCloud}}
 
 
''Note:''  '''If''' you do not place your data folder out of direct webserver access like that; if you and keep it under www/ instead: then check that data/.htaccess effectively looks like below. (for apache 2.4 - if 2.2, first line should read "deny from all")
 
<blockquote> Require all denied <br>
 
IndexIgnore * </blockquote>
 
''-or else your data may be accessible from internet!''
 
 
===Configurer Php.===
 
====Connexion Php.====
 
Create the file and set apache as user. As root: <br>
 
{{cmd|touch /var/log/php-errors.log}} <br> {{cmd|chown apache:apache /var/log/php-errors.log}}
 
 
In {{file|/etc/php.ini}}:
 
<code> error_log = /var/log/php-errors.log </code>
 
By default everything else seem correct, i.e <code> log_errors = On  </code>.
 
 
====Dossier tampon de téléversement.====
 
It is defined in {{file|/etc/php.ini}} By default <code> upload_tmp_dir = /var/tmp </code> . It is a good idea to use a tmp folder in same filesystem as data folder, so following above example set it to /mnt/ownCloud/tmp .
 
 
In {{file|/etc/php.ini}} you most probably want to to '''increase''' (default in parenthesis) '''upload_max_filesize''' (16M) , and maybe max_file_uploads (20) .
 
 
====Configurer le fuseau horaire de php.====
 
Some php scripts like the apcu web interface (see PHP caching below) will complain a lot in php-errors.log unless timezone is set, so in /etc/php.ini uncomment and modify the line date.timezone so it looks like
 
<code> date.timezone = Europe/Stockholm </code>
 
where the last part is your zone according to http://php.net/manual/en/timezones.php
 
 
===ownCloud nécessite d'écrire.===
 
... a few folders (which you may see a complaint of in the above tool), so enter:
 
 
{{cmd|cd /usr/share/ownCloud}} <br> {{cmd|chown apache:apache config data apps}}
 
 
ref: https://doc.ownCloud.org/server/9.0/admin_manual/installation/source_installation.html#setting-strong-directory-permissions
 
 
===Pare-feu.===
 
In {{menu|Mageia Control Center -> Security -> Personal firerwall}} the "Webserver" must be checked.  ( or define ports manually in the field "advanced" if other ports are used: see [[#How_to_change_the_port_ownCloud_is_using]] )
 
 
===Configurez ownCloud.===
 
# Browse to https://localhost/ownCloud,
 
# Invent, note down safely, and and fill in your ownCloud administrator login name and strong password,
 
# Click {{menu|Storage & Database}},
 
## State the location for data storage, per above suggestion it is {{file|/mnt/ownCloud/data}},
 
## Choose {{menu|MariaDB}}, and for it state the same as you used in [[#Configure the database engine MariaDB]] for OCserverUsername, OCserverPassWD, database name (ownCloud), "localhost",
 
# Verify all is entered correctly and press {{menu|Finish setup}}  After a few seconds you are logged in,
 
# Logged in, in the a pulldown rightmost up: select the Admin}} entry ''( direct link: http://localhost/ownCloud/index.php/settings/admin)'',
 
# For better security set {{menu|enforce https}} (need apache-mod_ssl, see [[#Suggested]] ''(this option seem to be on/automatic hidden in newer versions)'',
 
# Disable functions you do not need,
 
# Set send email and test, but first visit {{menu|Personal}} in that same dropdown menu top right to set your receive email,
 
# In that drop-down menu select {{menu|Users}} to add and manage users and their quota etc,
 
 
Most settings are stored in {{file|/usr/share/ownCloud/config/config.php}} (linked from {{file|/etc/ownCloud/config.php}}.  Much more can be set, see https://doc.ownCloud.org/server/9.1/admin_manual/configuration_server/config_sample_php_parameters.html
 
 
==Vérification de la configuration.==
 
* ownCloud and Nextcloud servers check a lot of things and report problems on the web interface admin page.
 
* For external test see [[#Automated tests]]
 
* For local tests see below:
 
===Contrôles intégrés.===
 
On the web interface admin page i.e https://localhost/ownCloud/index.php/settings/admin at top you may see some warnings in red about security problems and optimisation proposals.  They are self-explanatory and at bottom of admin page you have some links to documents, and also search/look around on *this* page you read here ;) Also see https://doc.ownCloud.org/server/9.1/admin_manual/configuration_server/security_setup_warnings.html
 
 
You most probably see "Some files have not passed the integrity check." which is normal on an install from a package.  Explanations [[https://help.Nextcloud.com/t/failed-integrity-check-after-manual-upgrade/1382 here]] and [[https://github.com/ownCloud/core/issues/22966 here]]. For more info see https://doc.ownCloud.org/server/9.1/admin_manual/issues/code_signing.html#code-signing-fix-warning-label.
 
 
Some of the warnings are also shown in orange on top of every page, but only for admins.
 
 
===Vérifiez php.===
 
Below is a very simple script.  ''You dont need it if you create the [[#ownCloud test script]] as that includes this function.''
 
<?php
 
phpinfo();
 
?>
 
Save as {{file|/var/www/html/testphp.php}}, then restart apache {{cmd|systemctl restart httpd}} and head your browser to http://localhost/testphp.php ''(if surfing from other than local machine replace 'localhost' as appropriate.)''
 
 
===Script d'essai ownCloud.===
 
This script checks and reports on many aspects of the installation:
 
Get "ownCloud Tools" from first post http://forum.ownCloud.org/viewtopic.php?f=8&t=2921 - As described there: grab the content in the list box, edit in a password on line two, and save as {{file|/usr/share/ownCloud/tools.php}}, owner root, permissions -rw-r--r-- .
 
Then go to https://localhost/ownCloud/tools.php (modify 'localhost' to ownCloud server IP if from another machine) and log in using that password.
 
 
Check around that things look OK!  ''Note: it will complain about .htacess not working even when you have moved your data folder away from webserver, see "Prepare storage" above.''
 
 
===Vérifiez les journaux !===
 
How to find webserver or ownCloud logfile: https://forum.ownCloud.org/viewtopic.php?f=17&t=7330  ownCloud logfile is also viewable and downloadable from its web UI admin page.  Default log locations - per install instructions above:
 
* ownCloud: {{file|/mnt/ownCloud/data/ownCloud.log}}  (default: {{file|/usr/share/ownCloud/data/ownCloud.log}}  - it is in in the data folder.)
 
* MariaDB: {{file|/var/log/mysqld/mysqld.log}}
 
* php: {{file|/var/log/php-errors.log}}
 
* apache: {{file|/var/log/httpd/error_log}}
 
 
===La sécurité.===
 
''(change number for relevant server version in links below)''
 
 
https://docs.Nextcloud.com/server/11/admin_manual/configuration_server/harden_server.html
 
 
https://doc.ownCloud.org/server/9.1/admin_manual/installation/installation_wizard.html
 
 
====Les autorisations sur les fichiers.====
 
Voir « Définir des autorisations d’accès élevées pour les répertoires » sur les liens ci-dessus.
 
Mais également [https://help.Nextcloud.com/t/please-help-with-right-permissions-for-nc12/13780/4 look here!]; Lately, the recommendation has changed from setting strong protection, to instead promote setting adequate protection so the updater can run, so users update regularly which is more important: 750 on directories, 640 on files.  For an *example* of a script for setting permissions, see point 16 [http://www.iholken.com/index.php/2016/07/24/upgrade-ownCloud-9-x-to-9-1-in-synology-nas-running-dsm6/comment-page-1/ here.]
 
 
====Test automatique.====
 
* The external https://scan.Nextcloud.com is targeted at security.
 
* The local [[#ownCloud test script]] is good for checking internal setup plus some security.
 
 
==Accès depuis Internet.==
 
Ensure that your ownCloud defaults to HTTPS and does not allow HTTP access. You must have installed package apache-mod_ssl as recommended above for HTTPS to work.
 
 
===Redirection du port du routeur.===
 
Forward both tcp and udp on port 443 (HTTPS) and maybe port 80 (Insecure: HTTP Not recommended) to the computer hosting your ownCloud. The manual for your router should explain how.
 
 
===Comment changer le port que ownCloud utilise.===
 
For some setups i.e other web servers are present, you want this machine to serve web on other ports
 
https://forum.ownCloud.org/viewtopic.php?f=17&t=15501  Naturally, also change the firewall setting on the machine accordingly...
 
 
===Enregistrer un nom pour votre adresse IP dynamique.===
 
If you do not have static IP i suggest registering a name at a site for dynamic DNS (dyndns.org, noip.com. and others... Many modern routers have an inbuilt capability to update the IP number automatically at one or more such sites often - check what your router support.)  For the example below, say you register mydynamicsite.dyndnsprovider.biz
 
 
===Domaine de confiance.===
 
For ownCloud to accept connection from mydynamicsite.dyndnsprovider.biz it have to be set in "trusted_domain" in config.php.
 
An easy way to achieve this is to locally log in as admin, and issue a command in browser address field. Example: log in as an administrator at myserver.LAN.IP.adress/ownCloud and then in browser address field issue myserver.LAN.IP.adress/ownCloud/index.php/settings/admin?trustDomain=mydynamicsite.dyndnsprovider.biz
 
 
===Comment définir grossièrement la taille de fractionnement du téléchargement.===
 
In order to avoid timeouts on larger files uploading from the client on slow connections, see http://forum.ownCloud.org/viewtopic.php?f=14&t=24595  https://github.com/ownCloud/client/issues/766
 
 
It is set to 5MB by default in ownCloud 8.x.
 
 
==Trucs & astuces.==
 
'''Also see''' very useful links for optimising, backup and security at '''bottom of admin page''', i.e https://my.ser.ver.ip/ownCloud/index.php/settings/admin#admin-tips
 
 
===La ligne de commande occ.===
 
The command line is powerful, see https://doc.ownCloud.org/server/9.1/admin_manual/configuration_server/occ_command.html . ''Remember to run it as user "apache".''
 
 
===Mode maintenance.===
 
There are different maintenance modes, more elegant than stopping the server completely when doing backups or upgrades.
 
https://doc.ownCloud.org/server/9.1/admin_manual/maintenance/enable_maintenance.html
 
 
===Arrêt, démarrage.===
 
Use for easiest and safest upgrades and backup:
 
 
{{cmd|systemctl stop httpd.service}}
 
 
{{cmd|systemctl start httpd.service}}
 
 
''Drawback: actually stops/starts Apache, so all other services it run too...''
 
 
- If you do not want to stop Apache, use [[#Maintenance mode]] instead.
 
 
===Mettre en ligne des fichiers par un autre moyen.===
 
In order to load lots of files initially on the server, many have experimented on how to bypass ownCloud and load files directly to the data directory, then let ownCloud index what it have. Examples see https://forum.ownCloud.org/viewtopic.php?f=17&t=7236&start=30 and also find tip in the link in Throughput below.
 
 
ownCloud will still work the server very hard as it indexes all these new files.  If you are going to store a lot of files, or move them around often, then consider using the mySQL or a similar relational database option rather than SQLite.
 
 
==Sauvegarde des données.==
 
'''Consistency between files and database must be guaranteed!'''  Easiest is to stop ownCloud/Nextcloud (actually stop Apache) before backing up. If you do not want to stop Apache, use [[#Maintenance mode]] instead.
 
 
=== Ce qu'il faut sauvegarder.===
 
* The data directory tree!
 
** - If you have configured a non default location, you know where it is :)
 
** - If instead kept as default installed by Mageia ownCloud rpm it is {{file|/var/lib/ownCloud/}}, linked to /usr/share/ownCloud/data/ , so included if you you back up /usr/share/ownCloud/.
 
** - A fresh Mageia install of Nextcloud analogously have {{file|/var/lib/Nextcloud/}}, linked to /usr/share/Nextcloud/data/.
 
** NOTE: A Mageia Nextcloud installation ''migrated'' from ownCloud still use {{file|/var/lib/ownCloud/}}, linked to /usr/share/Nextcloud/data/ (see [[#Migrating OC->NC]]).
 
* Maybe take whole {{file|/usr/share/ownCloud/}} for all apps, theming etc.  ''NOTE:''
 
** Configuration subfolder {{file|config/}} is linked from /etc/ownCloud/ ''({{file|config.php}})''
 
** Actual data subfolder may be linked from {{file|data/}}, see above.
 
* {{file|/etc/ownCloud/}} (maybe not needed; linked, see above)
 
* {{file|/var/lib/mysql/}} - the database - or '''better: save database by recommended method:''' see [[#Save database]]
 
* {{file|/etc/my.cnf}} , {{file|/etc/my.cnf.d/}} - MariaDB configuration file/folder (depending on version(?))
 
* {{file|/etc/httpd/conf/sites.d/ownCloud.conf}}
 
* {{file|/etc/httpd/conf/httpd.conf}} - apache configuration file
 
 
More info and command examples (change number according to your version)
 
https://doc.ownCloud.org/server/9.1/admin_manual/maintenance/backup.html
 
https://docs.Nextcloud.com/server/10/admin_manual/maintenance/backup.html
 
 
===Sauvegardez la base de données.===
 
Use the nice [[#PhpMyAdmin]] or [[#Webmin]], or: http://forum.ownCloud.org/viewtopic.php?f=26&t=19400 ,  http://forums.mageia.org/en/viewtopic.php?f=8&t=7187&p=46069 . Backup script for MariaDB http://forums.mageia.org/en/viewtopic.php?f=5&t=7338&p=46877
 
 
===Les scripts utiles.===
 
 
https://help.Nextcloud.com/t/scripts-for-backup-restore/21433?source_topic_id=30360
 
 
== Réinstaller/Désinstaller/Installer les applications.==
 
https://central.ownCloud.org/t/how-to-cleanly-re-install-an-app/859/2
 
 
== Réinstaller.==
 
For a total reinstall of ownCloud:
 
* Make sure you know what users you have and will want to define again, how much data space they need.
 
* If you plan to do a fresh upload of all data, and skip backup od ownCloud data folder: make sure you know if there are data stored only on the server currently...
 
* Make sure you know what applications are used, which you would want to use again.
 
** NOTE: If you are to migrate to a newer ownCloud/Nextcloud version, some apps (i.e calendar and address book) need to export their data in order to be importable to a newer version
 
* Stop using the cloud, stop apache, uninstall ownCloud, start apache. (so all ownCloud data is stable, and apache again runs other services)
 
* [[#Backup]]
 
* Install, per the beginning of this document...
 
** For a complete reinstall clean out settings and config files before installing. Hints:, see [[#Backup]]. (i.e delete/rename /etc/ownCloud/config.php)  And create a new fresh database.
 
 
For reference: [[#Brute force reinstall]]
 
===Y a-t-il eu des problèmes ?===
 
Some ideas before needing reinstall:
 
* file ownership and rights problem?
 
* if you suspect there have been program version conflicts, reinstall php packages, and maybe more...
 
* if database was corrupt try creating an empty one, and then using ownCloud register users again. There have been reports that such have worked even for migrating between databases and users found their content again, but no guarantees! - keep backup.
 
* If you do not care about content then you can, of course, remove all data before reinstalling.
 
 
==Plusieurs possibilités de se connecter.==
 
* Html browser:
 
** log into the WEB UI at https://server/ownCloud. Upload, download, create... Manage share folders and files. You can create sharelinks to files or folders, with password.  Log in as administrator to manage ownCloud.
 
** Receiver of a shared link opens it and get access to the shared file/folder (only)
 
** Use web browser as file browser: enter http://server/ownCloud/remote.php/webdav/ and log in.
 
* '''Recommended''': ownCloud/NExtcloud sync client continuously syncronises selected folders on your computer(s) with your account (more below)
 
* There are simpler sync client '''apps''' for iOS and Android, that also can do instant uploads of taken photos and videos
 
* Use a file browser:
 
 
===Navigateur de fichiers + WebDAV.===
 
You can connect your file browser to an ownCloud server using the WebDAV protocol. Example: in Dolphin write <code> webdav://server/ownCloud/remote.php/webdav/ </code>,
 
where "server" is your servers IP number or hostname. Append a subdir if you want ( ...webdav/sub/dir/tree ).
 
There will pop up a dialog for username and password, then you browse the files in your ownCloud account!
 
 
==Le client de synchronisation propre à CloudCloud.==
 
===Installation.===
 
Mageia 5:
 
* Install the package ownCloud-client last version from core_backports repository.
 
Mageia 6:
 
* Install the package Nextcloud-client - check backport repo for eventually latest version
 
* Optionally Nextcloud-client-dolphin / Nextcloud-client-nautilus / Nextcloud-client-nemo for more integration: shows check marks on synchronised items.  Use same version as Nextcloud-client.
 
 
[https://doc.ownCloud.org/desktop/latest/advancedusage.html#configuration-file Client manual - configuration file]
 
 
===Remarques.===
 
* '''Downloaded folders''' (that did not exist on the client before) get the '''date of download''' - their time stamp is not synced. Issue https://github.com/ownCloud/core/issues/14008 and more.
 
* In the root of each sync root folder there is the '''Database''' {{file|.csync_journal.db}} and a '''log''' {{file|.ownCloudsync.log}}. While the client runs there also exist {{file|.csync_journal.db-shm}} and {{file|.csync_journal.db-wal}}.
 
* The clients '''configuration''' is by default in {{file|~/.local/share/data/ownCloud}} - most is plain text.
 
* The client can show a '''log window''' and also '''log to file'''. For more info start ownCloud with command line parameter -h (for help).
 
* Change log (same for ownCloud and Nextcloud clients): https://ownCloud.org/changelog/desktop/
 
 
===Les astuces.===
 
====Synchroniser sur un autre serveur.====
 
If you now and then want to sync to another server than your usual one, stop the running ownCloud client and start it with another configuration like this: {{cmd|/usr/bin/ownCloud --confdir $HOME/.local/share/data/ownCloud-myotherserver}}. If that folder does not exist it will create a clean one, and you set up ownCloud like usual from the beginning.
 
 
It is convenient to copy the launch item from desktop menu and enter the different confdirs in different launch items.  Set the one you want to have started at login. (For KDE it is in System Settings -> Start and Shutdown.)
 
 
====Synchronisation avec plus d'un serveur en même temps.====
 
Clients 2.x can do that. (in Mageia 5 backport, and Mageia 6 + )
 
 
Old clients 1.x can only sync to one server at a time.
 
 
====Synchroniser un système à double amorçage (Linux/Windows).====
 
Syncing same tree from different OS:es (or users on same system) is officially not supported.
 
 
''It seem to have worked with clients 1.8.3 though for me (with tricks per link here), but I experienced problems using 2.1.0.''
 
http://forum.ownCloud.org/viewtopic.php?f=14&t=19672&p=78867#p78867
 
 
===Mise à niveau du client.===
 
Mageia 5: The ownCloud 2.x client is so different from 1.x that it deserved a place in backport on Mageia 5, because it needs user interaction for configuring to work after the update and we do not want automatic update to break anything.  The upgrade can be done ASAP on Mageia 5 from backports repo.
 
 
====Migration du client ownCloud 2.x vers le client Nextcloud.====
 
Mageia 6 have the Nextcloud client.  It is fully compatible with ownCloud client, but needs to be configured from scratch OR copy the configuration from ownCloud client ''if you used version 2'' in Mageia 5:  [https://help.Nextcloud.com/t/copy-the-ownCloud-sync-client-configuration-when-switching-to-the-Nextcloud-client/2537 ref]
 
 
''Note:''
 
 
* The default {{file|/etc/ownCloud/sync-exclude.lst}} may be slightly different to {{file|/etc/Nextcloud/sync-exclude.lst}}
 
* If upgrading from client 1.x at the same time as upgrading Mageia from 5 to 6: To ease the procedure uninstall ownCloud client in Mageia 5 before upgrading to Mageia 6, then install Nextcloud client and execute as below
 
 
'''Migrate'''
 
* Make sure ownCloud client is stopped
 
* Start Nextcloud client - and close it right when the wizard asks for the server etc. Then issue:
 
 
{{cmd|cp -f ~/.local/share/data/ownCloud/ownCloud.cfg ~/.local/share/data/Nextcloud/Nextcloud.cfg}}<br>
 
{{cmd|cp ~/.local/share/data/ownCloud/sync-exclude.lst ~/.local/share/data/Nextcloud/}}
 
* Start the Nextcloud client, enter passwords.
 
 
==Mise à niveau.==
 
{{dragons-fr|* ownCloud et Nextcloud '''ne supportent pas le saut d’une version x.x'''', et la migration vers Nextcloud devrait se faire de manière optimale sur une version similaire, vous devez donc effectuer la PREMIERE itération à travers toutes les mises à jour de ownCloud et ensuite Nextcloud 10 dans Core_backports de Mageia 5, avant de passer à Mageia 6 !
 
* Avant de commencer la mise à jour de Mageia 5 vers Mageia 6, une attention toute particulière doit être prise – voir le point 5 sous la procédure ci-dessous !
 
* Certaines mises à jour de version nécessitent une intervention manuelle précise.
 
* Certaines applications dans ownCloud/Nextcloud nécessitent une attention particulière.
 
* La rétrogradation n'est pas prise en charge et risque de corrompre vos données.}}
 
 
'''In Mageia 5,''' first minor versions updates (x.x.x) up to 8.0.15 is update repository. They after package update only require a user click in the web interface to initiate the actual update. Upgrades to '''major versions are in core backports repo: ownCloud 8.1.10, 8.2.8, 9.0.9, 9.1.5 and Nextcloud 10.0.5''' because they require more manual interaction,''' Do read''' [[#PROCEDURE]] and [[#General]] below !
 
 
'''Mageia 6''' have a Nextcloud 11 version in release repository, and Nextcloud 12 in updates. - They too require special care, so read on;
 
 
===Autre solution de rechange.===
 
Uninstall ownCloud, delete all its files and database, and then do a full fresh install of latest available Nextcloud (check in core_backports repo) and configure it and users from scratch and upload data from scratch.  Some apps such as address book and calendar support exporting data can be imported by a later version.
 
 
===PROCEDURE.===
 
# Do read [[#General]] below!
 
# Inform users there will be a pause in service due to upgrades.
 
# Take full backups of data, database, settings files.  Stop the server (Apache) during this for best quality, alternatively use [[#Maintenance mode]].
 
# '''For each version:'''
 
## IMPORTANT: Read documentation about if something specific need be done for that version, see [[#Per version]] below.
 
## In the Web UI, disable all apps (logged in as admin, i.e http://localhost/ownCloud/index.php/settings/apps)
 
## If you are up to ''migrating'' ownCloud to Nextcloud, execute [[#Migrating OC->NC]] instead of this point.  If ''upgrading'' (ownCloud to ownCloud, or Nextcloud to Nextcloud): Just install the update rpm; (urpmi thenextversion) - it seems there is no need to stop the server/Apache for this.
 
## Surf to the Web UI, and initiate the upgrade.  It will report the progress and any severe error.  You may alternatively use [[#The occ command line]]
 
## Check errors, see [[#Checking the setup]], begin with the built-in checks on admin page and see the log there.
 
## Check your configuration files (see [[#General upgrading cautions]])
 
## Enable apps the same way you disabled them.  Some may when you enable them pop up a dialogue saying they need an update, some of them ask to update automatically and can do so.
 
## Test file syncing though clients, and if your apps works, and again check server logs for any problems.
 
## Take another backup? (at least after the last update when all is checked OK).
 
## Repeat from sub-paragraph 1 until you have the desired server running;
 
# Only when you run Nextcloud 10, it is possible to upgrade Mageia5 to Mageia 6, but before upgrading Mageia:
 
#* Disable all plugins - because upgrading to Mageia 6 also brings new Nextcloud version!
 
#* Add the line /^Nextcloud/ to /etc/urpmi/skip.list - to avoid updating to NC12 which is in updates.
 
# '''Then''' upgrade to Mageia 6, and then
 
## Perform all Mageia 6 updates.
 
## Remove the line /^Nextcloud/ from /etc/urpmi/skip.list, and manually select to install Nextcloud 11 (not 12!).
 
## Follow previous procedure continuing at initiating the upgrade in the Web UI.
 
## When Nextcloud 11 is running OK, perform system update - getting Nextcloud 12, perform actions described at [[#Nextcloud_12]] and again perform the procedure.
 
 
====Effectuer la migration OC->NC.====
 
Execute this section only when you are moving from ownCloud to Nextcloud, and do it instead of just installing the upgrade rpm in that point in [[#PROCEDURE]] above.
 
 
The Mageia Nextcloud rpm imports configuration from ownCloud (replacing its name), but there may be additional configuration you need to think of in your specific case.
 
 
# Stop ownCloud (really Apache and all services it run...) : Issue {{cmd|systemctl stop httpd.service}}
 
# Install Nextcloud rpm, it will replace the ownCloud one. (httpd is still off)  - Details:
 
## Main folder: ownCloud used {{file|/usr/share/ownCloud/}} -- now Nextcloud use {{file|/usr/share/Nextcloud/}}  -- Here is the bulk of ownCloud (Nextcloud) program, including themes and settings which some users may want to move along with some edits, and the apps folder and more...  /.htaccess contain just the OC/NC version number.  For simplest case: no need to do anything.
 
## The original {{file|/etc/httpd/conf/sites.d/Nextcloud.conf}} from its rpm is made identical to the old {{file|/etc/httpd/conf/sites.d/ownCloud.conf}} from ownCloud rpm - *except* that all instances of "ownCloud" is replaced by "Nextcloud".  That is exactly what we want, and we let it use the new file from Nextcloud rpm as it is = no need to do anything. - ''BUT'' if you have tweaked the ownCloud version: make sure you tweak this the same way.
 
## If the Mageia Nextcloud package install script detects that ownCloud used {{file|/var/lib/ownCloud/}} (linked from {{file|/usr/share/ownCloud/data}}), it in config set pointer to {{file|/var/lib/ownCloud/}} so data at the same location is still used.  It still create {{file|/var/lib/Nextcloud/}} even if it is not used.
 
# Issue: {{cmd|systemctl start httpd.service}}
 
 
... and continue in [[#PROCEDURE]] from the point after where you jumped here.
 
 
''Nextcloud may show that there exists an upgrade and suggest to run the built-in updater to NC 11, but do not do that.''
 
 
=====Attention aux changements de nom et d'URL !=====
 
======Sur le serveur.======
 
* Make sure the [[#Background jobs]] run. ( Cron: program name / Webcron: URL )
 
 
======Tous les clients.======
 
* Clients now need to connect to /serverIP/Nextcloud/ instead of /serverIP/ownCloud/
 
: ''Easiest way to achieve this is to edit the "/url=http..." line(s) in {{file|~/.local/share/data/Nextcloud/Nextcloud.cfg}} while client is shut down.''
 
* Old given share links have changed URLs
 
* Implications on established Federated cloud sharing (sharing between ownCloud/Nextcloud servers) and i guess also connections to other sharing (i.e Dropbox) 
 
''Alternatively to above points maybe a trick like this can be adapted to Mageia? https://help.Nextcloud.com/t/desktop-client-cannot-find-ownCloud-status-php/4756/8''
 
 
===Précautions générales relatives à la mise à niveau.===
 
* Upstream recommends to '''never to skip an update, especially major updates''' 8.0.x -> 8.1.x -> 8.2.x -> 9.0.x -> 9.1.x as there may be large changes. ''(Make sure not to jump i.e 8.0 to 8.2 or 8.1 to 9.x ; you may need to select rpm manually not to get too big jumps!)''
 
 
* Generally, update to next major release from a late point release
 
:* For Mageia 5: first make sure you have upgraded to 8.0.15 (last version we have in 8.0 series) in normal updates before updating to 8.1.x.
 
 
* Generally update to a late point release. ''History have shown upgrades & migration bugs/improvements.''
 
 
* '''Downgrading is not supported''' and is likely to corrupt data.
 
 
* '''Do read the release notes first''' for all major upgrades, i.e https://doc.ownCloud.org/server/8.2/admin_manual/release_notes.html , https://doc.ownCloud.org/server/9.0/admin_manual/maintenance/upgrade.html and similar for different versions.
 
 
* '''Upgrading is disruptive.''' Your ownCloud server will be put into maintenance mode, so your users will be locked out until the upgrade is completed. To complete the upgrade surf to the web interface and see instruction there.
 
 
*'''Disable applications''' before each upgrade! -- And after '''each upgrade re-enables them and check''' that they work. They may need '''update''', automatic (they tell when you enable them) or not.  Also, check logs.
 
 
:* Third-party apps: Any apps that are not developed by ownCloud show a 3rd party designation. Third-party apps are considered to be more problematic for upgrading, so the above tip to disable them before each upgrade and enable, upgrade and test them after each upgrade is very important.
 
 
* It is generally a good idea to after any upgrade '''check your configuration files'''.
 
 
:* The '''{{file|.htaccess}} and {{file|index.html}}''' files in the data/ directory '''are now updated after every upgrade'''. - If you make any modifications to these files they will overwritten at upgrade/migration.  - make backups first, like of everything.
 
 
===Précautions générales concernant la migration.===
 
In addition to upgrading cautions:
 
 
* [[#Beware name- and URL changes!]]
 
 
* Migration to Nextcloud is officially only supported for the sibling level version, see https://Nextcloud.com/migration/
 
 
* If you have updated ownCloud point release by other means than Mageia rpm, you may have a higher point release than Nextcloud. [https://help.Nextcloud.com/t/migration-from-ownCloud-9-1-6-to-Nextcloud-10-0-5-fails/13523/14 For late point releases that should not be a problem]; i.e before migrating from ownCloud 9.1.6 to Nextcloud 10.0.5: edit the version in config.php to 9.1.5.1.
 
 
===Par version.===
 
====-> ownCloud 8.1.====
 
Known issues and FAQ https://forum.ownCloud.org/viewtopic.php?f=31&t=29102
 
 
==== -> ownCloud 8.2.====
 
Known issues and FAQ https://forum.ownCloud.org/viewtopic.php?f=36&t=31252
 
 
Transactional file locking is now in the core and replaces the old File Locking app. The File Locking app has been removed from ownCloud in version 8.2.1. If your ownCloud server still has the File Locking app, you must visit your Apps page to verify that it is disabled; the File Locking app and Transactional File Locking cannot both operate at the same time. (from https://doc.ownCloud.org/server/8.2/admin_manual/configuration_files/files_locking_transactional.html )
 
 
====->ownCloud 9.0.====
 
 
Known issues and FAQ https://forum.ownCloud.org/viewtopic.php?f=38&t=33274
 
https://central.ownCloud.org/t/ownCloud-9-0-x-known-issues-faq-and-upgrade-problems/843
 
 
A workaround for the user.ini warning : as root run <code> touch /usr/share/ownCloud/.user.ini </code> , <code> chown apache.apache /usr/share/ownCloud/.user.ini </code>
 
 
'''After upgrading to ownCloud 9.0 and before continuing to upgrade to 9.1''' make sure that all of your and your users '''Calendars and Addressbooks''' are migrated correctly. Especially when using the IMAP user backend (other user backends might be also affected) you need to manually run the mentioned occ migration commands described [https://doc.ownCloud.org/server/9.1/admin_manual/configuration_server/occ_command.html here].
 
 
====-> ownCloud 9.1.====
 
https://doc.ownCloud.org/server/9.1/admin_manual/release_notes.html  A couple items from that link:
 
* IMPORTANT: (Cited from URI above) Removed dav:migrate-calendars and dav:migrate-addressbooks commands for occ. Users planning to upgrade from oC 9.0 or below to oC 9.1 needs to '''make sure that''' their '''Calendars and Adressbooks''' are correctly '''migrated before''' continuing to '''upgrade to 9.1.'''
 
* Symlinks pointing outside of the datadir are disallowed. Please use the Configuring External Storage (GUI) with the Local storage backend instead.
 
* For .user.ini see [[#-> ownCloud 9.0]]
 
 
==== -> Nextcloud 10.====
 
Nextcloud 10 can replace ownCloud 9.1. See [[#General migration cautions]]
 
 
====-> Nextcloud 11.====
 
Nextcloud 11.x is an upgrade of Nextcloud 10.x.  It can *not* replace ownCloud 10.
 
 
====-> Nextcloud 12.====
 
In the works: https://bugs.mageia.org/show_bug.cgi?id=22936
 
 
Changelog: https://Nextcloud.com/changelog/#latest12
 
 
This is an update over Nextcloud 11 with many security fixes. Also, it can upgrade ownCloud 10 if you manually have updated to that.
 
 
On systems running PHP 7, apps will no longer (NC >= 12) be disabled when upgrading. ''( If you upgraded PHP further than Mageia 6 or use Mageia >= 7 )''
 
{{warning| # The database system is now in separate packages. You have to choose manually according to one you are using: Nextcloud-mysql / Nextcloud-postgresql / Nextcloud-sqlite.
 
# The config file has changed, so system administrators will have to edit it manually.}}
 
Our tests showed that it may be enough to add this below at the end of config file:
 
<code>'log_type' => 'syslog',
 
  'datadirectory' => '/var/lib/Nextcloud/data',
 
  'updatechecker' => false,
 
  'check_for_working_htaccess' => false,
 
  'asset-pipeline.enabled' => false,
 
  'assetdirectory' => '/var/lib/Nextcloud',
 
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
 
  'apps_paths' =>
 
  array (
 
    0 =>
 
    array (
 
      'path' => '/usr/share/Nextcloud/apps',
 
      'url' => '/apps',
 
      'writable' => false,
 
    ),
 
    1 =>
 
    array (
 
      'path' => '/var/lib/Nextcloud/apps',
 
      'url' => '/apps-appstore',
 
      'writable' => true,
 
    ),
 
  ), </code>
 
 
====-> Nextcloud 13.====
 
In Cauldron / Mageia 7
 
https://Nextcloud.com/changelog/#latest13
 
 
For optimising, see [https://docs.Nextcloud.com/server/13/admin_manual/maintenance/upgrade.html#manual-steps-during-upgrade| Manual steps during upgrade]. Translated to Mageia this could be (untested):
 
 
su apache
 
php occ maintenance:mode --on  (make sure it is in maintenance mode)
 
php occ db:add-missing-indice
 
php occ db:convert-filecache-bigint
 
php occ maintenance:mode --off  (only if all is ok to run)
 
exit
 
 
==Réglage de la puissance.==
 
Also see https://doc.ownCloud.org/server/9.1/admin_manual/configuration_server/oc_server_tuning.html / https://docs.Nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html
 
 
* [[#Configure the database engine MariaDB]] instead of using SQLite.
 
* Use Cron or Webcron for [[#Background jobs]].
 
* PHP opcode caching and optimisation: Package php-opcache is pulled in as recommended for ownCloud package >= 8.1, and should "just work".  Settings for it is in {{file|/etc/php.ini}}. Some [https://docs.Nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache recommended settings]
 
* PHP data caching: {{cmd|urpmi php-apcu}} and add the line <code> 'memcache.local' => '\OC\Memcache\APCu', </code> inside the $CONFIG = array in {{file|/usr/share/ownCloud/config/config.php}}
 
** APCu settings - if you want to tweak - are in {{file|/etc/php.d/99_apcu.ini}}
 
** For monitoring it you can {{cmd|urpmi php-apcu-admin}}  and go to http://localhost/php-apcu/
 
* No unnecessary modules: Do not install or at ownCloud admin page activate unnecessary modules. Even when not used some may use much RAM.
 
* Logging take some disk and CPU so consider setting logging low in respective settings for ownCloud, PHP, and Apache.
 
* [http://httpd.apache.org/docs/2.4/misc/perf-tuning.html Tuning Apache].  Examples:
 
** In {{file|/etc/httpd/conf/httpd.conf}} you should have an uncommented line <code> EnableSendfile On </code> That way files are sent by kernel instead of Apache = less overhead.  NOTE: if you serve from network mounts set both EnableMMAP off and EnableSendfile off !
 
** See if you find KeepAlive; On or commented out minimize request delays for multiple files.
 
* [https://docs.Nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#using-redis-based-transactional-file-locking Redis-based Transactional File Locking]
 
* [https://docs.Nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#ssl-encryption-app Offload encryption to CPU AES extension]
 
* [https://docs.Nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-http2-for-faster-loading Enable HTTP/2] [https://httpd.apache.org/docs/2.4/howto/http2.html In Apache]
 
* optimize MariaDB/"mysql" settings
 
* PHP7 (coming in Mageia 7?) run more efficient.
 
 
===Travaux en arrière-plan.===
 
There are three options for when background jobs are done. You can choose one of three methods in admin page https://myserver/ownCloud/index.php/settings/admin#backgroundjobs . There you can also see a warning if jobs have not been run for more than one hour and how many hours since.
 
* AJAX (default) : Some job is executed every page load. This is easiest, but may cause excessive server load, or cleaning not being done if no page access is done for long time.
 
* Webcron : register at an external webcron service (for example, https://www.easycron.com/) URL to call: http[s]://<domain-of-your-server>/ownCloud/cron.php
 
* Local cron: To set up a cron job in Mageia for user apache to run ownCloud/cron.php every 15 minute: as root issue  <code>crontab -u apache -e</code> Now you are in vim editor [http://vimdoc.sourceforge.net/htmldoc/usr_02.html#02.2 (help)].  Paste: <code> */15  *  *  *  * php -f /usr/share/ownCloud/cron.php > /dev/null 2>&1 </code>, press ESC and ZZ to exit and write.  It will be automatically used from now on. You can check the file with <code> crontab -u apache -l </code>
 
 
==Questions.==
 
=== Serveur (et son identifiant de connexion sur le Web).===
 
====Se connecter à Internet.====
 
* If you at login window get ''"You are accessing the server from an untrusted domain"'' (you can web search that plus ownCloud), it may be because ownCloud initial setup was done from another address name than it is running.  You can add so you have both "localhost" and the IP of where ownCloud runs in section 'trusted_domains' in {{file|/usr/share/ownCloud/config/config.php}}, like this example:
 
<blockquote>
 
    'trusted_domains' =>
 
<br> array (
 
<br>  0 => 'localhost',
 
<br>  1 => '192.168.0.27',
 
<br> ),
 
</blockquote>
 
A less secure alternative is to remove that whole section.
 
 
====Les autres.====
 
* Clients can not sync, and this error is in logs:  '' PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/pdo_mysql.so' - /usr/lib64/php/extensions/pdo_mysql.so: undefined symbol: pdo_parse_params at Unknown#0 ''<br />
 
Others have found it be due to php version conflicts.  A few got it solved by new php versions.  For me it got solved by uninstalling then reinstalling all php packages, which pulled three more. (during mageia 5 beta 3)
 
 
* Fail to delete file and CPU stay at 100% with mariadb taking almost half. (got that while trying apcu + xcache on OC7) Successful recovery: stop clients sync: delete the containing folder in web ui, move away that folder from clients sync folder, re-enable sync and let it settle OK, then move back the folder on one of the clients, and it shall propagate.
 
 
===Les Clients.===
 
====Stockage des informations d'identification.====
 
When starting at desktop login, on some systems ownCloud client fails to read stored credentials.
 
 
It helps to add a delay, see https://bugs.mageia.org/show_bug.cgi?id=16525
 
 
==Liens pertinents.==
 
===ownCloud.===
 
[https://ownCloud.com/ Page Principale],
 
[https://ownCloud.com/community-enterprise/ Version commerciale]
 
 
[http://doc.ownCloud.org/ Manuals for client and server],
 
[https://ownCloud.org/faq/ FAQ],
 
[https://central.ownCloud.org/ New forum],
 
[http://forum.ownCloud.org Old forum (read-only)]
 
 
[http://forum.ownCloud.org/viewtopic.php?f=9&t=1804 List of resources],
 
[https://wiki.archlinux.org/index.php/ownCloud Arch Linux wiki]
 
 
[https://github.com/ownCloud/ Issue tracker],
 
[https://ownCloud.org/changelog/ Changelog],
 
[https://github.com/ownCloud/core/wiki/Maintenance-and-Release-Schedule Maintenance and Release Schedule]
 
 
===Nextcloud.===
 
[https://Nextcloud.com Main site],
 
[https://Nextcloud.com/enterprise/ Commercial version]
 
 
[https://Nextcloud.com/support/ Main support link page; Manuals etc],
 
[https://help.Nextcloud.com/t/how-to-faq-wiki/ FAQ & How-to wiki], [https://help.Nextcloud.com/ Forum]
 
 
[https://github.com/Nextcloud Issue trackers],
 
[https://Nextcloud.com/changelog/ Changelog],
 
[https://Nextcloud.com/release-channels/ Release channels],
 
[https://github.com/Nextcloud/server/wiki/Maintenance-and-Release-Schedule Maintenance and Release Schedule]
 
 
[https://www.c-rieger.de/Nextcloud-installation-guide-advanced/] ''example for ubuntu, but interesting''
 
 
===MariaDB.===
 
[[MariaDB]] in Mageia wiki, [http://mariadb.com/kb/en/mariadb/getting-installing-and-upgrading-mariadb/ Getting, Installing, and Upgrading MariaDB] at mariadb.com
 
 
===PhpMyAdmin.===
 
A good tool to '''read, manage, backup MariaDB data'''.  Install it, then in a web browser go to https://localhost/phpmyadmin and use the administrative login i.e user root and the password you set.
 
 
info: http://www.phpmyadmin.net  Configuration: {{file|/etc/phpmyadmin/config.inc.php}} ( {{file|config.default.inc.php}} in same folder contain defaults, not supposed to be modified.)
 
 
===Webmin.===
 
'''Another tool for MariaDB''' (Webmin can control many things in a system).  Install it, then in a web browser go to https://localhost:10000/
 
 
Log in as system root, click Servers -> MySQL enter MariaDB administrative login credentials. There is a backup button, and you can also schedule backups. info: http://www.webmin.com
 
 
==Liens de référence.==
 
===Configuration.===
 
* Using/forcing HTTPS on web app with self signed certificates https://forums.mageia.org/en/viewtopic.php?f=8&t=11512&hilit=ownCloud
 
===Script de migration.===
 
Not tested on Mageia (?) and may break further upgrades and other stuff made in accordance with this wiki page, but seem very competent, so you may want to try if manual migration from ownCloud to Nextcloud per above fail: https://Nextcloud.com/migration/
 
===Autres systèmes d'exploitation.===
 
Nextcloud [https://help.Nextcloud.com/t/linux-packages-status/10216 Linux packages status]
 
====Nextcloud sur Raspberry Pi.====
 
* https://help.Nextcloud.com/t/Nextcloud-11-ready-raspbian-image-with-extras/10625
 
* https://help.Nextcloud.com/t/Nextcloud-on-raspberry-pi-3-with-ampache-music-video-streaming/885
 
 
==Annexe.==
 
===Réinstallation exhaustive (force brute).===
 
''À titre de référence, c’est un transfert de mes commandes pour tester la réinstallation de ownCloud''
 
 
'''Soyez prudent et n’exécutez pas sans avoir réfléchi au préalable, à ce qui est correct pour *votre* installation !'''
 
 
Toutes les commandes sont exécutées en tant que root. Certaines peuvent être copiées-collées à plusieurs reprises dans un terminal, d’autres non !
 
 
UNINSTALL: Sauvegarder l'ancienne configuration et les journaux ownCloud et php, le nouveau journal PHP, Supprimer ensuite ownCloud.
 
systemctl stop httpd
 
mv -f /etc/ownCloud/config.php /root/config.php.last_install
 
mv -f /mnt/ownCloud/data/ownCloud.log /root/ownCloud.log.last_install
 
mv -f /var/log/php-errors.log /root/php-errors.log.last_install
 
touch /var/log/php-errors.log
 
chown apache:apache /var/log/php-errors.log
 
urpme ownCloud
 
rm -rf /usr/share/ownCloud/
 
rm -rf /etc/ownCloud/
 
rm -f /etc/httpd/conf/sites.d/ownCloud.conf
 
systemctl start httpd
 
 
STOCKAGE: Stockage des données récentes : (Variante : système de fichiers monté séparément)
 
rm -rf /var/lib/ownCloud/ # le stockage par défaut contient au moins un peu de données inutiles à la première utilisation.
 
rm -rf /mnt/ownCloud/*
 
mkdir /mnt/ownCloud/data
 
mkdir /mnt/ownCloud/tmp
 
chmod -R 770 /mnt/ownCloud
 
chown -R apache:apache /mnt/ownCloud
 
 
BASE DE DONNÉES: Nouvelle base de donnée MariaDB: ( /!\ supprimer toutes les bases de données )
 
systemctl stop mysqld.service
 
urpme mariadb
 
rm -rf /var/lib/mysql/
 
rm -f /etc/my.cnf
 
rm -rf /etc/my.cnf.d/
 
urpmi mariadb
 
systemctl start mysqld
 
mysql_secure_installation
 
mysql -uroot -p
 
  CRÉER LA BASE DE DONNÉES ownCloud;
 
  CRÉER UN COMPTE UTILISATEUR 'ocserver'@'localhost' IDENTIFIED BY 'myp4ssw0rd';
 
  GRANT ALL PRIVILEGES ON ownCloud.* TO 'ocserver'@'localhost' IDENTIFIED BY 'myp4ssw0rd';
 
  quit
 
 
INSTALLATION:
 
urpmi ownCloud-9.0.9
 
touch /usr/share/ownCloud/.user.ini # see heading "-> ownCloud 9.0 "
 
chown apache:apache /usr/share/ownCloud/{config,data,apps,.user.ini}
 
systemctl restart httpd
 
...and goto http://localhost/ownCloud for basic configuring. See other parts of document for security and performance tuning etc.
 
 
=== Faciliter la mise à jour automatique.===
 
Si pour quelque raison que ce soit, vous souhaitez utiliser le dispositif de mise à jour intégré, je l’ai utilisé sur Nextcloud 10 afin que le mécanisme de mise à jour puisse continuer :
 
chown -R apache:apache /usr/share/Nextcloud/
 
chmod -R 770 /usr/share/Nextcloud/
 
rm /usr/share/Nextcloud/resources/config/ca-bundle.crt # soft link to ../../../../../etc/pki/tls/certs/ca-bundle.crt
 
J’ai aussi enlevé le [[#ownCloud test script]].
 
 
Après la mise à jour, tout semble correct, et le contrôle qualité du fichier ne se plaint de rien.
 
 
Pour la mise en production, il est préférable de mieux ajuster la propriété et les droits, et peut-être de rétablir ce lien et le script de test.
 
{{note-fr| # Ci-dessus se trouve un quicky. Pour de plus amples informations et de meilleures conditions, voir [[#permissions sur les fichiers]], et https://help.Nextcloud.com/t/please-help-with-right-permissions-for-nc12/13780/4
 
# La mise à jour de cette manière n’est pas prévue à l’origine par le paquet Mageia. – vous vous débrouillez seul, en ce qui concerne la désinstallation, et n’oubliez pas d’installer un rpm mis à jour, et de prendre des mesures supplémentaires lors de la mise à jour de Mageia vers la prochaine version !}}
 
Une idée pour un script : https://bugs.mageia.org/attachment.cgi?id=9449
 
{{warning-fr|Non testé ! Les erreurs peuvent endommager votre système ! Examinez attentivement le script et adaptez-le à votre système.}}
 

Latest revision as of 08:10, 11 March 2023