一、安装
aptitude install apache2 subversion libapache2-svn viewvc highlight
二、配置
1、
vi /etc/apache2/mods-available/dav_svn.conf
<Location /svn/user001>
DAV svn
SVNParentPath /svn/user001
AuthType Basic
AuthName "user001 Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
AuthzSVNAccessFile /etc/apache2/dav_svn.user001.authz
Require valid-user
</Location>
2、
svnadmin create /svn/user001/test
chown -R www-data:www-data /svn
3、
htpasswd -c /etc/apache2/dav_svn.passwd user001
4、
vi /etc/apache2/dav_svn.user001.authz
[/]
*=
user001 = rw
5、
vi /etc/httpd/conf.d/viewvc.conf
ScriptAlias /viewvc /usr/lib/cgi-bin/viewvc.cgi
<Location "/viewvc">
AllowOverride None
AuthUserFile /var/www/passwdfile
AuthName "ViewVC Client Access"
AuthType Basic
require valid-user
</Location>
6、
vi /etc/viewvc/viewvc.conf
root_parents = /path/to/dir/which/contains/svn/roots : svn
use_highlight = 1
#cvs_roots = cvs: /home/cvsroot
... ...
三、重新启动apache
/etc/init.d/apache2 restart
四、参考
[url]http://i18n-zh.googlecode.com/svn/www/svnbook-1.4/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout[/url]
[url]http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/[/url]
[url]http://ubuntuforums.org/showthread.php?t=51753[/url]
[url]http://plog.longwin.com.tw/my-favorite-site/2007/07/01/debian_set_subversion_2007[/url]
aptitude install apache2 subversion libapache2-svn viewvc highlight
二、配置
1、
vi /etc/apache2/mods-available/dav_svn.conf
<Location /svn/user001>
DAV svn
SVNParentPath /svn/user001
AuthType Basic
AuthName "user001 Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
AuthzSVNAccessFile /etc/apache2/dav_svn.user001.authz
Require valid-user
</Location>
2、
svnadmin create /svn/user001/test
chown -R www-data:www-data /svn
3、
htpasswd -c /etc/apache2/dav_svn.passwd user001
4、
vi /etc/apache2/dav_svn.user001.authz
[/]
*=
user001 = rw
5、
vi /etc/httpd/conf.d/viewvc.conf
ScriptAlias /viewvc /usr/lib/cgi-bin/viewvc.cgi
<Location "/viewvc">
AllowOverride None
AuthUserFile /var/www/passwdfile
AuthName "ViewVC Client Access"
AuthType Basic
require valid-user
</Location>
6、
vi /etc/viewvc/viewvc.conf
root_parents = /path/to/dir/which/contains/svn/roots : svn
use_highlight = 1
#cvs_roots = cvs: /home/cvsroot
... ...
三、重新启动apache
/etc/init.d/apache2 restart
四、参考
[url]http://i18n-zh.googlecode.com/svn/www/svnbook-1.4/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout[/url]
[url]http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/[/url]
[url]http://ubuntuforums.org/showthread.php?t=51753[/url]
[url]http://plog.longwin.com.tw/my-favorite-site/2007/07/01/debian_set_subversion_2007[/url]
本文转自 h2appy 51CTO博客,原文链接:http://blog.51cto.com/h2appy/149668,如需转载请自行联系原作者