Install packages needed to build Python, and MySQL
yum install gcc gcc-c++ zlib-devel mysql subversion
Build python 2.5
cd /usr/local/src
wget .../Python2.5.4.tgz
expand, configure, make, make install
Get Python setuptools to aid in getting Python modules
wget http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
# PATH must be such that local Python found as python, then...
sh setuptools-0.6c9-py2.5.egg
Get Python modules needed by web2py
easy_install hashlib
easy_install pysqlite
easy_install mysql-python
Get web2py source
cd /usr/local/src
svn checkout http://web2py.googlecode.com/svn/trunk/ web2py
Profit!
python2.5 web2py/web2py.py
The above installs several Python modules as eggs. At runtime python uses a cache to expand those eggs. That cache directory must be readable by the web2py process, and writable too if the eggs haven't yet been expanded; otherwise web2py may fail to import the MySQLdb module in particular.
-FCY