1. 通过yum安装nginx yum install nginx -y 检查配置文件 nginx.conf 文件的正确性 nginx -t 2. 启动nginx 启动 sudo systemctl start nginx.service 首页访问测试 curl 127.0.0.1 设置开机启动 sudo systemctl enable nginx.service 3. 修改网站默认首页设置 进入nginx配置文件 vim /etc/nginx/nginx.conf server