Centos7 离线安装 nginx
1. 将包解压后传输到 linux 服务器上
2. 进入 gcc 包和 gcc-c++分别运行
rpm -Uvh *.rpm --nodeps --force
3. 安装 pcre:
pcre-8.00.tar.gz
./con!gure
make
make install
4. 安装 openssl:
tar -zxvf openssl-!ps-2.0.16.tar.gz
./con!gure
make
make install
注意,这个包安装的时候一定要进文件夹看清楚文件的名称大小写,如果上面命令的不行
就换 con!g;
5. 安装 zlib:
tar -zxvf zlib-1.2.11.tar.gz
./con!gure
make
make install
6. 安装 nginx:
tar -zxvf nginx-1.17.8.tar.gz
./con!gure
make
make install
执行 nginx 命令:
cd /usr/local/nginx/sbin
./nginx;