Skip to content

Instantly share code, notes, and snippets.

@openprojdev
Last active January 20, 2021 07:50
Show Gist options
  • Select an option

  • Save openprojdev/6123768 to your computer and use it in GitHub Desktop.

Select an option

Save openprojdev/6123768 to your computer and use it in GitHub Desktop.

Revisions

  1. openprojdev revised this gist Sep 21, 2013. 1 changed file with 10 additions and 9 deletions.
    19 changes: 10 additions & 9 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,33 +1,34 @@
    #!/bin/bash

    #setup build essentials
    yum install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-devel sqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel
    wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
    tar zxvf Python-2.7.5.tgz
    cd Python-2.7.5
    ./configure --prefix=/usr/local/python27 --enable-shared
    make
    altinstall
    make altinstall
    echo "/usr/local/python27/lib" >> /etc/ld.so.conf.d/usr-python27.conf
    su -
    ldconfig
    exit

    /sbin/ldconfig
    ln -s /usr/local/python27/bin/python2.7 /usr/bin/python2.7

    #install setuptools
    #install setuptools
    wget https://pypi.python.org/packages/source/s/setuptools/setuptools-0.9.8.tar.gz
    wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-0.9.8.tar.gz
    tar zxvf setuptools-0.9.8.tar.gz
    tar zxvf setuptools-0.9.8.tar.gz
    cd setuptools-0.9.8
    python2.7 setup.py install --prefix=/usr/local/python27/

    #setup virtualenv
    /usr/local/python27/bin/easy_install virtualenv

    cd ..
    #install pip
    curl -O https://pypi.python.org/packages/source/p/pip/pip-1.4.tar.gz
    tar zxvf pip-1.4.tar.gz
    tar zxvf pip-1.4.tar.gz
    cd pip-1.4
    python2.7 setup.py install --prefix=/usr/local/python27/

    #create and activate virtualenv
    #create and activate virtualenv
    /usr/local/python27/bin/virtualenv /usr/local/python27/env
    source /usr/local/python27/env/bin/activate
  2. openprojdev revised this gist Sep 21, 2013. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    #setup build essentials
    yum install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-devel sqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel
    wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
    tar zxvf Python-2.7.5.tgz
    cd Python-2.7.5
    ./configure --prefix=/usr/local/python27 --enable-shared
    make
    altinstall
  3. openprojdev created this gist Jul 31, 2013.
    30 changes: 30 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    #setup build essentials
    yum install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-devel sqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel
    ./configure --prefix=/usr/local/python27 --enable-shared
    make
    altinstall
    echo "/usr/local/python27/lib" >> /etc/ld.so.conf.d/usr-python27.conf
    su -
    ldconfig
    exit
    ln -s /usr/local/python27/bin/python2.7 /usr/bin/python2.7

    #install setuptools
    wget https://pypi.python.org/packages/source/s/setuptools/setuptools-0.9.8.tar.gz
    wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-0.9.8.tar.gz
    tar zxvf setuptools-0.9.8.tar.gz
    cd setuptools-0.9.8
    python2.7 setup.py install --prefix=/usr/local/python27/

    #setup virtualenv
    /usr/local/python27/bin/easy_install virtualenv

    #install pip
    curl -O https://pypi.python.org/packages/source/p/pip/pip-1.4.tar.gz
    tar zxvf pip-1.4.tar.gz
    cd pip-1.4
    python2.7 setup.py install --prefix=/usr/local/python27/

    #create and activate virtualenv
    /usr/local/python27/bin/virtualenv /usr/local/python27/env
    source /usr/local/python27/env/bin/activate