altis 2014-6-26 15:39
安裝 Nginx 1.6 + PHP 5.5 on CentOS 6.5
目前主流的 nginx 已經更新到 1.6 版了... PHP也到 5.5 ...如果這時你要更新到最新版本...<div>可以這樣做...環境是 CentOS 6.5 64bit</div><div><br></div><div><font color="DarkGreen" size="3">1. Install EPEL and Remi CentOS 6 Repository:</font><br># rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm<br># rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm<br><br><font color="DarkGreen" size="3">2. Next step to install Nginx is to create Nginx Repository file</font><br>建立 /etc/yum.repos.d/nginx.repo 這個檔.內容如下:<br>[quote]<br>[nginx]<br>name=nginx repo<br>baseurl=http://nginx.org/packages/centos/$releasever/$basearch/<br>gpgcheck=0<br>enabled=1<br>[/quote]<br><br><font color="DarkGreen" size="3">3. Install Nginx, PHP 5.5 and PHP-FPM packages</font><br># yum --enablerepo=remi,remi-php55 install nginx php-common php-fpm php-mysqlnd php-mbstring php-mcrypt php-gd<br><br><font color="DarkGreen" size="3">4. Nginx is installed, start Nginx Web Server and PHP-FPM</font><br># service nginx start<br># service php-fpm start<br><br><font color="DarkGreen" size="3">5. Enable Nginx and PHP-FPM autostart on boot</font><br># chkconfig nginx on<br># chkconfig php-fpm on<br><br><font color="DarkGreen" size="3">6. 檢查版本對不對</font><br># php -v<br>[quote]<br>PHP 5.5.13 (cli) (built: Jun 5 2014 16:44:19)<br>Copyright (c) 1997-2014 The PHP Group<br>Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies<br>[/quote]<br><br># nginx -v<br>[quote]<br>nginx version: nginx/1.6.0<br>[/quote]<br><br>搞定…收工囉~~<br><br></div>