1、配置yum / epel
2、安装基础环境
yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng libpng-devel libtiff-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel fontconfig-devel zlib zlib-devel libevent-devel gcc gcc-c++ flex bison bzip2-devel libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel
3、建立相关用户、目录,解压安装
#groupadd mysql
#useradd mysql -g mysql
#mkdir -pv /opt/mysql/data
#tar fxz mysql-5.6.22.tar.gz
#cd mysql-5.6.22
#cmake \
-DCMAKE_INSTALL_PREFIX=/opt/mysql \
-DMYSQL_DATADIR=/opt/mysql/data \
-DSYSCONFDIR=/etc \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DMYSQL_UNIX_ADDR=/var/tmp/mysql.sock \
-DMYSQL_TCP_PORT=3306 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci
#make && make install
#rm -f /etc/my.cnf
#mv /opt/mysql/my.cnf /etc/
#cp /opt/mysql/support-files/mysql.server /etc/init.d/mysql
#chkconfig --add mysql
#chkconfig mysql --levels 2345 on
#chown -R mysql.mysql /opt/mysql
#service mysql start
4、sercurity
-A INPUT –m state --state NEW –m tcp –p –dport 22 –j ACCEPT
-A INPUT m state --state NEW m tcp p dport 3306 j ACCEPT