前言
記錄一次openssl的升級(jí),1.0.1升級(jí)到1.1.1
一、openssl是什么?
OpenSSL是一個(gè)開源的加密工具包,廣泛用于安全套接層(SSL)和傳輸層安全(TLS)協(xié)議的實(shí)現(xiàn)。它提供了一組用于加密通信的庫(kù)和工具,被許多網(wǎng)絡(luò)應(yīng)用和操作系統(tǒng)廣泛使用。
二、使用步驟
1.下載
首先,我們需要從官方網(wǎng)站下載最新版本的OpenSSL源代碼。你可以訪問(wèn) OpenSSL官方網(wǎng)站 獲取最新的穩(wěn)定版本。
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
2.編譯安裝
下載完成后,解壓縮源代碼文件并進(jìn)入目錄:
tar -zxvf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
執(zhí)行以下步驟進(jìn)行編譯和安裝:
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared
make
make test
sudo make install
最后配一下新版openssl的環(huán)境
# 備份一下舊版
mv /usr/bin/openssl /usr/bin/openssl.bak
# 新版建立新的軟鏈接
ln -s /usr/local/bin/openssl /usr/bin/openssl
# 編輯ld.so.conf,如沒(méi)有/usr/local/lib,新起一行加進(jìn)去
vi /etc/ld.so.conf
# 加載新配置
ldconfig
結(jié)束后如不能使用,退出shell,重新登入,輸入openssl version查看版本
[root@xx]# openssl version
OpenSSL 1.1.1w 11 Sep 2023
3.一些問(wèn)題
以下兩個(gè)問(wèn)題解決辦法
如果你沒(méi)有l(wèi)ib64,則放lib,請(qǐng)自行審驗(yàn)文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-804398.html
- openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1
- openssl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
總結(jié)
通過(guò)按照上述步驟,你可以成功升級(jí)你的OpenSSL版本。確保在升級(jí)之前備份任何關(guān)鍵數(shù)據(jù),并在新版本生效后測(cè)試系統(tǒng)的兼容性,以確保一切正常運(yùn)行。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-804398.html
到了這里,關(guān)于【openssl】Linux升級(jí)openssl-1.0.1到1.1.1的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!