在 Debian 11 上安装 OpenSSL 3.X
准备阶段:
首先更新本地包索引:sudo apt update -y
然后使用以下命令安装 OpenSSL 3 的依赖sudo apt install build-essential checkinstall zlib1g-dev -y
下载最新版的OpenSSL
sudo wget https://github.com/openssl/openssl/releases/download/openssl-3.0.10/openssl-3.0.10.tar.gz
# sudo wget https://www.openssl.org/source/openssl-3.1.2.tar.gz
# sudo wget https://www.openssl.org/source/openssl-3.0.10.tar.gz
然后,使用以下命令解压下载的文件:
sudo tar -zxf openssl-3.0.10.tar.gz
接下来,进入到解压出来的 OpenSSL 目录:
cd openssl-3.0.10
在 Debian 11 上构建安装 OpenSSL 3.x
使用以下命令来配置 OpenSSL:
./config --prefix=/usr/local/lib/openssl
输出已下内容:
Configuring OpenSSL version 3.1.2 for target linux-x86_64
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created Makefile.in
Created Makefile
**********************************************************************
*** ***
*** OpenSSL has been successfully configured ***
*** ***
*** If you encounter a problem while building, please open an ***
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***
*** and include the output from the following command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting' section in the INSTALL.md file first) ***
*** ***
**********************************************************************
使用以下命令构建 OpenSSL 3.x:
make
make test
make install
使用以下命令更新链接和缓存:
sudo ldconfig
更新系统范围的 OpenSSL 配置:
sudo tee /etc/profile.d/openssl.sh<<EOF
export PATH=/usr/local/lib/openssl/bin:\$PATH
export LD_LIBRARY_PATH=/usr/local/lib/openssl/lib:/root/openssl-3.x.x
EOF
重新加载shell环境:
source /etc/profile.d/openssl.sh
通过查看其版本来验证是否安装成功:
cd /
openssl version
返回以下内容表示安装成功
OpenSSL 3.1.2 1 Aug 2023 (Library: OpenSSL 3.1.2 1 Aug 2023)
© 版权声明
THE END
- 最新
- 最热
只看作者