- gcc 安裝
yum install gcc-c++ -y - PCRE pcre-devel 安裝
yum install -y pcre pcre-devel -y - zlib 安裝
yum install -y zlib zlib-devel -y - OpenSSL 安裝
yum install -y openssl openssl-devel -y - 下載
- wget -c https://nginx.org/download/nginx-1.15.2.tar.gz
- 解壓
tar -zxvf nginx-1.15.2.tar.gz
cd nginx-1.15.2 - http2配置
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_v2_module --with-http_sub_module --with-http_stub_status_module
make & make install
需要注意的是 agent service 方式啓動可能有問題 nohup後臺啓動沒問題