安装参照官网:http://nginx.org/en/docs/configure.html
yum 安装:
操作步骤:
1. 安装prce:yum install pcre pcre-devel -y
2. 安装zlib:yum install zlib zlib-devel -y
3. 安装ssl:yum install openssl openssl-devel -y
4. 安装nginx(不推荐,后继增加模块麻烦):yum install nginx -y
源码安装:
0. 首要条件是装编译相关的:yum groupinstall Development tools
1. 下载nginx源码:curl https://nginx.org/download/nginx-1.15.6.tar.gz -O
2. 解压源码并进入目录:tar -zxvf nginx-1.15.6.tar.gz ; cd nginx-1.15.6
3. 配置nginx(配置https,其它默认): ./configure --with-http_ssl_module
4. 编译安装:make && make install
以上安装需root权限