centos7 安装 nginx

来源:互联网 发布:java 自定义注解 使用 编辑:程序博客网 时间:2024/04/29 15:04

注意:安装的用户必须要有root权限

1.添加yum nginx repository库

 yum install epel-release

2.install nginx

 yum install nginx

3. 启动nginx

systemctl start nginx

4.防火墙添加http和https 访问

firewall-cmd --permanent --zone=public --add-service=http

firewall-cmd --permanent --zone=public --add-service=https

firewall-cmd--permanent--add-port=80/tcp

firewall-cmd --reload

5.访问http://ip 测试是否安装成功



0 0