目录
1.在线安装Nginx
shell
# 安装Nginx
yum install epel-release
yum install nginx
2.配置开机启动
shell
# 启动Nginx
systemctl start nginx
# 开机自启
systemctl enable nginx
一般docker内的centos7安装Nginx的目录结构是:
/etc/nginx
为配置文件路径
/usr/sbin/nginx
为nginx启动脚本路径,你可能会用到/usr/sbin/nginx -s reload