yum安装nginx(快捷)
#yum安装nginx
sudo yum install -y nginx
#启动nginx
7 sudo systemctl start nginx.service
6 service nginx start
#设置开机自启动
sudo systemctl enable nginx.service
#yum安装的nginx配置文件默认存放在 /etc/nginx/nginx.conf 查看
vi /etc/nginx/nginx.conf
#卸载
yum remove nginx
访问界面不是官方默认界面可能是因为
有epel源的时候并且用yum install nginx 安装就会显示Welcome to nginx on Fedora!,因为epel源就是Fedora维护的
结果:
[root@hmcx logs]# whereis nginx
nginx: /usr/sbin/nginx /usr/lib64/nginx /etc/nginx /usr/share/nginx /usr/share/man/man3/nginx.3pm.gz /usr/share/man/man8/nginx.8.gz
posted on 2019-08-16 14:37 zongJianKun 阅读(222) 评论(0) 编辑 收藏 举报