-
-
Save justhamade/633013c13e29e72c1080 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# Run with curl https://gist.github.com/justhamade/633013c13e29e72c1080 | sh | |
yum clean metadata | |
yum clean all | |
yum update -y | |
yum groupinstall "Development tools" -y | |
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y | |
# Python 2.7.6: | |
cd ~ | |
wget --no-check-certificate https://www.python.org/ftp/python/2.7.7/Python-2.7.7.tgz | |
tar xzf Python-2.7.7.tgz | |
cd Python-2.7.7 | |
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" | |
make && make altinstall | |
# Download and install Setuptools + pip | |
cd ~ | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | |
python2.7 ez_setup.py | |
#python3.3 ez_setup.py | |
easy_install-2.7 pip | |
#easy_install-3.3 pip | |
cp /usr/lib/httpd/modules/mod_wsgi.so /usr/lib/httpd/modules/mod_wsgi-3.3.so | |
cd ~/Python-2.7.7 | |
wget https://github.com/GrahamDumpleton/mod_wsgi/archive/4.1.3.tar.gz -O mod_wsgi-4.1.3.tar.gz | |
tar zxvf mod_wsgi-4.1.3.tar.gz | |
cd mod_wsgi-4.1.3 | |
./configure --with-python=/usr/local/bin/python2.7 && make && make install | |
ldconfig | |
echo "If there are not errors you can restart apache /etc/init.d/httpd restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment