Skip to content

Instantly share code, notes, and snippets.

@iambowen
Last active January 4, 2016 18:29
Show Gist options
  • Save iambowen/8661285 to your computer and use it in GitHub Desktop.
Save iambowen/8661285 to your computer and use it in GitHub Desktop.
install and config python 2.7 in centos 6.4
#!/bin/bash
yum groupinstall "Development tools" -y
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz && tar xzf Python-2.7.6.tgz && rm Python-2.7.6.tgz
cd Python-2.7.6
./configure --prefix=/usr/local/python
make && make install
ln -s /usr/local/python/bin/python /usr/local/bin/python
wget -q https://raw.github.com/pypa/pip/master/contrib/get-pip.py && python get-pip.py
ln -s /usr/local/python/bin/pip /usr/local/bin/pip
python --version
pip --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment