Rhel5 + ngnix + PhP5 + MySQL install

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.