使用 IUS 项目:
IUS is a community project that provides RPM packages for newer versions of select software for Enterprise Linux distributions.
Centos6的命令如下:
sudo yum install https://centos6.iuscommunity.org/ius-release.rpm
Centos7 的命令如下:
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
需要询问是否导入 GPG key,直接输入 y 即可。
安装 python3.6 命令如下:
sudo yum install python36u
查看最新python 版本:
[root@localhost ~]# python3.6 --version
Python 3.6.4
[root@localhost ~]#
安装 mod_wsgi
[root@localhost httpd]# yum install python36u-mod_wsgi-4.6.2
[root@localhost httpd]# mod_wsgi-express module-config
LoadModule wsgi_module "/usr/lib64/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
WSGIPythonHome "/usr"
查找 rpm 文件的网站推荐:https://pkgs.org