mirror of
https://github.com/mtan93/install-nextcloud.git
synced 2026-04-04 14:23:12 +01:00
updates to the repositories
made different changes to all the repos (/etc/apt/sources.list)
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
# https://www.c-rieger.de
|
# https://www.c-rieger.de
|
||||||
# https://github.com/riegercloud
|
# https://github.com/riegercloud
|
||||||
# INSTALL-NEXTCLOUD.SH
|
# INSTALL-NEXTCLOUD.SH
|
||||||
# Version 5.0 AMD64
|
# Version 5.1 AMD64
|
||||||
# September, 06th 2018
|
# September, 20th 2018
|
||||||
################################################
|
################################################
|
||||||
# Ubuntu 18.04 LTS AMD64 - Nextcloud 14
|
# Ubuntu 18.04 LTS AMD64 - Nextcloud 14
|
||||||
################################################
|
################################################
|
||||||
@@ -48,17 +48,17 @@ clear
|
|||||||
}
|
}
|
||||||
### START ###
|
### START ###
|
||||||
cd /usr/local/src
|
cd /usr/local/src
|
||||||
update_and_clean
|
|
||||||
###prepare the server environment
|
###prepare the server environment
|
||||||
|
mv /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||||
|
sed -i '$deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe' /etc/apt/sources.list
|
||||||
|
sed -i '$adeb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe' /etc/apt/sources.list
|
||||||
|
sed -i '$adeb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe' /etc/apt/sources.list
|
||||||
|
sed -i '$adeb http://nginx.org/packages/mainline/ubuntu/ bionic nginx' /etc/apt/sources.list
|
||||||
|
sed -i '$adeb-src http://nginx.org/packages/mainline/ubuntu/ bionic nginx' /etc/apt/sources.list
|
||||||
|
sed -i '$adeb [arch=amd64] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/ubuntu bionic main' /etc/apt/sources.list
|
||||||
|
update_and_clean
|
||||||
apt install software-properties-common zip unzip screen curl git wget ffmpeg libfile-fcntllock-perl -y
|
apt install software-properties-common zip unzip screen curl git wget ffmpeg libfile-fcntllock-perl -y
|
||||||
apt remove nginx nginx-common nginx-full -y --allow-change-held-packages
|
apt remove nginx nginx-common nginx-full -y --allow-change-held-packages
|
||||||
###add the neccessary sources
|
|
||||||
if [ ! -f /etc/apt/sources.list.d/nginx.list ]; then
|
|
||||||
cat <<EOF > /etc/apt/sources.list.d/nginx.list
|
|
||||||
deb http://nginx.org/packages/mainline/ubuntu/ bionic nginx
|
|
||||||
deb-src http://nginx.org/packages/mainline/ubuntu/ bionic nginx
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
if [ ! -f /usr/local/src/nginx_signing.key ]; then
|
if [ ! -f /usr/local/src/nginx_signing.key ]; then
|
||||||
wget http://nginx.org/keys/nginx_signing.key && apt-key add nginx_signing.key
|
wget http://nginx.org/keys/nginx_signing.key && apt-key add nginx_signing.key
|
||||||
fi
|
fi
|
||||||
@@ -113,16 +113,6 @@ mkdir -p /var/nc_data /var/www/letsencrypt /usr/local/tmp/cache /usr/local/tmp/s
|
|||||||
###apply permissions
|
###apply permissions
|
||||||
chown -R www-data:www-data /upload_tmp /var/nc_data /var/www
|
chown -R www-data:www-data /upload_tmp /var/nc_data /var/www
|
||||||
chown -R www-data:root /usr/local/tmp/sessions /usr/local/tmp/cache /usr/local/tmp/apc
|
chown -R www-data:root /usr/local/tmp/sessions /usr/local/tmp/cache /usr/local/tmp/apc
|
||||||
### prepare the environment for PHP
|
|
||||||
if [ ! -f /etc/apt/sources.list.d/php.list ]; then
|
|
||||||
cat <<EOF > /etc/apt/sources.list.d/php.list
|
|
||||||
deb http://de.archive.ubuntu.com/ubuntu bionic main universe
|
|
||||||
EOF
|
|
||||||
apt update
|
|
||||||
fi
|
|
||||||
apt install language-pack-en-base -y
|
|
||||||
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y
|
|
||||||
update_and_clean
|
|
||||||
###install PHP
|
###install PHP
|
||||||
apt install php7.2-fpm php7.2-gd php7.2-mysql php7.2-curl php7.2-xml php7.2-zip php7.2-intl php7.2-mbstring php7.2-json php7.2-bz2 php7.2-ldap php-apcu imagemagick php-imagick -y
|
apt install php7.2-fpm php7.2-gd php7.2-mysql php7.2-curl php7.2-xml php7.2-zip php7.2-intl php7.2-mbstring php7.2-json php7.2-bz2 php7.2-ldap php-apcu imagemagick php-imagick -y
|
||||||
###adjust PHP
|
###adjust PHP
|
||||||
@@ -213,12 +203,6 @@ service php7.2-fpm restart
|
|||||||
service nginx restart
|
service nginx restart
|
||||||
###install MariaDB
|
###install MariaDB
|
||||||
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
|
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
|
||||||
if [ ! -f /etc/apt/sources.list.d/mariadb.list ]; then
|
|
||||||
cat <<EOF > /etc/apt/sources.list.d/mariadb.list
|
|
||||||
deb [arch=amd64] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/ubuntu bionic main
|
|
||||||
deb-src http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/ubuntu bionic main
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
mariadbinfo
|
mariadbinfo
|
||||||
apt update && apt install mariadb-server -y
|
apt update && apt install mariadb-server -y
|
||||||
/usr/sbin/service mysql stop
|
/usr/sbin/service mysql stop
|
||||||
@@ -229,11 +213,9 @@ cat <<EOF >/etc/mysql/my.cnf
|
|||||||
port = 3306
|
port = 3306
|
||||||
socket = /var/run/mysqld/mysqld.sock
|
socket = /var/run/mysqld/mysqld.sock
|
||||||
default-character-set = utf8mb4
|
default-character-set = utf8mb4
|
||||||
|
|
||||||
[mysqld_safe]
|
[mysqld_safe]
|
||||||
socket = /var/run/mysqld/mysqld.sock
|
socket = /var/run/mysqld/mysqld.sock
|
||||||
nice = 0
|
nice = 0
|
||||||
|
|
||||||
[mysqld]
|
[mysqld]
|
||||||
user = mysql
|
user = mysql
|
||||||
pid-file = /var/run/mysqld/mysqld.pid
|
pid-file = /var/run/mysqld/mysqld.pid
|
||||||
@@ -292,18 +274,14 @@ character-set-server = utf8mb4
|
|||||||
collation-server = utf8mb4_general_ci
|
collation-server = utf8mb4_general_ci
|
||||||
transaction_isolation = READ-COMMITTED
|
transaction_isolation = READ-COMMITTED
|
||||||
binlog_format = ROW
|
binlog_format = ROW
|
||||||
|
|
||||||
[mysqldump]
|
[mysqldump]
|
||||||
quick
|
quick
|
||||||
quote-names
|
quote-names
|
||||||
max_allowed_packet = 16M
|
max_allowed_packet = 16M
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
#no-auto-rehash # faster start of mysql but no tab completion
|
#no-auto-rehash # faster start of mysql but no tab completion
|
||||||
|
|
||||||
[isamchk]
|
[isamchk]
|
||||||
key_buffer = 16M
|
key_buffer = 16M
|
||||||
|
|
||||||
!include /etc/mysql/mariadb.cnf
|
!include /etc/mysql/mariadb.cnf
|
||||||
!includedir /etc/mysql/conf.d/
|
!includedir /etc/mysql/conf.d/
|
||||||
EOF
|
EOF
|
||||||
@@ -555,7 +533,7 @@ sudo -u www-data php /var/www/nextcloud/occ background:cron
|
|||||||
sed -i '/);/d' /var/www/nextcloud/config/config.php
|
sed -i '/);/d' /var/www/nextcloud/config/config.php
|
||||||
cat <<EOF >>/var/www/nextcloud/config/config.php
|
cat <<EOF >>/var/www/nextcloud/config/config.php
|
||||||
'activity_expire_days' => 14,
|
'activity_expire_days' => 14,
|
||||||
'auth.bruteforce.protection.enabled' => true,
|
'auth.bruteforce.protection.enabled' => false,
|
||||||
'blacklisted_files' =>
|
'blacklisted_files' =>
|
||||||
array (
|
array (
|
||||||
0 => '.htaccess',
|
0 => '.htaccess',
|
||||||
|
|||||||
Reference in New Issue
Block a user