最快直接使用yum进行安装
[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# yum -y install nginx[root@localhost ~]# mkdir -p /data/file导入图片
[root@localhost file]# ls
csdn.jpg csdn.txt[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
[root@localhost ~]# vi /etc/nginx/nginx.conf
启动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
[root@localhost ~]# nginx
[root@localhost ~]# nginx -s reload[root@localhost ~]# systemctl stop firewalldcurl:http://192.168.1.40/file/


