centos7安装Nginx
发布时间:2020/6/4 16:21:09 来源: 纵横数据
centos7安装Nginx
下载Nginx
wget http://nginx.org/download/nginx-1.14.0.tar.gz
解压安装包,并进入安装包目录
tar zxvf nginx-1.14.0.tar.gz cd nginx-1.14.0
编译安装
# 1. ./configure # 2. make # 3. make install
查看nginx版本
/usr/local/nginx/sbin/nginx -v
检查配置文件nginx.conf的正确性命令
/usr/local/nginx/sbin/nginx -t
正常结果如下:
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx常用命令
#启动命令 /usr/local/nginx/sbin/nginx #重新载入配置文件 /usr/local/nginx/sbin/nginx -s reload #重启 Nginx /usr/local/nginx/sbin/nginx -s reopen #停止 Nginx /usr/local/nginx/sbin/nginx -s stop #监测Nginx服务是否正在运行 netstat -anput | grep nginx
本文来源:
https://www.zndata.com/article/2643.html
[复制链接]
链接已复制