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:

sh 复制代码
sudo apt update
sudo apt install -y build-essential checkinstall perl zlib1g-dev

2. Download and Extract OpenSSL Source

sh 复制代码
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:

sh 复制代码
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

If you need static libraries instead, remove shared.

4. Compile and Install

sh 复制代码
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
sh 复制代码
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:

sh 复制代码
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:

sh 复制代码
openssl version -a

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

相关推荐
艾莉丝努力练剑4 分钟前
【Linux网络】Linux 网络编程:传输层协议TCP(三)
linux·运维·服务器·网络·tcp/ip·http
小程故事多_806 分钟前
从想法到落地零返工,AI Agent六阶段自动化开发全流水线实践
运维·人工智能·自动化
keyipatience8 分钟前
21,22 (半)深入理解Linux重定向与缓冲区机制
linux·运维·服务器
风向决定发型丶10 分钟前
Logrotate配置nginx日志切割
运维·nginx
yyuuuzz13 分钟前
aws亚马逊云上运维常见问题梳理
运维·服务器·网络·云计算·aws
2201_7611990415 分钟前
python运维1
运维·开发语言·python
yn0017 分钟前
Docker 一键部署加密支付网关:从零开始完整教程
运维·docker·容器
杨云龙UP17 分钟前
Oracle CDB巡检脚本使用SOP:从HTML原始报告到Word正式交付_2026-05-29
运维·服务器·数据库·oracle·架构·html·巡检
難釋懷18 分钟前
Nginx自签名-OpenSSL
运维·chrome·nginx
2301_8035389519 分钟前
CentOS版本差异详解和系统信息查看方法
linux·运维·centos