From 8e6110711210904caa2f5a9b4bb5f614cc4c5315 Mon Sep 17 00:00:00 2001 From: "rieger::CLOUD" Date: Fri, 27 Apr 2018 18:05:45 +0200 Subject: [PATCH] Ready 4 Ubuntu 18.04 LTS v. 2 works with Ubuntu 16.04.4 LTS and 18.04 LTS --- install-nextcloud.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/install-nextcloud.sh b/install-nextcloud.sh index 796e8e3..2ee72c5 100644 --- a/install-nextcloud.sh +++ b/install-nextcloud.sh @@ -3,8 +3,12 @@ # https://www.c-rieger.de # https://github.com/riegercloud # INSTALL-NEXTCLOUD.SH -# Version 1.4 -# April 24th, 2018 +# Version 2.0 +# April 27th, 2018 +####################################################### +# Ubuntu 16.04.4 or Ubuntu 18.04 LTS +####################################################### +# version 2.0: ready for Ubuntu 18.04 LTS 64Bit # version 1.4: merged two scripts # version 1.3: Nextcloud will silently be installed # version 1.2: changed the process of creating the NC @@ -37,7 +41,7 @@ ufw status verbose cd /usr/local/src update_and_clean ###prepare the server environment -apt install software-properties-common python-software-properties zip unzip screen curl ffmpeg libfile-fcntllock-perl -y +apt install software-properties-common zip unzip screen curl ffmpeg libfile-fcntllock-perl -y apt remove nginx nginx-common nginx-full -y --allow-change-held-packages ###add the neccessary sources sed -i '$adeb http://nginx.org/packages/ubuntu/ xenial nginx' /etc/apt/sources.list @@ -260,7 +264,7 @@ sed -i "s/unixsocketperm 700/unixsocketperm 770/" /etc/redis/redis.conf sed -i "s/# maxclients 10000/maxclients 512/" /etc/redis/redis.conf usermod -a -G redis www-data cp /etc/sysctl.conf /etc/sysctl.conf.bak && sed -i '$avm.overcommit_memory = 1' /etc/sysctl.conf -cp /etc/rc.local /etc/rc.local.bak && sed -i '$i \sysctl -w net.core.somaxconn=65535' /etc/rc.local +# cp /etc/rc.local /etc/rc.local.bak && sed -i '$i \sysctl -w net.core.somaxconn=65535' /etc/rc.local ###install self signed certificates apt install ssl-cert -y ###prepare NGINX for Nextcloud and SSL @@ -509,8 +513,8 @@ array ( 'preview_max_scale_factor' => 1, 'redis' => array ( -'host' => '/var/run/redis/redis.sock', -'port' => 0, +'host' => 'localhost', +'port' => 6379, 'timeout' => 0.0, ), 'quota_include_external_storage' => false, @@ -525,7 +529,7 @@ restart_all_services update_and_clean ###installfail2ban apt install fail2ban -y -###create a fail2ban Nextcloud filter +###create a fail2ban Nextcloud filter touch /etc/fail2ban/filter.d/nextcloud.conf cat </etc/fail2ban/filter.d/nextcloud.conf [Definition] @@ -565,7 +569,7 @@ sudo -u www-data php /var/www/nextcloud/occ app:disable survey_client sudo -u www-data php /var/www/nextcloud/occ app:disable firstrunwizard sudo -u www-data php /var/www/nextcloud/occ app:enable admin_audit ###clean up redis-server -redis-cli -s /var/run/redis/redis.sock <