From d87c347e3ebd2309a78ce48626ddbf1558cd1f0f Mon Sep 17 00:00:00 2001 From: "rieger::CLOUD" Date: Thu, 26 Jul 2018 12:12:44 +0200 Subject: [PATCH 1/2] MariaDB 10.3.8 --- install-nextcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-nextcloud.sh b/install-nextcloud.sh index 8e403c8..fa68e99 100644 --- a/install-nextcloud.sh +++ b/install-nextcloud.sh @@ -36,7 +36,7 @@ clear echo "" echo "*********************************************************" echo "You will be asked to set the MariaDB root password twice." -echo " " +echo "" echo "Please just confirm the dialogue (ENTER)." echo "You will be asked again to set the root pwd" echo "while harden your MariaDB Server!" From 3b24f14081650d4bd630e1e986c9f662e60ff62f Mon Sep 17 00:00:00 2001 From: "rieger::CLOUD" Date: Thu, 26 Jul 2018 12:14:15 +0200 Subject: [PATCH 2/2] MariaDB 10.3.8 ARM64 --- install-nextcloudARM64.sh | 125 ++++++++++++++++++++++++++++++-------- 1 file changed, 100 insertions(+), 25 deletions(-) diff --git a/install-nextcloudARM64.sh b/install-nextcloudARM64.sh index 6e967f3..4ace321 100644 --- a/install-nextcloudARM64.sh +++ b/install-nextcloudARM64.sh @@ -30,6 +30,23 @@ sudo -u www-data php /var/www/nextcloud/occ files:scan-app-data fail2ban-client status nextcloud ufw status verbose } +###global function to show information regarding the upcoming MariaDB dialogue +function mariadbinfo() { +clear +echo "" +echo "*********************************************************" +echo "You will be asked to set the MariaDB root password twice." +echo "" +echo "Please just confirm the dialogue (ENTER)." +echo "You will be asked again to set the root pwd" +echo "while harden your MariaDB Server!" +echo "*********************************************************" +echo "" +echo "Press ENTER to install MariaDB" +read +clear +} +### START ### cd /usr/local/src update_and_clean ###prepare the server environment @@ -189,44 +206,102 @@ mount -a service php7.2-fpm restart service nginx restart ###install MariaDB -apt install mariadb-server -y +apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 +if [ ! -f /etc/apt/sources.list.d/mariadb.list ]; then +cat < /etc/apt/sources.list.d/mariadb.list +deb [arch=arm64] 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 +apt update && apt install mariadb-server -y +/usr/sbin/service mysql stop ###configure MariaDB mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak -touch /etc/mysql/my.cnf cat </etc/mysql/my.cnf -[server] +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock +default-character-set = utf8mb4 + +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc_messages_dir = /usr/share/mysql +lc_messages = en_US +skip-external-locking skip-name-resolve -innodb_buffer_pool_size = 128M +bind-address = 127.0.0.1 +max_connections = 200 +connect_timeout = 5 +wait_timeout = 600 +max_allowed_packet = 16M +thread_cache_size = 128 +sort_buffer_size = 4M +bulk_insert_buffer_size = 16M +tmp_table_size = 64M +max_heap_table_size = 64M +myisam_recover_options = BACKUP +key_buffer_size = 128M +#open-files-limit = 2000 +table_open_cache = 400 +myisam_sort_buffer_size = 512M +concurrent_insert = 2 +read_buffer_size = 2M +read_rnd_buffer_size = 1M +query_cache_limit = 2M +query_cache_size = 64M +query_cache_type = 1 +query_cache_min_res_unit = 2k +log_warnings = 2 +slow_query_log_file = /var/log/mysql/mariadb-slow.log +long_query_time = 1 +log_slow_verbosity = query_plan +slow-query-log = 1 +slow-query-log-file = /var/log/mysql/slow.log +log_bin = /var/log/mysql/mariadb-bin +log_bin_index = /var/log/mysql/mariadb-bin.index +expire_logs_days = 10 +max_binlog_size = 100M +default_storage_engine = InnoDB +innodb_buffer_pool_size = 256M innodb_buffer_pool_instances = 1 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 32M innodb_max_dirty_pages_pct = 90 -query_cache_type = 1 -query_cache_limit = 2M -query_cache_min_res_unit = 2k -query_cache_size = 64M -tmp_table_size= 64M -max_heap_table_size= 64M -slow-query-log = 1 -slow-query-log-file = /var/log/mysql/slow.log -long_query_time = 1 - -[client-server] -!includedir /etc/mysql/conf.d/ -!includedir /etc/mysql/mariadb.conf.d/ - -[client] -default-character-set = utf8mb4 - -[mysqld] +innodb_file_per_table = 1 +innodb_open_files = 400 +innodb_io_capacity = 400 +innodb_flush_method = O_DIRECT character-set-server = utf8mb4 collation-server = utf8mb4_general_ci transaction_isolation = READ-COMMITTED binlog_format = ROW -innodb_large_prefix=on -innodb_file_format=barracuda -innodb_file_per_table=1 + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +#no-auto-rehash # faster start of mysql but no tab completion + +[isamchk] +key_buffer = 16M + +!include /etc/mysql/mariadb.cnf +!includedir /etc/mysql/conf.d/ EOF +/usr/sbin/service mysql restart clear echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo "The Nextcloud-DB username and password - Attention: password is case-sensitive:"