Home >Backend Development >PHP Tutorial >linux nginx
wget -c http://nginx.org/download/nginx-1.9.9.tar.gz
tar zxvf nginx-1.9.9.tar.gz
cd nginx-1.9.9
./configure --prefix=/ Java/nginx
yum install gcc-c++
yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel
make && make install
###Add port listening
vi + /etc/sysconfig/iptables-config
Add two lines to the content
########nginx
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
Restart iptables
service iptables restart
Complete the installation. Configuration nginx.conf Look at the file
Operation
Start
/Java/nginx/sbin/nginx
Restart
/Java/nginx/sbin/nginx -s reload
Close
/Java/nginx/sbin/nginx -s stop
The above has introduced linux nginx, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.