--with-http_ssl_module
--with-http_flv_module
--with-http_stub_status_module
--with-http_gzip_static_module
--http-client-body-temp-path=/var/tmp/nginx/client/
--http-proxy-temp-path=/var/tmp/nginx/proxy/
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
--http-scgi-temp-path=/var/tmp/nginx/scgi
--with-pcre && make && make install
echo -e " 33[32m=========nginx is ok======== 33[0m"
}
function install_mysql {
cd /root
yum -y install cmake bison
useradd -r mysql
tar xf mysql-5.5.33.tar.gz
cd /root/mysql-5.5.33
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/mydata/data -DSYSCONFDIR=/etc
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
make && make install
echo -e " 33[32m=========mysqld is ok======== 33[0m"
}
function config_mysql {
echo -e " 33[32m frist,Associated system path,and Initialization database 33[0m"
cp /usr/local/mysql/support-files/my-large.cnf /etc/my.cnf
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
chown -R root.mysql /usr/local/mysql/
mkdir -pv /mydata/data
chown -R mysql:mysql /mydata/data/
sed -i '/thread_concurrency/a datadir = /mydata/data' /etc/my.cnf
sed -i '/datadir/a innodb_file_per_table = 1' /etc/my.cnf
/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/mydata/data/ --basedir=/usr/local/mysql
service mysqld start
echo "PATH=/usr/local/mysql/bin:$PATH" >/etc/profile.d/mysqld.sh
source /etc/profile.d/mysqld.sh
echo "/usr/local/mysql/lib" >/etc/ld.so.conf.d/mysqld.conf
ldconfig -v | grep mysql
ln -sv /usr/local/mysql/include/ /usr/include/mysqld
chkconfig --add mysqld
chkconfig --level 35 mysqld on
}
function install_php {
yum -y install libxml2-devel bzip2-devel curl-devel libmcrypt-devel mhash-devel
tar xf php-5.4.19.tar.bz2
cd /root/php-5.4.19
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config
--enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr
--enable-xml --enable-sockets --with-apxs2=/usr/local/apache/bin/apxs --with-mcrypt --with-curl
--with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --enable-maintainer-zts
make && make install
echo -e " 33[32m=========php is ok======== 33[0m"
}
function config_php {
cp /root/php-5.4.19/php.ini-production /etc/php.ini
}
function install_php_fpm {
yum -y install libxml2-devel bzip2-devel curl-devel libmcrypt-devel mhash-devel
tar xf php-5.4.19.tar.bz2
cd /root/php-5.4.19








