IP | 版本 | 备注 |
---|---|---|
192.168.1.10 | CentOS Linux release 7.6.1810 (Core) | Nginx |
[root@localhost etc]# systemctl stop firewalld
[root@localhost etc]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost etc]# setenforce 0
安装epel源
[root@localhost etc]# yum -y install epel-release
安装nginx
[root@localhost etc]# yum -y install nginx
[root@localhost ~]# nginx -v
nginx version: nginx/1.16.1
nginx检查
[root@localhost ~]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
文件:
/usr/share/nginx/html 默认路径
[root@localhost ~]# nginx
[root@localhost ~]# cd /usr/share/nginx/html/
导入图片
重启nginx
[root@localhost ~]# nginx -s reload