1. Install nginx: mkdir-P/data/tgz
CD/data/tgz
Yum install wget
Yum install PCRE
Yum install OpenSSL *
Yum-y install GCC gcc-C ++ Autoconf libjpeg-devel libpng-devel FreeType-devel libxml2 libxml2-devel zlib-devel glibc-devel glib2 glib2-devel Bzip2 bzip2-devel ncurses- devel curl-devel e2fsprogs e2fsprogs-devel
The krb5 krb5-devel libidn-devel OpenSSL-devel OpenLDAP openldap-devel nss_ldap openldap-clients openldap-servers make
Yum-y install GD GD2 Gd-devel gd2-devel
/Usr/sbin/groupadd WWW
/Usr/sbin/useradd-G WWW
Ulimit-shn 65535
Wget
Ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.32.tar.gz
Tar zxvf pcre-8.32.tar.gz
CD pcre-8.32
./Configure -- prefix =/data/apps/PCRE
Make & make install
CD ../
Wget
Http://nginx.org/download/nginx-1.5.2.tar.gz
Tar zxvf nginx-1.5.2.tar.gz
CD nginx-1.5.2
./Configure -- user = WWW -- group = WWW -- prefix =/data/apps/nginx -- with-http_stub_status_module -- with-http_ssl_module -- With-PCRE =/data/tgz/pcre-8.32 -- with-http_realip_module -- with-http_image_filter_module
Make
Make install
CD ../
2. Install MYSQL: wget
Http://downloads.mysql.com/archives/mysql-5.6/mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
Tar zxvf mysql-5.6.10-linux-glibc2.5-x86_64.tar.gz
Music mysql-5.6.10-linux-glibc2.5-x86_64/data/apps/MySQL
/Usr/sbin/groupadd MySQL
/Usr/sbin/useradd-G MySQL
Mkdir-P/data/MySQL/Data
Yum install libaio
/Data/apps/MySQL/scripts/mysql_install_db -- basedir =/data/apps/MySQL -- datadir =/data/MySQL/data -- user = MySQL
Sed-I "s #/usr/local/MySQL #/data/apps/MySQL # G"/data/apps/MySQL/bin/mysqld_safe
3. Install the PHP dependent library mkdir-P/data/apps/libs/
Wget
Http://www.ijg.org/files/jpegsrc.v9.tar.gz
Tar zxvf jpegsrc.v9.tar.gz
CD jpeg-9/
./Configure -- prefix =/data/apps/Libs -- enable-shared -- enable-static -- prefix =/data/apps/libs
Make
Make install
CD ../
Wget
Http://prdownloads.sourceforge.net/libpng/libpng-1.6.2.tar.gz
Tar zxvf libpng-1.6.2.tar.gz
CD libpng-1.6.2/
./Configure -- prefix =/data/apps/libs
Make
Make install
CD ../
Wget
Http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.gz
Tar zxvf freetype-2.4.12.tar.gz
CD freetype-2.4.12/
./Configure -- prefix =/data/apps/libs
Make
Make install
CD ../
Wget "http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz? Big_mirror = 0"
Wget "http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz? Big_mirror = 0"
Wget "http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz? Big_mirror = 0"
Tar zxvf libmcrypt-2.5.8.tar.gz
CD libmcrypt-2.5.8/
./Configure -- prefix =/data/apps/libs
Make
Make install
CD libltdl/
./Configure -- prefix =/data/apps/Libs -- enable-ltdl-install
Make
Make install
CD ../../
Tar zxvf mhash-0.9.9.9.tar.gz
CD mhash-0.9.9.9/
./Configure -- prefix =/data/apps/libs
Make
Make install
CD ../VI/etc/lD. So. conf
Add:/data/apps/libs/lib
Then: ldconfigtar zxvf mcrypt-2.6.8.tar.gz
CD mcrypt-2.6.8/
Export ldflags = "-l/data/apps/libs/lib-L/usr/lib"
Export cflags = "-I/data/apps/libs/include-I/usr/include"
Touch malloc. h
./Configure -- prefix =/data/apps/Libs -- With-libmcrypt-Prefix =/data/apps/libs
Make
Make install
CD ../
4. Compile and install PHP 5.5 wget
Http://www.php.net/get/php-5.5.1.tar.gz/from/tw2.php.net/mirror
Tar zxvf php-5.5.1.tar.gz
CD php-5.5.1/
Export libs = "-lm-ltermcap-lresolv"
Export dyld_library_path = "/data/apps/MySQL/lib/:/usr/local/lib:/lib64 /: /usr/lib64/:/usr/local/lib64"
Export LD_LIBRARY_PATH = "/data/apps/MySQL/lib/:/usr/local/lib:/lib64 /: /usr/lib64/:/usr/local/lib64"
. /Configure -- prefix =/data/apps/PHP -- With-config-file-Path =/data/apps/PHP/etc -- With-mysql =/data/apps/MySQL -- with-mysqli =/data/apps/MySQL/bin/mysql_config -- With-iconv-dir -- With-FreeType-Dir =/data/apps/Libs -- With-JPEG-Dir = /data/apps/Libs -- With-PNG-Dir =/data/apps/libs
-- 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-mcrypt =/data/apps/Libs -- With-Gd -- enable-Gd-native-TTF
-- With-OpenSSL -- With-mhash -- enable-pcntl -- enable-sockets -- With-XMLRPC -- enable-zip -- enable-soap -- enable-opcache -- With-PDO-MySQL
Make
Make install
Cp php. ini-development/data/apps/PHP/etc/PHP. ini
CD ../
Ln-S/data/apps/MySQL/lib/libmysqlclient.18.dylib/usr/lib/libmysqlclient.18.dylib
MV/data/apps/PHP/etc/php-fpm.conf.default/data/apps/PHP/etc/php-fpm.conf
5. Compile and install PHP extension wget
Http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
Tar zxvf autoconf-latest.tar.gz
CD autoconf-2.69/
./Configure -- prefix =/data/apps/libs
Make
Make install
CD ../
Wget
Http://pecl.php.net/get/memcache-2.2.7.tgz
Tar zxvf memcache-2.2.7.tgz
CD memcache-2.2.7/
Export php_autoconf = "/data/apps/libs/bin/Autoconf"
Export php_autoheader = "/data/apps/libs/bin/autoheader"
/Data/apps/PHP/bin/phpize
./Configure -- With-PHP-Config =/data/apps/PHP/bin/PHP-config
Make
Make install
CD ../
Open/data/apps/PHP/etc/PHP. ini to search; extension_dir = "Ext"
Add a line after it: Extension = "memcache. So"