openssl 编译安装
openssl 编译安装 1.1.1g
- CentOS 7 默认的openssl版本为 1.0.2k
[root@centos7 ~]
OpenSSL 1.0.2k-fips 26 Jan 2017
yum install -y -q gcc gcc-c++ perl
mv /usr/bin/openssl /usr/bin/openssl.$(date +%Y%m%d%H%M%S)
cd /opt/
wget -c http://iso.sqlfans.cn/linux/openssl-1.1.1g.tar.gz
tar xzf openssl-1.1.1g.tar.gz
cd openssl-1.1.1g
./config --prefix=/usr/local/openssl111g
[ $? -eq 0 ] && make -j4 && make install
ln -s /usr/local/openssl111g/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl111g/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1
ln -s /usr/local/openssl111g/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
[root@centos7 ~]
OpenSSL 1.1.1g 21 Apr 2020
openssl 编译安装 3.1.2
yum install -y -q gcc gcc-c++ perl perl-IPC-Cmd
mv /usr/bin/openssl /usr/bin/openssl.$(date +%Y%m%d%H%M%S)
cd /opt/
wget -c http://iso.sqlfans.cn/linux/openssl-3.1.2.tar.gz
tar xzf openssl-3.1.2.tar.gz
cd openssl-3.1.2
./config --prefix=/usr/local/openssl312
[ $? -eq 0 ] && make -j4 && make install
ln -s /usr/local/openssl312/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl312/lib64/libssl.so.3 /usr/lib64/libssl.so.3
ln -s /usr/local/openssl312/lib64/libcrypto.so.3 /usr/lib64/libcrypto.so.3
[root@centos7 ~]
OpenSSL 3.1.2 1 Aug 2023 (Library: OpenSSL 3.1.2 1 Aug 2023)
openssl 编译安装 3.4.0
yum install -y -q gcc gcc-c++ perl perl-IPC-Cmd perl-Data-Dumper
mv /usr/bin/openssl /usr/bin/openssl.$(date +%Y%m%d%H%M%S)
cd /opt/
wget -c http://iso.sqlfans.cn/linux/openssl-3.4.0.tar.gz
tar xzf openssl-3.4.0.tar.gz
cd openssl-3.4.0
./config --prefix=/usr/local/openssl340
[ $? -eq 0 ] && make -j4 && make install
ln -s /usr/local/openssl340/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl340/lib64/libssl.so.3 /usr/lib64/libssl.so.3
ln -s /usr/local/openssl340/lib64/libcrypto.so.3 /usr/lib64/libcrypto.so.3
[root@centos7 ~]
OpenSSL 3.4.0 22 Oct 2024 (Library: OpenSSL 3.4.0 22 Oct 2024)