The EVE-Central web application is written in Python, making use of the Cherrypy HTTP framework. PostgreSQL is used as database backend, short-term caching relies on Memcached. For a development server no httpd is required because CherryPy comes with its own little webserver.
You need to install the following software either from source or using your favorite packaging system. Depending on your Linux distribution your mileage may vary:
The following Python packages are required:
The following packages need to be installed from Ports:
Perform the following steps:
#> git clone [URL] eve-central
For a quick look, you could even checkout directly from Yann's master repository. But then you're not able to commit anything unless Yann grants you write access to his repository:
#> git clone http://git.gitorious.org/eve-central/core.git eve-central
The configuration for CherryPy is in the file web/site.config. Please don't edit this file, but create a file named 'web/site.config.local' where you can override the CherryPy default configuration. A list of configuration directives is available in the CherryPy documentation.
Example file:
###################################################################### # Please edit config for you local installation in this file. # It will override the settings in site.config. # This file is excluded from Git, so local changes will not affect # the EVE Central master site [global] tools.staticdir.root = "/var/www/eve-central/static_web" engine.autoreload_on = True engine.autoreload_frequency = 1 log.screen = True server.socket_port = 8080 server.socket_host = "0.0.0.0" [/favicon.ico] tools.staticfile.filename = "/var/www/eve-central/static_web/favicon.ico"
Because some paths and database settings are hardcorded at the moment, you need to change a few lines:
--- a/lib/evecentral/display.py +++ b/lib/evecentral/display.py @@ -19,10 +19,10 @@ def template(file,session): t = None - #try: - t = Cheetah.Template.Template(file = '/www/eve-central.com/web/templates/' + file) - #except: - # t = Cheetah.Template.Template(file = 'templates/' + file) + try: + t = Cheetah.Template.Template(file = '/www/eve-central.com/web/templates/' + file) + except: + t = Cheetah.Template.Template(file = 'templates/' + file) try: t.isigb = session['isigb'] --- a/lib/evecentral/evec_func.py +++ b/lib/evecentral/evec_func.py @@ -110,7 +110,7 @@ def db_con(): - svndb = psycopg2.connect(database='evec', user='evec', host = 'localhost', port = '9999') + svndb = psycopg2.connect(database='evec', user='evec', host = 'localhost', port = '5432') return svndb
Please make sure that you don't commit your local changes to the upstream repository. On the long row, this should be fixed using some kind of global/local config file for setting installation paths and database credentials.
#> psql evec < db/schema.sql
#> zcat latest_db.dump.gz | psql evec
#> cd web #> python launch.py
Try to access the CherryPy http server at http://localhost:8080. If you are using the settings from site.config.local above, you should see the log messages on your terminal.
The process can be killed with:
#> kill `ps | grep "python launch.py" | grep -v grep | cut -d " " -f 1`