Skip to content

Instantly share code, notes, and snippets.

@KunoiSayami
Created December 27, 2018 17:24
Show Gist options
  • Save KunoiSayami/ad5c26e7c337ec72ddc4156b628cb0b7 to your computer and use it in GitHub Desktop.
Save KunoiSayami/ad5c26e7c337ec72ddc4156b628cb0b7 to your computer and use it in GitHub Desktop.
#!/bin/sh
yum -y update
yum -y groupinstall "Development Tools"
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
version=7.15
cd /opt
wget --no-check-certificate https://www.python.org/ftp/python/2.$version/Python-2.$version.tgz
tar xzf Python-2.$version.tgz
cd Python-2.$version
./configure --prefix=/usr/local
sed -i 's/#zlib/zlib/g' 'Modules/Setup.dist'
sed -i 's/#zlib/zlib/g' 'Modules/Setup'
make && make install
python -V
cd ..
wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
#!/bin/bash
version=7.15
apt-get install -y make gcc g++
sudo apt-get -y install libmysqlclient-dev
sudo apt-get -y install libssl-dev
sudo apt-get -y install zlib1g-dev libncurses5-dev
cd /opt
wget --no-check-certificate https://www.python.org/ftp/python/2.$version/Python-2.$version.tgz
tar xzf Python-2.$version.tgz
cd Python-2.$version
./configure --prefix=/usr/local
sed -i 's/#zlib/zlib/g' 'Modules/Setup.dist'
sed -i 's/#zlib/zlib/g' 'Modules/Setup'
make && make install
python -V
wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment