Centos6.8安装Nginx

安装条件

yum install -y gcc-c++

yum install -y pcre pcre-devel

yum install -y zlib zlib-devel

yum install -y openssl openssl-devel

安装

wget  https://nginx.org/download/nginx-1.8.0.tar.gz

tar zxvf nginx-1.8.0.tar.gz

cd nginx-1.8.0

./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --with-pcre

make && make install

远程访问设置

curl http://172.16.41.156    在本机中检测是否可以访问

iptables -F  (不然无法远程访问)

http://172.16.41.156

nginx常用命令

你可能感兴趣的:(Nginx,Linux)