@Mr-13
2019-12-28T09:46:32.000000Z
字数 543
阅读 42
Linux
[root@mr13 ~]# yum install -y nginx
# 启动Nginx
[root@mr13 ~] systemctl start nginx
# 设置Nginx开机启动
[root@mr13 ~] systemctl enable nginx
看一下Nginx运行状态,是否已经启动:
[root@mr13 ~] ps -ef | grep nginx
# 进入Nginx安装目录,查看nginx.conf文件
[root@mr13 ~] cd/etc/nginx/
[root@mr13 ~] vim nginx.conf
默认是80端口,也可以根据需要进行修改。修改后需要重启Nginx使设置生效:
注意防火墙开放对应端口
[root@mr13 ~] systenctl restart nginx
浏览器打开 http://IPaddress:80,如下:
站点启动成功,Nginx基础安装成功!