centos 7.6升级python2至python3.6
1、centos7.6默认python版本
[root@cf10 ~]# more /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@cf10 ~]# python -V
Python 2.7.5
[root@cf10 ~]#
[root@cf10 ~]# yum install gcc gcc-c++ zlib* wget -y
[root@cf10 ~]# wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz
[root@cf10 ~]# tar xvf Python-3.6.4.tar.xz
[root@cf10 ~]# cd Python-3.6.4
[root@cf10 Python-3.6.4]# ./configure
[root@cf10 Python-3.6.4]# make
[root@cf10 Python-3.6.4]# make install
[root@cf10 Python-3.6.4]# python3 -V
Python 3.6.4
[root@cf10 Python-3.6.4]# python -V
Python 2.7.5
[root@cf10 Python-3.6.4]# ls -al /usr/bin/python
lrwxrwxrwx. 1 root root 7 Jul 31 09:52 /usr/bin/python -> python2
[root@cf10 Python-3.6.4]# mv /usr/bin/python /usr/bin/python.bak
[root@cf10 Python-3.6.4]# ln -s /usr/local/bin/python3 /usr/bin/python
[root@cf1