当前位置:首页 > 服务器技术 > nginx

编译安装nginx

# 安装

            version=1.16.0
yum
install -y gccgcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel autoconf automake makewget https://nginx.org/download/nginx-${version}.tar.gztar -xf nginx-${version}.tar.gz cd nginx-${version} useradd -M -s /sbin/nologin nginx ./configure --prefix=/soft/nginx --user=nginx --group=nginx --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module --with-stream make && makeinstall

# 设置环境变量

vim /etc/profile.d/nginx.sh

export PATH=/soft/nginx/sbin:$PATH

source /etc/profile

 

# 查看nginx默认安装模块(在解压的二进制包目录下)

            cat auto/options |grep"YES"

 

         
    

原文:https://www.cnblogs.com/ray-mmss/p/12077541.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!