nginx的安装使用
- 安装nginx
官方网站:https://nginx.org/en/download.html - Linux下安装
Nginx依赖包
模块依赖性Nginx需要依赖下面3个包
ssl功能需要 openssl 库 ( 点击下载 )
gzip模块需要 zlib 库 ( 点击下载 )
rewrite模块需要 pcre 库 ( 点击下载 )
step 2:安装OpenSSL
[root@localhost]# tar -zxvf openssl-3.0.1
[root@localhost]# cd openssl-3.0.1
[root@localhost openssl-fips-2.0.2]# ./config && make && make install
step 3:安装zlib
[root@localhost wcw]# tar -zxvf zlib-1.2.11.tar.gz
[root@localhost wcw]# cd zlib-1.2.7
[root@localhost zlib-1.2.7]# ./configure && make && make install
step 4:安装pcre
[root@localhost wcw]# tar -zxvf pcre2-10.39.tar.gz
[root@localhost wcw]# cd pcre-8.21
[root@localhost pcre-8.21]# ./configure && make && make install
step 5:安装Nginx
[root@localhost wcw]# tar -zxvf nginx-1.12.2.tar.gz
[root@localhost wcw]# cd nginx-1.12.2
[root@localhost nginx-1.12.2]# ./configure
[root@localhost nginx-1.12.2]# make
[root@localhost nginx-1.12.2]# make install