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.

相关推荐
齐齐大魔王2 分钟前
linux-系统函数
linux·运维·microsoft
XDHCOM24 分钟前
DevOps是开发与运维的协作融合,并非简单取代,科普其核心价值与实践意义
运维·devops
拾贰_C25 分钟前
【Ubuntu | Nvidia | installition0】Ubuntu安装Nvidia驱动
linux·运维·ubuntu
回到原点的码农25 分钟前
Failed to restart nginx.service Unit nginx.service not found
运维·nginx
国冶机电安装27 分钟前
监控与安防系统安装:从方案设计到落地运维的一站式技术指南
运维
AI先驱体验官39 分钟前
数字人部署入门:轻量化方案与快速落地
大数据·运维·人工智能·深度学习·重构·aigc
晨枫阳41 分钟前
Jenkins 部署与问题解决
运维·jenkins
晨非辰42 分钟前
Git版本控制速成:提交三板斧/日志透视/远程同步15分钟精通,掌握历史回溯与多人协作安全模型
linux·运维·服务器·c++·人工智能·git·后端
夜星辰202344 分钟前
在服务器上使用 Docker,常用命令按功能分类整理
运维·服务器·docker
sofaraway131 小时前
未能下载 VS Code 服务器(Failed to fetch)解决办法
运维·服务器