参考:http://wiki.ubuntu.org.cn/SubVersion
1.安装 $ sudo apt-get install subversion
$ sudo apt-get install libapache2-svn
$ sudo apt-get install apache2
2.添加组
sudo addgroup subversion
sudo usermod -G subversion -a www-data
3.创建文件仓库
$ sudo mkdir /home/svn
$ cd /home/svn
$ sudo mkdir myproject
$ sudo chown -R root:subversion myproject
$ sudo svnadmin create /home/svn/myproject
$ sudo chmod -R g+rws myproject
$ sudo chown -R root:subversion myproject
4.通过 WebDAV 协议访问
修改 /etc/apache2/mods-available/dav_svn.conf
<Location /svn/myproject>
DAV svn
SVNPath /home/svn/myproject
AuthType Basic
AuthName "myproject subversion repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
如果需要用户每次登录时都进行用户密码验证,请将<LimitExcept GET PROPFIND OPTIONS REPORT>与</LimitExcept>两行注释掉。
sudo /etc/init.d/apache2 restart
5.web访问验证
sudo htpasswd -c /etc/subversion/passwd user_name
添加用户:
sudo htpasswd /etc/subversion/passwd other_user_name
访问:
$ svn co http://hostname/svn/myproject myproject --username user_name
6.web浏览器中访问:
http://hostname/svn/myproject
7.windows下的svn软件
TortoiseSVN,有中文语言包,下载即可