一.前言
本文主要纪录CentOS等类型系统下openssl和python软件编译安装的操作过程和一些注意事项,以供后续回顾使用。
二.操作指导
2.1 环境说明
软件
版本
CentOS
6.9 x86_64
OpenSSL
1.1.0h
Python
2.7.14
Python
3.6.5
2.2 OpenSSL编译安装
2.2.1 OpenSSL安装包下载并解压
wget https://www.openssl.org/source/openssl-1.1.0h.tar.gz && tar -xf openssl-1.1.0h.tar.gz -C /tmp
2.2.2 编译安装OpenSSL
cd /tmp/openssl-1.1.0h
mkdir -p /opt/openssl
./config --prefix=/opt/openssl --shared && make && make install
2.2.3 配置OpenSSL环境
ln -s /opt/openssl/lib/libssl.so /usr/lib64/
echo "/opt/openssl/lib" >> /etc/ld.so.conf
ldconfig
2.3 Python编译安装
2.3.1 Python2.7安装
2.3.1.1 Python2.7下载并解压
wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz && tar -x