centos python 底层
安装过程将用到gcc,方便起见,安装“Development Tools”
yum groupinstall "Development tools" -y
Python安装中需要的一些依赖包
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel -y
yum install gcc libffi-devel python-devel openssl-devel -y
安装linux基础软件
yum install wget vim -y
要安装pip,首先要安装setuptools
wget https://pypi.python.org/packages/ff/d4/209f4939c49e31f5524fa0027bf1c8ec3107abaf7c61fdaad704a648c281/setuptools-21.0.0.tar.gz#md5=81964fdb89534118707742e6d1a1ddb4 && wget https://pypi.python.org/packages/41/27/9a8d24e1b55bd8c85e4d022da2922cb206f183e2d18fee4e320c9547e751/pip-8.1.1.tar.gz#md5=6b86f11841e89c8241d689956ba99ed7
tar vxf setuptools-21.0.0.tar.gz && cd setuptools-21.0.0 && python setup.py install && cd ~ && tar vxf pip-8.1.1.tar.gz && cd pip-8.1.1 && python setup.py install && cd ~ && pip install --upgrade pip
升级所有包,不改变软件设置和系统设置,系统版本升级,内核不改变
yum -y upgrade
搭建虚拟环境venv
pip install virtualenv && mkdir myproject && cd myproject/ && virtualenv --no-site-packages venv_xlliu
激活/退出虚拟环境
source venv_xlliu/bin/activate
deactivate
git 设置
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"