Posted under » Ubuntu on 08 December 2009
You can follow this official installation instruction here.
However, since I am in Ubuntu server and have Python 2.6 preinstalled, I can install it by
$ apt-get install python-cherrypy3
It will install CherryPy at /usr/share/python-support/python-cherrypy3/cherrypy
Cherrypy version 3 has been around since 2007 and is still the latest version.
On the apache side you must enable 3 modules like using a sudo account.
$ ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load $ ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load $ ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load $ /etc/init.d/apache2 restart
As this is using mod rewrite, please enable it by .htaccess or on the Apache config file
RewriteEngine on RewriteRule ^(.*) http://127.0.0.1:8080$1 [P] AllowOverride All
Please see on how to enable mod_rewrite.
Then start your CherryPy application server. You will see it say that it running http at port 8080.
$ python test.py