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.1nginx检查
[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
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/101878.html原文链接:https://javaforall.cn