进入到相关目录
cd /usr/bin安装python3yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make备份python2mv python python.bak获取包wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz进入包tar -xvJf Python-3.6.2.tar.xzcd Python-3.6.2./configure prefix=/usr/local/python3make && make installln -s /usr/local/python3/bin/python3 /usr/bin/pythonpython -V 看看输出的是不是python3的版本
执行python2 -V 看到的就是python2的版本cd /usr/bin/
ls yum*vi /usr/libexec/urlgrabber-ext-down
which python
安装pip安装epel扩展源:yum -y install epel-releaseyum -y install python-pipyum clean allpip install virtualenv
pip install virtualenvwrapperpip install --upgrade pip
加入的内容视情况而定 VIRTUALENVWRAPPER_PYTHON=/usr/local/python3/bin/python3 # 指定virtualenvwrapper执行的python版本 WORKON_HOME=$HOME/.virtualenvs # 指定虚拟环境存放目录,.virtualenvs目录名可自拟 /usr/local/bin/virtualenvwrapper.sh # virtualenvwrapper.sh所在目录source ~/.bashrc mkvirtualenv py2 -p /usr/bin/python2
安装git
yum install perl openssh gitgit clone https://github.com/zaxlct/MxOnline_Django.gitcd MxOnline_Django# 查看 docker-compose 是否已安装docker-compose -v安装mysql