1、先升级openssl
yum安装各种依赖,yum install gcc gcc-c++ autoconf automake zlib zlib-devel pcre-devel
tar zxvf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u
./config shared zlib && make &&make install
mv /usr/bin/openssl /usr/bin/openssl.old
cp /usr/local/ssl/bin/openssl /usr/bin/openssl
cp /usr/local/ssl/lib/libcrypto.so.1.0.0 /usr/lib64
cp /usr/local/ssl/lib/libcrypto.so.1.0.0 /lib64
2、升级python
tar zxvf Python-3.6.0.tgz
cd Python-3.6.0
vi Modules/Setup
./configure --prefix=/usr/local/python3
make && make install