Ref: http://blog.mixu.net/2011/01/04/nginx-php-fpm-and-node-js-install-on-centos-5-5
Http://www.systmbx.com/nginx/how-to-install-nginx-with-php-5-3-and-php-fpm-support-on-centos-6
Add repositories for nginx and PHP-FPM
Just add the epel and Remi repos:
Rpm-uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Rpm-uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Install nginx and PHP-fpmremi has the PHP-FPM package (PhP 5.3.4); epel has nginx:
Yum -- enablerepo = remiinstall
Php-FPM nginx
Some other common packages:
Yum -- enablerepo = Remi
Install MySQL mysql-server PHP-mysql PHP-common PHP-Gd PHP-mbstring PHP-mcrypt PHP-xml php-Gd PHP-bcmath
Yum -- enablerepo = Remi
Install PHP-channel-phpunit PHP-pear-phpdocumentor PHP-phpunit
Configure PHP
/Etc/PhP5/cgi/PHP. ini,
[...]cgi.fix_pathinfo = 1
Configure nginxin/etc/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;}
Start nginx and php5-fpm:
# chkconfig nginx on# /etc/init.d/nginx start# chkconfig php-fpm on# /etc/init.d/php-fpm start