# 1. 下载 OpenSSL 源代码
wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1f.tar.gz
# 2. 解压源代码
tar -xzf openssl-1.1.1f.tar.gz
cd openssl-1.1.1f/
# 3. 配置 OpenSSL
./config
# 4. 编译 OpenSSL
make
# 5. 安装 OpenSSL
sudo make install
libevent 安装:
tar -xzf libevent-2.1.12-stable.tar.gz
cd libevent-2.1.12-stable
默认情况下,libevent会被安装到系统的标准库路径下,如/usr/local/lib
。同时,相关的头文件会被安装到/usr/local/include/event2
。
如果你需要指定安装路径,可以使用--prefix
选项:
// 配置 ./configure --prefix=/your/custom/path
./configure
// 编译
make
// 编译安装
sudo make install