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
直接安装nginx
安装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 默认路径
nginx启动访问测试
[root@localhost ~]# nginx
放入默认路径图片,测试
[root@localhost ~]# cd /usr/share/nginx/html/
导入图片
重启nginx
[root@localhost ~]# nginx -s reload
访问图片
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/101878.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...