nginx下载官网:http://nginx.org/en/download.html
解压nginx
tar -zvxf nginx-xxxx
cd nginx-xxxx
检查安装依赖项
yum -y install gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel
编译并安装
./configure
make && make install (需要安装gcc)
启动nginx
cd sbin
./nginx
或者
nginx -c /user/local/nginx-xxx/conf/nginx.conf
停止nginx
nginx -s quit
nginx -s stop
重启nginx
nginx -s reload
网友评论