yum install -y openssl-devel
下载源码并解压配置
[root@test ~]# wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
[root@test ~]# tar xf Python-2.7.10.tar.xz
[root@test ~]# cd Python-2.7.10
[root@test ~]# ./configure --enable-shared --prefix=/usr/local/python/
[root@test ~]# make
[root@test ~]# make install
增加python的lib目录到系统里并生效
[root@test ~]