Tuesday, April 9, 2013

Nginx-php-fpm Installation With Yum on Centos.


Install Nginx with php-FPM
 rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

yum install nginx  php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-xcache php-magickwand php-magpierss php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy

vi /etc/nginx/conf.d/domain.conf
server {
   listen 80;
   server_name www.domain domain;
   root /usr/share/nginx/html;
   location / {
       index  index.html index.htm index.php;
   }
   location ~ \.php$ {
       include /etc/nginx/fastcgi_params;
       fastcgi_pass  127.0.0.1:9000;
       fastcgi_index index.php;
       fastcgi_param  SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
   }
}

/etc/init.d/nginx restart

 /etc/init.d/php-fpm restart

You can check php-fpm if it is running
[root@yo html]# netstat -anltup | grep php-fpm
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      23249/php-fpm

4 comments:

Linux said...

Another good Linux tips learned. Thanks.

Shrikant Lokhande said...

Thanks

digital signature sharepoint said...

Very helpful article ! I was always curious about all these complex algorithms that are being used in these ssl encryptions.

digital signage software said...

Thanks for a great post, I love it. I love it so much that the greedy gnome in me wants more ...