Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24
如何在 centos 6 上安裝 nginx – unethost無限空間虛擬主機 技術分享部落格

如何在 centos 6 上安裝 nginx

centos_nginx_wp

隨著centos版本的演化,現在安裝nginx已經是相當輕鬆的事,只要照著下列的教學,
就可以輕易的安裝並設定好nginx。

在 centos shell 安裝 nginx

1.  先執行 yum 的升級指令:   yum update -y

2.  試著移除舊的 web server :  yum remove httpd -y

3.  安裝 epel:  ( 偶爾要查看是否有新程式  https://fedoraproject.org/wiki/EPEL )

        語法: rpm -Uvh http://mirror.ancl.hawaii.edu/linux/epel/6/i386/epel-release-6-8.noarch.rpm

4.  透過 yum 安裝 nginx,語法: yum install nginx -y

   5.  安裝完成後,會安裝在 /etc/nginx/ 這邊
   6.  網站設定檔則在 /etc/nginx/conf.d
   7.  啟動 nginx : service nginx start
   8.  將nginx寫入開機自動啟動:  chkconfig nginx on
照著上列的安裝,如果os版本上沒有太多的差異,大致上都能順利無痛完成的。

(本篇文章由unethost.com客服人員-Michael完成)

註冊網域請點我。我們提供虛擬主機試用,七天滿意保證,
功能完整使用不受限制,歡迎點我申請。