Last active
          June 8, 2020 06:58 
        
      - 
      
 - 
        
Save defbobo/da74598f7e99211f92eb to your computer and use it in GitHub Desktop.  
    Installation
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | yum groupinstall 'Development Tools' | |
| yum install zlib-devel bzip2-devel openssl-devel ncurses-devel | |
| wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz | |
| tar Jxvf Python-3.5.0.tar.xz | |
| cd Python-3.5.0 | |
| ./configure --prefix=/usr/local/python3 | |
| make && make install | |
| echo 'export PATH=$PATH:/usr/local/python3/bin' >> ~/.bashrc | |
| rm /usr/bin/python | |
| ln -sv /usr/local/bin/python3.5 /usr/bin/python | |
| ll /usr/bin | grep python | |
| vim /usr/bin/yum | |
| #!/usr/bin/python-->#!/usr/bin/python2.6 | |
| wget https://bootstrap.pypa.io/get-pip.py | |
| python get-pip.py | |
| python3 get-pip.py | |
| pip3 install pylint | |
| pip3 install virtualenv | |
| docker pull oddrationale/docker-shadowsocks | |
| docker run -d -p 1984:1984 oddrationale/docker-shadowsocks -s 0.0.0.0 -p 1984 -k install10 -m aes-256-cfb | |
| --------------------------------------------------------------------- | |
| Vagrant conf | |
| --------------------------------------------------------------------- | |
| config.vm.network "forwarded_port", guest: 5000, host: 15000 | |
| # config.vm.provision "shell", inline: <<-SHELL | |
| # sudo apt-get update | |
| # sudo apt-get install -y apache2 | |
| # SHELL | |
| config.vm.provision "shell", path: "python_env.sh" | |
| --------------------------------------------------------------------- | |
| python_env.sh | |
| --------------------------------------------------------------------- | |
| echo "---------------------Upgrading System......---------" | |
| sudo rm -R /var/lib/apt/lists/* | |
| sudo apt-get update -y | |
| sudo apt-get upgrade -y | |
| sudo apt-get build-dep python | |
| echo "---------------------Upgrading System......---------" | |
| wget -c https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz | |
| tar -xzvf Python-2.7.9.tgz | |
| cd Python-2.7.9/ | |
| LDFLAGS="-L/usr/lib/x86_64-linux-gnu" ./configure | |
| make | |
| sudo make install | |
| echo "---------------------Checking Installation-----------" | |
| python --version | |
| echo "---------------------Setting pip---------------------" | |
| sudo apt-get install build-essential | |
| sudo apt-get install python-dev | |
| sudo apt-get install python-pip -y | |
| echo "---------------------Upgrading pip-------------------" | |
| sudo pip install --upgrade pip | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment