Skip to content

Instantly share code, notes, and snippets.

@JohnPreston
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JohnPreston/9312234 to your computer and use it in GitHub Desktop.
Save JohnPreston/9312234 to your computer and use it in GitHub Desktop.
Setup Python 2.7 on CentOS
#
# Setup python 2.7 in addition to 2.6.6 on CentOS 6
#
# prerequisites repos
sudo yum groupinstall "Development tools" -y
sudo yum install wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel mysql-devel -y
#python sources
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
# compile
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall
# setup easy_install and pip for 2.7
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py --no-check-certificate
python2.7 ez_setup.py
easy_install-2.7 pip
# My Essential
pip2.7 install virtualenv
pip2.7 install supervisor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment