三 安装配置ViewVC
1、安装ViewVC
tar xvzf viewvc-1.1.21.tar.gz
cd viewvc-1.1.21
./viewvc-install
2、配置apache
# vim /usr/local/apache2/conf/httpd.conf
在306行添加:
ScriptAlias /viewvc "/usr/local/viewvc-1.1.21/bin/cgi/viewvc.cgi"
ScriptAlias /query "/usr/local/viewvc-1.1.21/bin/cgi/query.cgi"
在330行添加:
<Directory "/usr/local/viewvc-1.1.21/bin/cgi">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
在最后添加:
<Location "/viewvc">
AuthType Basic
AuthName "ViewVC Client Access"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL "ldap://192.168.1.226:389/dc=example,dc=com,dc=cn?uid?sub?(objectClass=*)"
Require valid-user
</Location>
3、重启apache
/usr/local/apache2/bin/apachectl restart
4、修改viewVC配置文件
让viewvc启用svn的权限控制。
# vim /usr/local/viewvc-1.1.21/viewvc.conf
在如下section中添加:
[general]
root_parents = /home1/subversion/project: svn
因为我所有的库都在project目录下
[options]
authorizer = svnauthz
启用svn的认证
[authz-svnauthz]
authzfile = /home1/subversion/auth
认证文件的路径
5、访问viewvc
http://localhost/viewvc
配置完成。
ViewVC 的详细介绍:请点这里
ViewVC 的下载地址:请点这里
