diff --git a/installer.sh b/installer.sh index 4aaab6c..2b5079f 100644 --- a/installer.sh +++ b/installer.sh @@ -2,7 +2,7 @@ sudo sed -i 's/#Port 22/Port 22/' /etc/ssh/sshd_config && \ sudo sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' /etc/ssh/sshd_config && \ sudo sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ sudo service ssh restart && \ -sudo apt install net-tools sudo bzip2 -y && \ +sudo apt install net-tools bzip2 -y && \ sudo apt update && sudo apt upgrade -y && \ sudo apt install lsb-release apt-transport-https ca-certificates -y && \ sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ @@ -17,5 +17,9 @@ sudo sed -i 's/DocumentRoot \/var\/www\/html/DocumentRoot \/var\/www\/nextcloud/ sudo sed -i 's/\/var\/www\//\/var\/www\/nextcloud\//' /etc/apache2/apache2.conf && \ sudo sed -i '//,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf && \ sudo service apache2 restart && \ +sudo sed -i '/\[mysqld]/a innodb_file_per_table=1' /etc/mysql/mariadb.conf.d/50-server.cnf +service mysql restart +mysql -uroot -e "SET GLOBAL innodb_file_format=Barracuda" && \ mysql -uroot -e "CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" && \ -mysql -uroot -e "GRANT ALL PRIVILEGES ON nextcloud.* TO nextcloud@localhost IDENTIFIED BY 'nextcloud'" \ No newline at end of file +mysql -uroot -e "GRANT ALL PRIVILEGES ON nextcloud.* TO nextcloud@localhost IDENTIFIED BY 'nextcloud'" && \ +ip route get 8.8.8.8 | awk '{ print $NF; exit }' \ No newline at end of file