#mysql install
cd /usr/local/src
tar zxvf mysql-5.6.16.tar.gz
cd mysql-5.6.16
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1
-DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/usr/local/mysql/data -DMYSQL_USER=mysql
make && make install
wget http://www.cpan.org/modules/by-module/Data/Data-Dumper-2.154.tar.gz
tar zxvf Data-Dumper-2.154.tar.gz
cd Data-Dumper-2.154
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
perl Makefile.PL
make && make install
groupadd mysql
useradd -r -g mysql mysql
cd /usr/local/mysql
chown -R mysql:mysql .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
#替换配置文件
cp /usr/local/src/my.cnf /etc/my.cnf
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
service mysql start
ln -s /usr/local/mysql/bin/mysql /usr/bin/
#nginx 编译
cd /usr/local/src/
tar zxvf zlib-1.2.8
cd zlib-1.2.8
./configure
make && make install