Hello, I'm hoping someone can help me get Trac running under Apache
+mod_python on a Red Hat machine.
Background:
I want to put two repositories under Trac. I did a test installation
under Ubuntu. I apt-got the packages I needed. I followed various
instructions I found on the web. Everything went very smoothly. I first
served the repositories with tracd. Then I configured Apache and got
everything going there. Beautiful. Here's the relevant bit of Apache
configuration:
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/trac
PythonOption TracUriRoot /trac
</Location>
Alias /trac/ "/usr/share/trac/htdocs/"
<Directory "/usr/share/trac/htdocs/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Problem:
Now I tried to set it up on the Red Hat machine. After various attempts
to install everything as rpms, I gave up and installed everything from
source. Eventually, I got so I could serve the two repositories with
tracd, but I always get error messages with Apache. Here is the relevant
bit of configuration:
Alias /trac/ "/usr/share/trac/htdocs/"
<Directory "/usr/share/trac/htdocs/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
SetEnv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
<Location /svn>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
SetEnv PYTHON_EGG_CACHE /var/www/trac-common/egg-cache
PythonOption TracEnvParentDir /var/www/trac
PythonOption TracUriRoot /svn
</Location>
I set LD_LIBRARY_PATH to put /usr/local/lib -- the preferred destination
for all the libraries created by the various tarballs I compiled -- on
the library path. Note that I also set PYTHON_EGG_CACHE. I also created
this directory and gave the apache user full permission to change it. I
did this in response to the error messages I was getting. The following
is a representative sequence:
"/usr/lib/python2.3/site-packages/mod_python/apache.py", line
287, in HandlerDispatch\n log=debug)
"/usr/lib/python2.3/site-packages/mod_python/apache.py", line
457, in import_module\n module = imp.load_module(mname, f, p,
d)
"/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line
33, in ?\n from trac.web.main import dispatch_request, get_environment, \\
"/usr/lib/python2.3/site-packages/trac/web/main.py", line 22,
in ?\n from trac.env import open_environment
"/usr/lib/python2.3/site-packages/trac/env.py", line 21, in ?\n
from trac import db, db_default, util
"/usr/lib/python2.3/site-packages/trac/db.py", line 205, in ?\n
import pysqlite2.dbapi2 as sqlite
"build/bdist.linux-i686/egg/pysqlite2/dbapi2.py", line 32, in ?
"build/bdist.linux-i686/egg/pysqlite2/_sqlite.py", line 7, in ?
"build/bdist.linux-i686/egg/pysqlite2/_sqlite.py", line 4, in
__bootstrap__
"/usr/lib/python2.3/site-packages/setuptools-0.6a9-py2.3.egg/pkg_resources.py",
line 676, in resource_filename\n return
get_provider(package_or_requirement).get_resource_filename(
"/usr/lib/python2.3/site-packages/setuptools-0.6a9-py2.3.egg/pkg_resources.py",
line 1064, in get_resource_filename\n self._extract_resource(manager,
self._eager_to_zip(name))
"/usr/lib/python2.3/site-packages/setuptools-0.6a9-py2.3.egg/pkg_resources.py",
line 1081, in _extract_resource\n real_path =
manager.get_cache_path(self.egg_name, self._parts(zip_path))
"/usr/lib/python2.3/site-packages/setuptools-0.6a9-py2.3.egg/pkg_resources.py",
line 713, in get_cache_path\n ensure_directory(target_path)
"/usr/lib/python2.3/site-packages/setuptools-0.6a9-py2.3.egg/pkg_resources.py",
line 2137, in ensure_directory\n os.makedirs(dirname)
"/usr/lib/python2.3/os.py", line 153, in makedirs\n
makedirs(head, mode)
"/usr/lib/python2.3/os.py", line 153, in makedirs\n
makedirs(head, mode)
"/usr/lib/python2.3/os.py", line 154, in makedirs\n
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/root/.python-eggs'
I've edited out repeated an irrelevant information.
So, can anyone tell me what is going on? Incidentally, I
made /root/.python-eggs visible to and editable by apache but nothing
changed.
David Houghton
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac