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.

相关推荐
sulikey3 分钟前
Linux基础指令与权限管理深度解析:从入门到精通
linux·运维·服务器·ubuntu·centos·linux命令·linux权限
qq_21539789725 分钟前
docker 安装 opengauss 高斯数据库
运维·docker·容器
s***469829 分钟前
linux 设置tomcat开机启动
linux·运维·tomcat
r***F26235 分钟前
若依部署Nginx和Tomcat
运维·nginx·tomcat
HalvmånEver2 小时前
Linux:进程的切换与调度(进程四)
linux·运维·服务器
运维有小邓@2 小时前
实时日志关联分析工具:智能检测潜在安全威胁
运维·网络·安全
谷隐凡二3 小时前
Docker 的核心理念及技术的简单说明
运维·docker·容器
L***B5683 小时前
如何安装linux版本的node.js
linux·运维·node.js
脏脏a4 小时前
【Linux】Linux进程状态深度解析
linux·运维·服务器
凉晓风4 小时前
Linux中常见几种自启动方式的区别
linux·运维·服务器