可以這樣做...環境是 CentOS 6.5 64bit
1. Install EPEL and Remi CentOS 6 Repository:
# rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
2. Next step to install Nginx is to create Nginx Repository file
建立 /etc/yum.repos.d/nginx.repo 這個檔.內容如下:
3. Install Nginx, PHP 5.5 and PHP-FPM packages
# yum --enablerepo=remi,remi-php55 install nginx php-common php-fpm php-mysqlnd php-mbstring php-mcrypt php-gd
4. Nginx is installed, start Nginx Web Server and PHP-FPM
# service nginx start
# service php-fpm start
5. Enable Nginx and PHP-FPM autostart on boot
# chkconfig nginx on
# chkconfig php-fpm on
6. 檢查版本對不對
# php -v
# nginx -v
搞定…收工囉~~
# rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
2. Next step to install Nginx is to create Nginx Repository file
建立 /etc/yum.repos.d/nginx.repo 這個檔.內容如下:
QUOTE:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
3. Install Nginx, PHP 5.5 and PHP-FPM packages
# yum --enablerepo=remi,remi-php55 install nginx php-common php-fpm php-mysqlnd php-mbstring php-mcrypt php-gd
4. Nginx is installed, start Nginx Web Server and PHP-FPM
# service nginx start
# service php-fpm start
5. Enable Nginx and PHP-FPM autostart on boot
# chkconfig nginx on
# chkconfig php-fpm on
6. 檢查版本對不對
# php -v
QUOTE:
PHP 5.5.13 (cli) (built: Jun 5 2014 16:44:19)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
# nginx -v
QUOTE:
nginx version: nginx/1.6.0
搞定…收工囉~~