Write by wei on 2006-12-13
原文见:
http://bbs.he566.com/viewtopic.php?t=243
(for detail,please refer to http://trac.edgewall.org/wiki/TracGuide)
1.install steps:
1.1. download trac from
http://trac.edgewall.org/wiki/TracDownload
(i used trac-0.10.2.zip)
1.2. install mod_python
代码: |
$ yum install mod_python.i386 |
1.3. install trac
(detail to refer to http://trac.edgewall.org/wiki/TracInstall)
extract zip file
then cd .../trac../
代码: |
$ python ./setup.py install |
1.4 .Creating a Project Environment
代码: |
$ trac-admin /path/to/myproject initenv |
1.5. Running the Standalone Server to test installation
代码: |
$ tracd --port 8000 /path/to/myproject |
1.6. set trac on apache with mod_python
recommend use mod_python model, because the cgi mod is very slow on my test.
add following code into httpd.conf
代码: |
LoadModule python_module modules/mod_python.so #config trac in apache <Location /projects/test_trac> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /trac/test_trac PythonOption TracUriRoot /projects/test_trac </Location> <Location "/projects/test_trac/login"> AuthType Basic AuthName "test trac" AuthUserFile /usr/local/apache2/conf/svn-auth-file Require valid-user </Location> |
restart apache, view http://localhost/projects/test to test your configuration.
(details to refer to http://trac.edgewall.org/wiki/TracModPython)
1.7. use trac-admin to set permission
as default, the anonymous has more permission.
代码: |
$ trac-admin /path/to/projenv permission add admin TRAC_ADMIN # grant all priviledge to admin group $ trac-admin /path/to/projenv permission add testuser admin # grant permission to testuser with group admin $ trac-admin /path/to/projenv permission list anonymous # view anonymous permission $ trac-admin /path/to/projenv permission remove anonymous [action].... [action] # remove all permision for anonymous |
as document said, use "$ trac-admin /path/to/projenv permission remove anonymous *" can remove all permission. but i can't remove all. I don't know why.
(for details to refer to http://trac.edgewall.org/wiki/TracPermissions)
That's all