diff --git a/install/0.9.7/rhel/mysql-512.cnf b/install/0.9.7/rhel/mysql-512.cnf new file mode 100644 index 000000000..ed1c6b92b --- /dev/null +++ b/install/0.9.7/rhel/mysql-512.cnf @@ -0,0 +1,32 @@ +[mysqld] +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock +user=mysql +symbolic-links=0 +max_connections=70 +max_user_connections=30 +wait_timeout=10 +interactive_timeout=50 +long_query_time=5 +#log-queries-not-using-indexes +#log-slow-queries=/var/log/mysql/log-slow-queries.log + +key_buffer = 16M +myisam_sort_buffer_size = 32M +join_buffer_size=1M +read_buffer_size=1M +sort_buffer_size=2M +table_cache=1024 +thread_cache_size=286 +interactive_timeout=25 +connect_timeout=5 +max_allowed_packet=1M +max_connect_errors=1000 +query_cache_limit=1M +query_cache_size=8M +query_cache_type=1 +tmp_table_size=16M + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid diff --git a/install/vst-install.sh b/install/vst-install.sh index 60f2c2971..08e4e8bb1 100644 --- a/install/vst-install.sh +++ b/install/vst-install.sh @@ -436,7 +436,12 @@ if [ -e '/root/.my.cnf' ]; then mv /root/.my.cnf $vst_backups/mysql/ fi mpass=$(gen_pass) -wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf +server_memory="$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])" +if [ "$server_memory" -gt '1000000' ]; then + wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf +else + wget $CHOST/$VERSION/mysql-512.cnf -O /etc/my.cnf +fi service mysqld start mysqladmin -u root password $mpass echo -e "[client]\npassword='$mpass'\n" >/root/.my.cnf