安装所需环境:
yum installg cc-c++
yum install-y pcre pcre-devel
yum install openssl
yum install-y openssl openssl-devel
下载nginx压缩包:
wget -chttps://nginx.org/download/nginx-1.10.1.tar.gz
进入解压出来的目录执行命令:
./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module
编译安装:
make
make install
查找安装路径:
whereis nginx
进入安装目录:
cd/usr/local/nginx/sbin/
./nginx启动
./nginx -s stop 杀死所有nginx再关闭
./nginx -s quit 关闭
./nginx -s reload 重新加载配置文件
网友评论