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

7 comments:

Linux said...

Another good Linux tips learned. 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 ...

Renu said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
https://www.emexotechnologies.com/online-courses/devops-training-in-electronic-city/

dockerdevops said...

Nice Posting !! Thanks for sharing..
Docker Training in Hyderabad
Docker and Kubernetes Online Training
Docker Training
Docker Online Training
Kubernetes Online Training
Kubernetes Training in Hyderabad
Best Docker and kubernetes training in ameerpet
Docker and Kubernetes Training in Hyderabad

Bhanu Sree said...

Nice Posting !! Thanks for sharing..
Microsoft Azure DevOps Training
Azure DevOps online training in hyderabad

rajani said...

Thank you for your post. This is excellent information.
DevOps Training
DevOps Online Training
DevOps Training in Ameerpet