| 6 | |
| 7 | The Trac system is being delivered from the new http://trac.lcbru.le.ac.uk/ site, which is provided from LAMP-51 (a new LAMP v2 instance, not the same as the old server, below, which was LAMP v1). The trac 'environment' is /local/lcbru-trac and the deploy directory is /local/trac-deploy. |
| 8 | |
| 9 | It makes some limited use of the Genshi templating system, in /local/trac-deploy/templates |
| 10 | |
| 11 | Once again, deployment was complicated. This time, we didn't have to use a virtualenv virtual environment for python, because LAMP v2 expects python modules to be installed in /local/python (as well as in the base library paths) and that can be written to by normal users. So all the pre-requisites and Trac itself can be installed with "easy_install --install-dir=/local/python PACKAGENAME" but then you need to supplement the wsgi in /local/trac-deploy/cgi-bin/trac.wsgi with: |
| 12 | |
| 13 | {{{ |
| 14 | import site |
| 15 | site.addsitedir('/local/python') |
| 16 | }}} |
| 17 | |
| 18 | But - and it is a big but - the apache server runs as 'wwwrun' and the libraries have been installed with the user permissions of whichever user installed them. So as well as following the instructions in the !TracInstall guide to ensure the /local/lcbru-trac directory structure is all read-and-writeable by wwwrun, and that the /local/trac-deploy/log is writeable and the /local/trac-deploy/cgi-bin files are readable and executable, you ALSO have to ensure that sub-directories below /local/python are also readable and executable, because by default they give wwwrun only read access. |
| 19 | |
| 20 | Errors such as "Trac[main] ERROR: can't retrieve session: !TracError: Cannot load Python bindings for PostgreSQL" are an indication that the permissions are wrong. Assuming, of course, that the bindings are actually installed, which you can check by running the python interpreter and trying "import psycopg2". |
| 21 | |
| 22 | |
| 23 | == Previous Deployment == |