Nginx 1.5.2 + PHP 5.5.1 + MySQL 5.6.10 compiler installation under CentOS [2013-5-29 11:53 | By banquet] recently configured several Web servers, paste the installation notes. There is no time like before, the article written as the system, please forgive me. Detailed configuration, you can see the previous old article:
Http://blog.zyan.cc/nginx_php_v6
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 libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-deve L zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel Curl curl-devel e2fsprogs E2 Fsprogs-devel krb5 krb5-devel libidn libidn-devel OpenSSL 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 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
MV Mysql-5.6.10-linux-glibc2.5-x86_64/data/apps/mysql
/usr/sbin/groupadd MySQL
/usr/sbin/useradd-g MySQL MySQL
Mkdir-p/data/data/mysql/data
Yum Install Libaio
/data/apps/mysql/scripts/mysql_install_db--basedir=/data/apps/mysql--datadir=/data/data/mysql/data--user=mysql
Sed-i "S#/usr/local/mysql#/data/apps/mysql#g"/data/apps/mysql/bin/mysqld_safe
3. Install PHP Dependency 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 to:
/data/apps/libs/lib
And then:
Ldconfig
Tar 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/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/ Lib64 "
Export Ld_library_path= "/data/apps/mysql/lib/:/lib/:/usr/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--enable-maintainer-zts
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 extensions
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 Find; Extension_dir = "ext"
Add a line after:
Extension = "memcache.so"
Nginx 1.5.2 + PHP 5.5.1 + MySQL 5.6.10 compiler installation under CentOS