DAV svn
# any /svn/foo URL will map to a repository C:/svn/foo
# I've only got it working using SVNPath!!
SVNParentPath C:/svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile c:/svn/.htaccess
#AuthzSVNAccessFile D:\svnaccessfile
Require valid-user
SetEnv TRAC_ENV "c:/svn/trac.db"
SetEnv PYTHONPATH "C:/Program Files/Subversion/bin"
# if you are running Apache as a user other than System, the TMP variable
# needs to be set to a place where that user can write scratch files. Make
# sure that this directory is created and writable by that user.
# SetEnv TMP "c:/svn/trac.db/tmp
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
19.2第二中方是:URL友好模式,比如 http://hostname/trac,
用下面代码替换上面相关代码
注意:这个是用的C:/Python24/share/trac/cgi-bin/trac.cgi,确保里边第一行包含python24的正确位置
# TRAC
# Transfer serving up of static content to Apache
Alias /trac/chrome/common "C:/Python24/share/trac/htdocs"
# Alias for the friendly URL
ScriptAlias /trac "C:/Python24/share/trac/cgi-bin/trac.cgi"
SetEnv TRAC_ENV "d:/svn/trac.db"
SetEnv PYTHONPATH "C:/Program Files/Subversion/bin"
# if you are running Apache as a user other than System, the TMP variable
# needs to be set to a place where that user can write scratch files. Make
# sure that this directory is created and writable by that user.
SetEnv TMP "d:/svn/trac.db/tmp
Note: if you get an error "Authentication information not available." after clicking "login", refer to #2258
19.3 集成域账号模式(略,参照官方文档)
20. 重起Apache.
------------摒住呼吸,测试TRAC------------
http://localhost:80/cgi-bin/trac.cgi
或者
http://localhost:80/trac
我一直是使用8080端口,也正常安装了
------------排错------------
如果出现错误,仔细看Apache的提示吧,会有所提示,我第一次也没有运行成功,提示找不到clearsilver,后来重新运行了一遍clearsilver,就好了
如果是ntfs文件系统的话,注意检查目录权限;
如果启用tmp,建立: D:\svn\trac.db\tmp目录,给权限;
确保trac.cgi第一行得python路径;
其他错误,自己检查C:\Program Files\Apache Group\Apache2\logs\error.log;
------------软件下载------------
打包软件下载地址(包含文中提到的软件):
http://www.bamtri.com/lq/trac/trac09b1allinonecn.rar