mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
Mysql aio fix for OpenVZ
This commit is contained in:
parent
7c584b9ade
commit
a93db641c7
3 changed files with 12 additions and 2 deletions
|
@ -27,7 +27,7 @@ query_cache_size=8M
|
||||||
query_cache_type=1
|
query_cache_type=1
|
||||||
tmp_table_size=16M
|
tmp_table_size=16M
|
||||||
|
|
||||||
innodb_use_native_aio = 0
|
#innodb_use_native_aio = 0
|
||||||
innodb_file_per_table
|
innodb_file_per_table
|
||||||
|
|
||||||
[mysqld_safe]
|
[mysqld_safe]
|
||||||
|
|
|
@ -11,6 +11,7 @@ long_query_time=5
|
||||||
#log-queries-not-using-indexes
|
#log-queries-not-using-indexes
|
||||||
#log-slow-queries=/var/log/mysql/log-slow-queries.log
|
#log-slow-queries=/var/log/mysql/log-slow-queries.log
|
||||||
|
|
||||||
|
#innodb_use_native_aio = 0
|
||||||
innodb_file_per_table
|
innodb_file_per_table
|
||||||
|
|
||||||
[mysqld_safe]
|
[mysqld_safe]
|
||||||
|
|
|
@ -21,7 +21,7 @@ software="nginx httpd mod_ssl mod_ruid2 mod_extract_forwarded mod_fcgid
|
||||||
phpMyAdmin awstats webalizer vsftpd mysql mysql-server exim dovecot clamd
|
phpMyAdmin awstats webalizer vsftpd mysql mysql-server exim dovecot clamd
|
||||||
spamassassin curl roundcubemail bind bind-utils bind-libs mc screen ftp
|
spamassassin curl roundcubemail bind bind-utils bind-libs mc screen ftp
|
||||||
libpng libjpeg libmcrypt mhash zip unzip openssl flex rssh libxml2
|
libpng libjpeg libmcrypt mhash zip unzip openssl flex rssh libxml2
|
||||||
ImageMagick sqlite pcre sudo bc jwhois mailx lsof tar telnet rsync sysstat
|
ImageMagick sqlite pcre sudo bc jwhois mailx lsof tar telnet rsync
|
||||||
rrdtool GeoIP freetype ntp openssh-clients vesta vesta-nginx vesta-php"
|
rrdtool GeoIP freetype ntp openssh-clients vesta vesta-nginx vesta-php"
|
||||||
|
|
||||||
|
|
||||||
|
@ -521,6 +521,11 @@ if [ "$srv_type" = 'micro' ]; then
|
||||||
else
|
else
|
||||||
wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf
|
wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Disable aio on OpenVZ
|
||||||
|
if [ -e "/proc/user_beancounters" ]; then
|
||||||
|
sed -i "s/#innodb_use_native_aio/innodb_use_native_aio/g" /etc/my.cnf
|
||||||
|
fi
|
||||||
chkconfig mysqld on
|
chkconfig mysqld on
|
||||||
service mysqld start
|
service mysqld start
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
|
@ -742,6 +747,10 @@ vst_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null)
|
||||||
if [ ! -z "$vst_ip" ] && [ "$vst_ip" != "$main_ip" ]; then
|
if [ ! -z "$vst_ip" ] && [ "$vst_ip" != "$main_ip" ]; then
|
||||||
# Set NAT association
|
# Set NAT association
|
||||||
$VESTA/bin/v-change-sys-ip-nat $main_ip $vst_ip
|
$VESTA/bin/v-change-sys-ip-nat $main_ip $vst_ip
|
||||||
|
|
||||||
|
# Assign passive ip address
|
||||||
|
echo "pasv_address=$vst_ip" >> /etc/vsftpd/vsftpd.conf
|
||||||
|
service vsftpd restart
|
||||||
fi
|
fi
|
||||||
if [ -z "$vst_ip" ]; then
|
if [ -z "$vst_ip" ]; then
|
||||||
vst_ip=$main_ip
|
vst_ip=$main_ip
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue