Build OpenSSL 1.1.1w from source on Debian 11 (x86_64),

To build OpenSSL 1.1.1w from source on Debian 11 (x86_64), follow these steps:

1. Install Dependencies

Before compiling OpenSSL, ensure you have the necessary build tools and dependencies installed:

sudo apt update
sudo apt install -y build-essential checkinstall perl zlib1g-dev

2. Download and Extract OpenSSL Source

wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz
tar -xvzf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w

3. Configure OpenSSL

Configure OpenSSL with a suitable prefix (e.g., /usr/local/ssl) and enable optimizations:

./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

If you need static libraries instead, remove shared.

4. Compile and Install

make -j$(nproc)  # Compiles using all available CPU cores
sudo make install

5. Update Library Paths

Ensure your system uses the newly compiled OpenSSL instead of the default Debian version.

5.1 Add OpenSSL to Library Path
echo "/usr/local/ssl/lib" | sudo tee -a /etc/ld.so.conf.d/openssl-1.1.1w.conf
sudo ldconfig
5.2 Update System Paths

Modify your environment variables to prioritize the new OpenSSL:

echo 'export PATH="/usr/local/ssl/bin:$PATH"' | sudo tee -a /etc/profile.d/openssl.sh
source /etc/profile.d/openssl.sh

6. Verify Installation

Check if the new OpenSSL version is in use:

openssl version -a

You should see OpenSSL 1.1.1w and the correct installation path.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fareast_mzh

打赏个金币

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值