Create a new OpenShift app:
rhc-create-app -a <app_name> -t diy-0.1
Login to the application host using the credentials from the above command. It will look like ssh://c8812345:123214@<app_name>-username.rhcloud.com:
ssh c8812345:123214@<app_name>-username.rhcloud.com
Change into the application tmp directory:
cd $OPENSHIFT_TMP_DIR
Download Python2.7 and extract:
wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2tar jxf Python-2.7.3.tar.bz2
Build and install Python
./configure --prefix=$OPENSHIFT_RUNTIME_DIRmake ; make install
Export new Python path for later configuration (you will need to run this if you logout, etc.):
export PATH=$OPENSHIFT_RUNTIME_DIR/bin:$PATH
Check that new Python is used (should be Python 2.7.3:
python -V
Install setuptools and pip
cd $OPENSHIFT_TMP_DIRwget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gztar zxf setuptools-0.6c11.tar.gzcd setuptools-0.6c11python setup.py installcd $OPENSHIFT_TMP_DIRwget http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gztar zxf pip-1.1.tar.gzcd pip-1.1python setup.py install
Install uWSGI
cd $OPENSHIFT_TMP_DIRpip install uwsgi
Change (cd) into the app directory that was created from the rhc-create-app command.