Installation de Trac et mod_wsgi
yum install python-setuptools python-tz easy_install Pygments easy_install docutils
yum install httpd-devel apxs python-devel wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz tar zxf mod_wsgi-3.3.tar.gz cd mod_wsgi-3.3 ./configure && make && make install ls /usr/lib/httpd/modules/ ... mod_wsgi.so ...
easy_install trac
mkdir /var/www/trac mkdir /var/www/trac/projects trac-admin /var/www/trac/projects/TracTest initenv You may now configure the environment by editing the file: /var/www/trac/projects/TracTest/conf/trac.ini try running the Trac standalone web server `tracd`: tracd --port 8000 /var/www/trac/projects/TracTest # Browse http://server:8000/TracTest Yep ! Ça roule
# /var/www/trac/trac.wsgi
import sys sys.stdout = sys.stderr import os os.environ['TRAC_URI_ROOT'] = '/trac' os.environ['TRAC_ENV_PARENT_DIR'] = '/var/www/trac/projects' os.environ['PYTHON_EGG_CACHE'] = '/var/www/trac/eggs' import trac.web.main application = trac.web.main.dispatch_request
# /etc/httpd/conf.d/trac-wsgi.conf LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias /trac /var/www/trac/trac.wsgi <Directory /var/www/trac> WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> service httpd restart # Browse http://server/trac Yep ! Ça roule
mod_python n'est pas reccomandé, utiliser mod_wsgi
yum install babel trac
browse http://server/trac 500 Internal Server Error # /etc/httpd/conf.d/trac.conf #PythonOption TracEnvParentDir /var/trac PythonOption TracEnvParentDir /var/www/trac
browse http://server/trac/Proj01 Traceback (most recent call last): ... OSError: [Errno 2] No such file or directory: '/usr/lib/python2.4/site-packages/trac/locale'