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.

相关推荐
xuanzdhc2 小时前
Linux 基础IO
linux·运维·服务器
愚润求学2 小时前
【Linux】网络基础
linux·运维·网络
小和尚同志4 小时前
29.4k!使用 1Panel 来管理你的服务器吧
linux·运维
小米里的大麦9 天前
014 Linux 2.6内核进程调度队列(了解)
linux·运维·驱动开发
程序员的世界你不懂9 天前
Appium+python自动化(三十)yaml配置数据隔离
运维·appium·自动化
算法练习生9 天前
Linux文件元信息完全指南:权限、链接与时间属性
linux·运维·服务器
浩浩测试一下9 天前
渗透测试指南(CS&&MSF):Windows 与 Linux 系统中的日志与文件痕迹清理
linux·运维·windows·安全·web安全·网络安全·系统安全
小生云木9 天前
Linux离线编译安装nginx
linux·运维·nginx
19899 天前
【Dify精讲】第19章:开源贡献指南
运维·人工智能·python·架构·flask·开源·devops
成工小白9 天前
【Linux】文件系统
linux·运维·服务器