altis 2013-2-20 17:57
CentOS 6.5 下安裝最新版 Nginx + php-fpm + MySQL 5.5
環境: CentOS 6.5 64Bit<br>要使用最新版之前...先移除已安裝的套件<div><br></div><div>#<span style="text-align: center;"> yum remove httpd* php* mysql*</span></div><div><span style="text-align: center;"><br></span></div><div><span style="text-align: center;">yum預設是沒有nginx的套件...所以我們要先安裝資源庫</span></div><div><pre># yum install yum-priorities -y
# rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</pre><pre>再來一鍵安裝所有套件...覽人包:</pre><pre># <span style="font-family: Helvetica, Arial, sans-serif; text-align: center;">yum install </span><span style="font-family: Helvetica, Arial, sans-serif; text-align: center;">--enablerepo=remi </span><span style="font-family: Helvetica, Arial, sans-serif; text-align: center;">-y nginx </span><span style="font-family: Helvetica, Arial, sans-serif; text-align: center;"> php php-fpm </span><span style="font-family: Helvetica, Arial, sans-serif; text-align: center;">php-gd php-mysql php-mbstring php-xml php-mcrypt mysql mysql-server</span></pre><pre style="text-align: left;"><font face="Helvetica, Arial, sans-serif">再來預設開機就啟用</font></pre><pre style="text-align: left;"><font face="Helvetica, Arial, sans-serif">#chkconfig nginx on
#chkconfig php-fpm on
#chkconfig mysqld on</font></pre><pre style="text-align: left;"><font face="Helvetica, Arial, sans-serif">然後立即啟用</font></pre><pre style="text-align: left;"><font face="Helvetica, Arial, sans-serif">#service php-fpm start
#service nginx start
#service mysqld start</font></pre><pre style="text-align: left;"><font face="Helvetica, Arial, sans-serif">這樣就可以搞定安裝囉...是不是很簡單...當然裝完還要設定...待續~~</font></pre><pre style="text-align: left;"><font face="Helvetica, Arial, sans-serif">參考資料:</font><span style="text-align: center;"><font face="Helvetica, Arial, sans-serif">http://www.lifelinux.com/how-to-install-nginx-and-php-fpm-on-centos-6-via-yum/3/</font></span></pre></div>