From c59d3f6f44cd285283d50ba7e4adeff0f6c58158 Mon Sep 17 00:00:00 2001 From: Joerg Deckert Date: Sun, 7 Jul 2019 13:41:16 +0200 Subject: [PATCH] lamp: MariaDB config changes via sed, small world changes --- lamp/Makefile | 7 +- lamp/mariadb/my.cnf | 147 --------------------------------------- lamp/mariadb/my.cnf.orig | 144 -------------------------------------- lamp/package.keywords | 3 + lamp/package.use | 3 +- lamp/world | 2 + 6 files changed, 12 insertions(+), 294 deletions(-) delete mode 100644 lamp/mariadb/my.cnf delete mode 100644 lamp/mariadb/my.cnf.orig diff --git a/lamp/Makefile b/lamp/Makefile index c68e61f..597e3fb 100644 --- a/lamp/Makefile +++ b/lamp/Makefile @@ -28,8 +28,11 @@ postinstall: timesyncd.conf firstboot.start # Beispiel feste IP-Adresse cp 00-eth0.network $(CHROOT)/00-eth0.network.example - # MariaDB-Konfiguration - cp mariadb/my.cnf $(CHROOT)/etc/mysql/my.cnf + # MariaDB-Konfiguration ($$, weil make ein $ entfernt) + echo "s/^character-set-server.*$$/character-set-server = utf8mb4\ncollation-server = utf8mb4_general_ci\ntransaction_isolation = READ-COMMITTED\nbinlog_format = ROW\nexpire_logs_days = 3/" + sed -i "s/^character-set-server.*$$/character-set-server = utf8mb4\ncollation-server = utf8mb4_general_ci\ntransaction_isolation = READ-COMMITTED\nbinlog_format = ROW\nexpire_logs_days = 3/" $(CHROOT)/etc/mysql/my.cnf + sed -i "s/^innodb_file_per_table.*$$/innodb_file_per_table=1\ninnodb_file_format=barracuda\ninnodb_large_prefix=on/" $(CHROOT)/etc/mysql/my.cnf + sed -i "s/default-character-set=utf8/default-character-set=utf8mb4/" $(CHROOT)/etc/mysql/my.cnf cp mariadb/my.cnf.root $(CHROOT)/root/.my.cnf chmod 0600 $(CHROOT)/root/.my.cnf rm -rf $(CHROOT)/var/lib/mysql/* diff --git a/lamp/mariadb/my.cnf b/lamp/mariadb/my.cnf deleted file mode 100644 index 0e91d57..0000000 --- a/lamp/mariadb/my.cnf +++ /dev/null @@ -1,147 +0,0 @@ -# /etc/mysql/my.cnf: The global mysql configuration file. - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=/usr/share/mariadb/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=/usr/share/mariadb/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=/usr/share/mariadb/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=/usr/share/mariadb/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=/usr/share/mariadb/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=/usr/share/mariadb/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=/usr/share/mariadb/charsets - -[myisampack] -character-sets-dir=/usr/share/mariadb/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = /var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = /var/run/mysqld/mysqld.sock -pid-file = /var/run/mysqld/mysqld.pid -log-error = /var/log/mysql/mysqld.err -basedir = /usr -datadir = /var/lib/mysql -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 4M -table_open_cache = 400 -sort_buffer_size = 512K -net_buffer_length = 16K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = /usr/share/mariadb -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -##log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = /tmp/ -#log-update = /path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = /tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 128M -# -# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under /var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = /var/lib/mysql/ -#innodb_log_arch_dir = /var/lib/mysql/ -#innodb_log_group_home_dir = /var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 48M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -# Nextcloud-Empfehlung -log-basename=master -log-bin -binlog-format=mixed - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout - -[mariadb] diff --git a/lamp/mariadb/my.cnf.orig b/lamp/mariadb/my.cnf.orig deleted file mode 100644 index d2cd772..0000000 --- a/lamp/mariadb/my.cnf.orig +++ /dev/null @@ -1,144 +0,0 @@ -# /etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=/usr/share/mysql/charsets - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = /var/run/mysqld/mysqld.sock -pid-file = /var/run/mysqld/mysqld.pid -log-error = /var/log/mysql/mysqld.err -basedir = /usr -datadir = /var/lib/mysql -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 4M -table_open_cache = 400 -sort_buffer_size = 512K -net_buffer_length = 16K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = /usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -##log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = /tmp/ -#log-update = /path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = /tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 128M -# -# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under /var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = /var/lib/mysql/ -#innodb_log_arch_dir = /var/lib/mysql/ -#innodb_log_group_home_dir = /var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 48M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -# Nextcloud-Empfehlung -log-basename=master -log-bin -binlog-format=mixed - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout - -[mariadb] diff --git a/lamp/package.keywords b/lamp/package.keywords index b3ed5aa..532d83c 100644 --- a/lamp/package.keywords +++ b/lamp/package.keywords @@ -2,6 +2,9 @@ app-emulation/open-vm-tools ~amd64 ~x86 sys-auth/pam_ssh_agent_auth ~amd64 ~x86 +# MySQL +dev-db/mariadb ~amd64 ~x86 + # GeoIP dev-php/maxmind-db-reader ~amd64 ~x86 diff --git a/lamp/package.use b/lamp/package.use index 34c8a69..8c51e19 100644 --- a/lamp/package.use +++ b/lamp/package.use @@ -24,5 +24,6 @@ dev-php/maxmind-db-reader extension # LAMP app-eselect/eselect-php apache2 fpm -dev-lang/php apache2 bcmath curl exif gd imap intl ldap ldap-sasl mysql mysqli pdo sockets sqlite sysvipc truetype xmlreader xmlrpc xmlwriter zip +dev-lang/php apache2 bcmath curl exif gd imap intl ldap ldap-sasl mysql mysqli pdo sockets sqlite sysvipc truetype unicode xmlreader xmlrpc xmlwriter zip +media-gfx/imagemagick -openmp www-servers/apache apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_connect apache2_modules_proxy_http apache2_modules_proxy_wstunnel diff --git a/lamp/world b/lamp/world index 7aa807d..c203445 100644 --- a/lamp/world +++ b/lamp/world @@ -5,6 +5,7 @@ app-misc/mc app-misc/screenservice net-analyzer/zabbix sys-auth/pam_ssh_agent_auth +sys-fs/mdadm sys-power/acpid app-crypt/certbot-apache dev-db/mariadb @@ -12,5 +13,6 @@ dev-db/phpmyadmin dev-libs/libmaxminddb dev-php/maxmind-db-reader dev-php/pecl-apcu +dev-php/pecl-imagick net-misc/geoipupdate www-servers/apache