美文网首页
centos7 安装nginx

centos7 安装nginx

作者: nnnnn6 | 来源:发表于2019-11-26 16:48 被阅读0次

    1、添加源

    rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

    2、安装

    yum install -y nginx

    3、启动

    systemctl start nginx

    启动Nginx后,报 [emerg] bind() to 0.0.0.0:XXXX failed (13: Permission denied)错误

    查看http允许访问的端口

    semanage port -l | grep http_port_t

    将要启动的端口加入到如上端口列表中

    semanage port -a -t http_port_t -p tcp 8311

    相关文章

      网友评论

          本文标题:centos7 安装nginx

          本文链接:https://www.haomeiwen.com/subject/sihgictx.html