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.

相关推荐
23级二本计科5 分钟前
NAT NAPT
运维·服务器·网络
大小科圣11 分钟前
lnmp平台
运维·服务器·nginx
听风吹等浪起16 分钟前
计算机网络基础:IIS服务器(WEB服务器)
运维·服务器·计算机网络
niuTaylor1 小时前
【Linux和RTOS简析】
linux·运维·服务器·macos·macbook air·换硬盘·扩内存
落——枫1 小时前
操作系统知识点23
linux·运维·服务器
Arbori_262151 小时前
linux 命令sed
linux·运维·服务器
獨枭1 小时前
Ubuntu 22.04 升级到 Ubuntu 24.04 全流程指南
linux·运维·ubuntu
初次见面我叫泰隆2 小时前
Linux常见指令
linux·运维·服务器
dessler2 小时前
DeepSeek-Open WebUI部署
linux·运维·大模型·ollama·deepseek
BetterJason2 小时前
不小心更改了/etc权限为777导致sudo,ssh等软件都无法使用
运维·ssh