centos 7编译安装nginx

前端之家收集整理的这篇文章主要介绍了centos 7编译安装nginx前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. 禁用防火墙

    systemctl disable firewalld

    systemctl stop firewalld

    setenforce 0

  2. 安装pcre库

    yum install pcre*

  3. 安装zlib库

    yum install zlib*

  4. 增加Nginx用户:useradd Nginx -G Nginx

  5. 编译安装Nginx

    ./configure --prefix=/usr/local/Nginx --error-log-path=/var/log/Nginx/error.log --http-log-path=/var/log/Nginx/access.log --user=Nginx --group=Nginx

    make && make install

  6. 启动Nginx

    cd /usr/local/Nginx/sbin

    nohup ./Nginx &

原文链接:https://www.f2er.com/centos/378097.html

猜你在找的CentOS相关文章