centos 手动安装nginx并配置openssl

下载 openssl-1.1.1n

cd /usr/local/src/
wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.1n.tar.gz
tar xzf openssl-1.1.1n.tar.gz

安装前置依赖

yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel
离线安装
vi /etc/yum.conf
设置 缓存路径 为下载路径 (https://www.aliyundrive.com/s/7BQZLHi8PLp 提取码: i3l6)
[main]
cachedir=/缓存路径 // 原始值/var/cache/yum/$basearch/$releasever
然后 
yum -C -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel

安装PCRE

cd /usr/local/src/
wget --no-check-certificate  http://downloads.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz
tar zxvf pcre-8.45.tar.gz
cd pcre-8.45
./configure
make && make install

下载安装nginx

cd /usr/local/src/
wget --no-check-certificate https://nginx.org/download/nginx-1.21.6.tar.gz
tar xzf nginx-1.21.6.tar.gz
cd  nginx-1.21.6
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.45 --with-openssl=/usr/local/src/openssl-1.1.1n

make && make install
posted @ 2022-03-31 16:17  枫·影  阅读(435)  评论(0编辑  收藏  举报