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 小时前
socket编程UDP
linux·运维·服务器·网络·c++·网络协议·udp
ayaya_mana3 小时前
Nginx性能优化与安全配置:打造高性能Web服务器
运维·nginx·安全·性能优化
我不要放纵9 小时前
docker
运维·docker·容器
morliz子轩9 小时前
基于WSL搭建Ubuntu 22.04.x LTS开发环境
linux·运维·ubuntu
BJ_Bonree10 小时前
数智先锋 | 告别运维黑盒!豪鹏科技×Bonree ONE构建全栈智能可观测体系
运维·科技
Janspran10 小时前
嵌入式linux学习 -- 进程和线程
linux·运维·学习
Cosmoshhhyyy11 小时前
linux远程部署dify和mac本地部署dify
linux·运维·macos
路多辛12 小时前
Debian新一代的APT软件源配置文件格式DEB822详解
linux·运维·ubuntu·debian
油丶酸萝卜别吃13 小时前
nginx配置代理服务器
运维·网络·nginx
maomao17131413 小时前
Jenkins 环境部署
运维·jenkins