01.Python3.6一键过程:
# yum install -y wget
# wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
# yum -y install gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
# cd Python-3.6.4
# ./configure --prefix=/usr/local/
# ./configure --enable-optimizations
# make && make install
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.1 setuptools-28.8.0
02.设置环境
# cd /usr/bin/
# mv python python2.0
# ln -s /usr/local/bin/python3.6 /usr/bin/python
# vim /usr/bin/yum
#!/usr/bin/python----->/usr/bin/python2.0