需求環境
-
Install Indeed Repository
## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ## ## EPEL Repository rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm ## Remi Repository ## CentOS 6 and Red Hat (RHEL) 6 ## rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
-
Add Nginx Repository
Cent OS
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
安裝
-
Install Client Package
yum --enablerepo=remi install nginx php php-fpm php-common
-
啟動Nginx
※需停止Apache(httpd)服務
/etc/init.d/nginx start
Nginx設定
-
設定開機啟動Nginx
#關閉httpd開機啟動 chkconfig httpd off #設定Nginx開機啟動 chkconfig --add nginx chkconfig --levels 235 nginx on
防火牆設定
-
編輯iptables設定檔
vim /etc/sysconfig/iptables
-
加入規則
-
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-
重啟iptables
/etc/init.d/iptables restart
日後再來整理文章
沒有留言:
張貼留言