redhat 编译安装 nginx

学习一个东西,首先要看官网

http://nginx.org/en/linux_packages.html#RHEL-CentOS

一、安装编译工具、依赖包
# 主要安装 pcre-devel Nginx 需要
$ yum -y install gcc gcc-c++ autoconf automake
$ yum -y install zlib zlib-devel openssl openssl-devel pcre-devel


二、、编译安装nginx

2.解压: tar -zxvf nginx-1.14.0.tar.gz
3.配置: ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 
# j2 表示 2 个核心,可根据实际需求修改
4.安装: make -j2 & make install 

5. 重启 nginx
原文地址:https://www.cnblogs.com/students/p/11426326.html