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