您的位置:首页 > 运维架构 > Nginx

Nginx PHP-FPM and MySQL on CentOS 5

2014-12-06 17:54 411 查看
This is tutorial how to install Nginx PHP-FPM and MySQL on CentOS 5 64bit VPS

Install Remi repository on CentOS 5 :

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Install Nginx and PHP-FPM

# yum --enablerepo=remi,remi-test install nginx php-fpm php-common

Install PHP modules

# yum --enablerepo=remi,remi-test install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

Start Nginx and Autostart on boot

#service nginx start

# chkconfig nginx on

Start php-fpm and autostart on boot

# service php-fpm start

# chkconfig php-fpm on

for install mysql uses this tutorial:

yum --enablerepo=remi,remi-test install mysql-server

Test Nginx and PHP-FPM setup:
Create info.php file on nginx vhost directory with following content:

<?php 

phpinfo();

?>

type in browser xxxxx/info.php
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: