Yum-y install gcc automake autoconf libtool make CMake
Yum-y install gcc gcc-c++ glibc glibc-devel
Yum-y Install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-deve L LIBXML2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses Ncurses-devel Curl C Url-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel OpenSSL openssl-devel
Tar-xvzf php-5.6.13.tar.gz
CD php-5.6.13
./configure--prefix=/usr/local/php --enable-fpm--with-mcrypt--enable-mbstring--disable-pdo--with-curl- -disable-debug --disable-rpath--enable-inline-optimization--with-bz2 --with-zlib--enable-sockets-- Enable-sysvsem--enable-sysvshm--enable-pcntl--enable-mbregex--with-mhash--enable-zip--with-pcre-regex-- With-mysql--with-mysqli--with-gd--with-jpeg-dir
Make
do test
make install
cd/usr/local/php/
CD/ usr/local/php/etc/
CP php-fpm.conf.default php-fpm.conf
Vim php-fpm.conf
Run PHP-FPM
/usr/local/php/ SBIN/PHP-FPM can be
CD
Tar-xvzf pcre-8.36.tar.gz
tar-xvzf openssl-1.0.2a.tar.gz
tar-xvzf zlib-1.2.8.tar.gz
Tar nginx-1 .9.0.tar.gz
CD nginx-1.9.0
./configure --prefix=/usr/local/nginx --with-stream -- with-stream_ssl_module --with-pcre=/root/pcre-8.36 --with-zlib=/root/zlib-1.2.8 --with-openssl= /root/openssl-1.0.2a --with-http_ssl_module--with-http_sub_module --with-http_realip_module -- With-http_stub_status_module--with-http_sub_module
In/usr/local/nginx/conf/nginx.conf
Location ~ \.php$ {
root HTML;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
}
Create a new t.php under/usr/local/nginx/html/
Cat t.php
<?php
Phpinfo ();
?>
http://192.168.11.110/t.php
CENTOS65 Installing Nginx and PHP