From 6d41024a76279944ac4514df732e80b2baefbaf5 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Mon, 29 Oct 2018 13:26:53 +0100 Subject: [PATCH] better mysql config --- assets/mysql/innodb-file-per-table.cnf | 11 +++++++++++ bin/lemp.sh | 3 +++ bin/misc.sh | 5 +++++ 3 files changed, 19 insertions(+) create mode 100644 assets/mysql/innodb-file-per-table.cnf diff --git a/assets/mysql/innodb-file-per-table.cnf b/assets/mysql/innodb-file-per-table.cnf new file mode 100644 index 0000000..6dbd5cd --- /dev/null +++ b/assets/mysql/innodb-file-per-table.cnf @@ -0,0 +1,11 @@ +# Use one file by InnoDB table. +# Use Barracuda as InnoDB engine. +# Allow InnoDB large indexs. +# Use Dynamic row format. +# Reduce disk usage, ease disk space reclaiming. +[mysqld] +innodb_file_per_table = 1 +innodb_file_format=Barracuda +innodb_large_prefix=1 +; Option below only for MariaDB 10.2 +;innodb_default_row_format=DYNAMIC diff --git a/bin/lemp.sh b/bin/lemp.sh index d68b3ca..976fa3d 100755 --- a/bin/lemp.sh +++ b/bin/lemp.sh @@ -41,6 +41,9 @@ echo -e "\033[35;1minstalling Mysql \033[0m" sleep 3 apt-get --yes --force-yes install mariadb-server mysql_secure_installation + +cp "$_assets"/mysql/innodb-file-per-table.cnf /etc/mysql/conf.d/ + systemctl enable mariadb.service systemctl restart mariadb.service echo -e "\033[92;1mmysql installed\033[Om" diff --git a/bin/misc.sh b/bin/misc.sh index 2e2d2dc..06a8f2c 100755 --- a/bin/misc.sh +++ b/bin/misc.sh @@ -22,4 +22,9 @@ apt-get --yes --force-yes install ntp dpkg-reconfigure tzdata apt-get --yes --force-yes install tmux etckeeper needrestart +# TODO cron +# https://askubuntu.com/questions/56683/where-is-the-cron-crontab-log/121560#121560 + + + echo -e "\033[92;1mMisc done \033[Om"