NextCloud Installation Q & A

  • Sorry, maybe it wasn't clear. You can and probably should increase the max children if you are seeing that message in the logs. You probably have some idea how much RAM your system uses on average, subtract that from the total and as per the linked blog above ps -ylC php-fpm --sort:rss when you are seeing that message in the logs.


    Then take your adjusted total RAM (Total subtract average system use) in MB and divide it by the average RSS value of the output from above command. This yields a number you could enter into max_children. You can and should use a conservative value for your adjusted total RAM, because you don't want to end up making the box swap.


    Another, possibly simpler method, is to just incrementally increase the max children until you stop seeing that message in your logs.


    Your choice. If I set up a web server, say, I try to think, I will dedicate X RAM to the underlying OS, X RAM for mariadb or whatever datastore, X RAM for PHP, X RAM for varnish caching, X RAM for nginx and so on. So the first method will give you a somewhat better idea of how your box *should* generally run, the second is probably going to be ok for personal use too.

  • Check average memory usage by PHP-FPM:


    ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • Hello,


    I have no news about this message: failed to open stream: Input\/output error at \/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/1.4.3","version":"12.0.0.29"}


    How please resolve this?


    Envoyé de mon SM-G935F en utilisant Tapatalk

  • Nextcloud v12.0.1 fixed several issues such as theme not loading...


    https://download.nextcloud.com…ases/nextcloud-12.0.1.zip


    Changelog: https://nextcloud.com/changelog/

    it works with the web-updater too. No problems with my updateprocess.

    omv 6.x | 64 bit | omvextrasorg 6.x |
    used plugins: omv-extras | portainer | rsnapshot | antivirus
    used container: portainer/portainer | nextcloud/all-in-one | linuxserver/swag | paperless-ngx | jellyfin/jellyfin | lmscommunity/logitechmediaserver | adguard/adguardhome |

  • Update notification is again under delayed distribution? Does the "beta-trick" still work?

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Update notification is again under delayed distribution? Does the "beta-trick" still work?

    I dont need the "beta trick". This time it found the version in a "stable" channel.

    omv 6.x | 64 bit | omvextrasorg 6.x |
    used plugins: omv-extras | portainer | rsnapshot | antivirus
    used container: portainer/portainer | nextcloud/all-in-one | linuxserver/swag | paperless-ngx | jellyfin/jellyfin | lmscommunity/logitechmediaserver | adguard/adguardhome |

  • My setup shows no update up till now. Since my users upload some vaccation pictures and videos right now, I do not want to interrupt today and tomorrow anyways ...


    Still, would be nice to patch soon.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Later that day the update option appeared. I applied it, works like a charm. I did not have to change release channel.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Hi,


    This is a step-by-step method to install NextCloud 12, with MariaDB instead of MySQL, on the same computer as OMV 3.x. I haven't invented something but I have spent time to read forums and installation manuals.
    My level in Linux is low (2/5). You should obtain easily something running. For the first time try with a Virtualbox VM for example.


    1) First of all, install OMV 3.x
    We assume the host name is "mynas00".
    Create a self signed SSL certificate directly in OMV.


    2) Install the OMV-Extra plugin repositories
    Guide


    3) Install the Nginx plugin for OpenMediaVault


    4) Install MariaDB
    4.1) Default installation
    Click this link.
    Choose Distribuition Debian, Release Jessy, Version Last stable, finally choose a mirror. Then all instructions are described.
    Open a terminal and connect with "root" account.
    After this step the DB is already running with a default configuration. It has to be changed a bit for Nextcloud.


    4.2) Stop the new DB system
    systemctl stop mysqld


    4.3) Change default DB data location
    By defaut the data are located in the directory /var/lib/mysql. We can move them to a directory of a disk managed by OMV.
    They are mounted in the directory /srv.


    # copy /var/lib/mysql files to a new directory mysql under /srv/dev-disk-by-label-DATA00
    rsync -av /var/lib/mysql /srv/dev-disk-by-label-DATA00/


    A new directory "mysql" under /srv/dev-disk-by-label-DATA00/ contains the same files than /var/lib/mysql.


    # Delete default directory
    rm -Rf /var/lib/mysql


    We must now change the MariaDB configuration file /etc/mysql/my.cnf. Locate the line "datadir" in the section [mysqld]. Replace /var/lib/mysql by /srv/dev-disk-by-label-DATA00/mysql.


    4.4) Other changes in MariaDB configuration file
    Insert following lines in the section [mysqld]


    # Out of the box MariaDB is autocommit = 1
    autocommit = 0
    transaction-isolation = READ-COMMITTED
    # to fix issue https://github.com/nextcloud/server/issues/5501
    innodb_file_format=barracuda
    innodb_large_prefix=1
    innodb_file_per_table=1


    4.5) Restart the DB system
    systemctl start mysqld


    4.6) Create the NextCloud DB
    To avoid some troubles during the NextCloud installation (see below in 5.7), I had to create manually a DB user and the nextcloud DB.



    4.7) install pdo extension for PHP
    apt-get install php5-mysqlnd


    At this level you should have a MariaDB running ready for NextCloud. You may make a snapshot of your system in case of issue during the next steps.


    5) Install Nextcloud
    The following steps reference steps in the tinh_x7's Nextcloud Installation Guide. Many thanks to tinh_x7 and forum contributors.


    5.1) Install additional PHP packages (cf. step 1.a)
    apt-get install php5-curl php5-gd redis-server php5-redis


    Other functionnalities may be already installed if you install debian 8 manually (wget unzip zip).


    5.2) Create a directory for the web application nextcloud (cf. step 1.c and 1.d)
    Create an OMV share folder named "www", then an other share folder named "nexcloud" under "www".
    Make sure to apply relevant access rights in the ACL. Rather than "root" I set user "www-data". It seems it avoids a "Bad Gatheway" error later.


    5.3) Create a pool in Ngnix (websites) plugin (cf. step 1.e).


    5.4) Create a server in Ngnix (websites) plugin (cf. step 1.f)
    You must use http and https ports different for nextcloud than those of OMV WebGUI (80 and 443 by default).
    Parameters



    5.5 ) In the tab Settings of Ngnix (websites) plugin
    set Enable on then Save.


    5.6) Download and unzip NextCloud installer
    Check the last stable version e.g. 12.0.2


    # Install zip/unzip to uncompress the installer.
    apt-get install zip unzip


    # Goto the "www" directory created in step 5.2
    cd /srv/dev-disk-by-label-DATA00/www


    # Download the zip file corresponding to the last version
    wget https://download.nextcloud.com/server/releases/nextcloud-12.0.2.zip


    # Uncompress the zipfile directly in the "nextcloud" directory created in step 5.2
    unzip nextcloud-12.0.2.zip


    # Set the owner and group to the new files in "nexcloud" directory
    chown -R www-data:www-data nextcloud


    # Delete the zip file
    rm nextcloud-12.0.2.zip


    5.7) Run the installer
    From your browser you can use your host name "http://mynas00:8080" or your local IP address "http://192.168.x.y:8080".
    You will have several warning or error messages. We will fix them.


    5.8) Manual configuration


    5.8.1) Update the file config.php


    It is the file /srv/dev-disk-by-label-DATA00/www/nextcloud/config/config.php.



    5.8.2) Update the file php.ini


    It is the file /etc/php5/fpm/php.ini


    5.8.3) Set strong permissions for NextCloud (cf. step 11)
    Beware this prevent future update process.


    Before the next update you should do :
    chown -R www-data:www-data nextcloud


    After the update rerun the strong permission script.


    That's it. Restart your server then you should enjoy Nextcloud and its applications like calendar and contacts.

  • How is the perform wise for MariaDB vs MySQL?


    Ensure you install zip/unzip before unzip the zip file: apt-get install zip unzip




    # Delete the zip file
    rm nextcloud-12.0.1.zip

    This line should be: rm nextcloud-12.0.2.zip



    5.8.3) Set strong permissions for NextCloud (cf. step 11)
    Beware this prevent future update process. Before the next update you must open the access rights then update and finally reapply strong permissions.

    Do this before you upgrade to the new version: chown -R www-data:www-data nextcloud
    Then rerun the strong-permission script.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    4 Mal editiert, zuletzt von tinh_x7 ()

  • mariadb is generally regarded to be a significantly more lightweight and performant option than mysql, it is also not an oracle product. ;)


    as a drop-in replacement for mysql you ought to see a slight performance gain. Whether or not it will be perceptible to an end user is pretty questionable, but your machine should be happier.

  • Thank's Tinhx_7. I have updated my post.


    The only reason I use MariaDB is because it is really free and not owned by a big company like Oracle. It is the same reason I use Libreoffice instead of OpenOffice. Drink2go has answered to your question about performance.

  • Hi there. When going to my ip:90 I get 502 Server error. So I went to nginx logs and I saw this line:


    Code
    2017/08/26 13:07:43 [crit] 1254#0: *1 connect() to unix:/var/run/fpm-6311723b-3091-42a6-8576-a2ba08878f2f.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.0.60, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/var/run/fpm-6311723b-3091-42a6-8576-a2ba08878f2f.sock:", host: "192.168.0.100:90", referrer: "http://192.168.0.100:90/"

    I have no idea why nginx thinks there is no .sock file?


    I tried to install nextcloud 12.02 on OMV 3.0 (odroid xu4 build)


    Any help appreciated.

  • I don't use Odroid, but double check your Nginx vhost code.
    Ensure set the chown as www-data:www-data for NextCloud folder and test it, before apply the restrictive permission script.


    See this: https://help.nextcloud.com/t/bad-gateway-502-error/2317/4


    https://help.nextcloud.com/t/502-bad-gateway-nginx/19138/7

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    2 Mal editiert, zuletzt von tinh_x7 ()

  • @tinh_x7


    Code
    ls -la /srv/dev-disk-by-label-z2/www/
    drwxr-xr-x   8 frojnd   users     12288 Aug 26 12:30 .
    drwxr-xr-x   5 root     root       4096 Aug 25 12:32 ..
    drwxr-xr-x  14 frojnd   frojnd     4096 Aug 13 10:47 nextcloud
    
    
    ls -la /srv/dev-disk-by-label-z2/www/
    drwxrwsr-x   3 root     users     4096 Aug 25 12:35 .
    drwxr-xr-x   8 frojnd   users    12288 Aug 26 12:30 ..
    drwxrws---+ 14 www-data www-data  4096 Aug 26 12:31 nextcloud


    What did you mean by restrictive permission script?



    @drinks2go No, sock file doesn't exist. I know it's a generic error message that's why I was pasting the log. I don't know how php-fpm works and I was hoping someone would help me out.


    This is nextcloud site nginx conf:


Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!