mirror of
https://github.com/mtan93/install-nextcloud.git
synced 2026-03-15 05:10:56 +00:00
Ready 4 Ubuntu 18.04 LTS
v. 2 works with Ubuntu 16.04.4 LTS and 18.04 LTS
This commit is contained in:
@@ -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 <<EOF >/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 <<EOF
|
||||
redis-cli <<EOF
|
||||
FLUSHALL
|
||||
quit
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user