Environment Construction
Preparation tools:
- Centos7:http://mirror.bit.edu.cn/centos/7/isos/x86_64/centos-7-x86_64-dvd-1611.iso
- Virtuslvox:https://www.virtualbox.org/wiki/downloads
- Subline
- SecureCRT
1. After installing the virtual machine, add the image file, select Minimal to minimize the installation
- Yum update# Update Software
- Yum-y Install gcc kernel-devel kenel-headers make bzip2 # installation dependent libraries
- Reboot # restart
2. Mount the execution script
- Mount/dev/cdrom/mnt # mount the optical drive to the MNT directory
- Cd/mnt # Enter into the MNT directory
- Sh./vboxlinuxadditions. Run # Execute the script to install
- Reboot #重启
3. Take a snapshot for later recoveryInstallation of 4.python environment (installation pyenv)Configuration of CentOS
$ yum Install readline readline-devel readline-static-y$ yum install OpenSSLOpenSSL-devel openssl-static-
y$ Yum Install SQLite-devel-
y$ yum install bzip2-devel bzip2-libs-
y$ yum install patch vim git
Installing PYTHON3.3/PIP3
#Installing python3.3$ sudo mkdir/usr/local/python3#Create the installation directory$ wget--no-check-certificatehttps://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz #下载源文件. Note: When wget gets HTTPS, add:--no-check-certificate$ TAR-XZVF python-3.6.0.tgz#Unpack the package$ CD Python-3.6.0#go to unzip directory#Compiling the installation$ sudo./configure--prefix=/usr/local/python3#Specify the Created directory$ sudo make$ sudo make install#Configure 2 versions to coexist$ sudo ln-s/usr/local/python3/bin/python3/usr/bin/python3#Create Python3 Soft links so that Python 2,python3 can be used with Python 3 using Python commands. #Modify Default to Python 3$ sudo mv python python.bak $ sudo ln-s/usr/local/python3/bin/python3/usr/bin/python#Create soft links for Python3$ sudo vi/usr/bin/yum#because Yum uses Python 2, it may not work correctly after replacing with Python 3, so the Yum configuration file is modified. Change the python version specified in the first line to python2.7 (#!/usr/bin/python to #!/usr/bin/python2.7)
# SOURCE installation pip$ wget--no-check-certificate https://github.com/pypa/pip/archive/9.0.1.tar.gz# Download Source code $ tar-zvxf 9.0.1-c pip-9.0.1 # Unzip the file $ cd pip-9.0.1$ python3 setup.py install# using Python 3 installation # to create a link # upgrade Pip
Installing Setuptools
TAR-XVF setuptools-1.4.2. TAR.GZCD setuptools-1.4.2python setup.py install
Install Python3 under Centos7