独立版的安装请参考 : http://my.oschina.net/jingxing05/blog/183131
最终还是没逃掉配置http访问的命运
那就开始吧
1、安装
sudo apt-get install apache2
sudo apt-get install libapache2-svn
# 查看端口是否在用
netstat –apn | grep 8080
# 如果被占用,修改/etc/apache2下的ports.conf文件和site-available下的default文件的端口
sudo /etc/init.d/apache2 restart
2、配置
a)
cd ~/conf
htpasswd -c svn_dav_passwd jingxing05
# 之后可以如下修改或新增用户名和密码
b)
vi svn_dav_authz
[groups]
admin=admin
[/]
@admin =rw
[test@t.tt:/]
test@t.tt = rw
c)
cd /etc/apache2
sudo vi mods-available/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /home/jingxing05/svnrepos
AuthType Basic
AuthName "Wingarden Subversion Repository"
AuthUserFile /home/jingxing05/conf/svn_dav_passwd
AuthzSVNAccessFile /home/jingxing05/conf/svn_dav_authz
</Location>
3、重启apache2
sudo /etc/init.d/apache2 restart
如果碰到如下错误
Invalid command 'AuthzSVNAccessFile', perhaps misspelled or defined by a module not included in the server configuration
请执行
sudo a2enmod dav_svn
sudo a2enmod authz_svn
# 禁止mod
sudo
中间遇到的问题
No such file or directory: Could not open password file
权限不够导致