#yum groupinstall "Development Tools" "Development Libraries" -y

#yum install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre* -y

#cd  /root

#tar xf pcre-8.37.tar.bz2 -C /usr/local/src/

#tar xf nginx-1.8.0.tar.gz -C /usr/local/src/ 

#cd /usr/local/src/nginx-1.8.0 

# ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/nginx/sbin/nginx --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-pcre=/usr/local/src/pcre-8.37 

#make -j 4 && make install

#useradd -M -s /sbin/nologin nginx

#sed -i '/nobody/a \user nginx nginx;' /usr/local/nginx/conf/nginx.conf

#sed -i 's/index  index.html/index index.php index.html/' /usr/local/nginx/conf/nginx.conf

#sed -i '73 i\location ~ \.php$ {' /usr/local/nginx/conf/nginx.conf

#sed -i '74 i\root    html;' /usr/local/nginx/conf/nginx.conf

#sed -i '75 i\fastcgi_pass   127.0.0.1:9000;' /usr/local/nginx/conf/nginx.conf

#sed -i '76 i\fastcgi_index    index.php;' /usr/local/nginx/conf/nginx.conf

#sed -i '77 i\fastcgi_param    SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;' /usr/local/nginx/conf/nginx.conf

#sed -i '78 i\include    fastcgi_params;' /usr/local/nginx/conf/nginx.conf

#sed -i '79 i\}' /usr/local/nginx/conf/nginx.conf


#/usr/local/nginx/sbin/nginx

#echo /usr/local/nginx/sbin/nginx >> /etc/rc.local


#yum -y install cmake


#yum -y install ncurses-devel

#rpm -qa | grep mysql

#mysql-libs-5.1.71-1.el6.x86_64

#rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64


#cd  /root

#tar xf mysql-5.6.26.tar.gz -C /usr/local/src 

 #cd /usr/local/src/mysql-5.6.26 

 #useradd -M -s /sbin/nologin mysql 

#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 -j 4 && make install


#cd /root

 #chown -R mysql:mysql /usr/local/mysql/

#cp /etc/my.cnf /etc/my.cnf.bak

#rm -rf /etc/my.cnf 

#cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf

#cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

#chmod +x /etc/init.d/mysqld

#chkconfig --add mysqld 

#chkconfig mysqld on

#ln -s /usr/local/mysql/bin/* /bin/


#/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/

#/etc/init.d/mysqld start

#mysql_secure_installation  

#yum install php-pear -y 


#tar xf libmcrypt-2.5.8.tar.bz2 -C /usr/local/src 

#cd /usr/local/src/libmcrypt-2.5.8/ 

#./configure --prefix=/usr/local/libmcrypt && make -j 4 && make install


#yum -y install libxml2-devel libcurl-devel libjpeg-devel libpng-devel freetype freetype-devel


#echo '/usr/local/libmcrypt/lib'>>/etc/ld.so.conf

#echo '/usr/local/mysql/lib'>>/etc/ld.so.conf

#ldconfig 

#echo 'ldconfig' >> /etc/rc.local

#cd  /root

#tar xf php-5.6.13.tar.bz2 -C /usr/local/src/ 

#cd /usr/local/src/php-5.6.13

#./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-mcrypt=/usr/local/libmcrypt 

# make -j 4 && make install

#cp php.ini-production /usr/local/php/php.ini

#cp /usr/local/php/etc/php-fpm.conf.default  /usr/local/php/etc/php-fpm.conf

#sed -i 's/user = nobody/user = nginx/' /usr/local/php/etc/php-fpm.conf

#sed -i 's/group = nobody/group = nginx/' /usr/local/php/etc/php-fpm.conf

#cp /usr/local/src/php-5.6.13/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

#chmod +x /etc/init.d/php-fpm

#chkconfig --add php-fpm

#chkconfig php-fpm on

#/etc/init.d/php-fpm start

#echo "hello php" >> /usr/local/nginx/html/index.php