SVN轻量服务器搭建

1.安装subversion服务。
Ubuntu:sudo apt-get install subversion
Centos:sudo yum install subversion
2.创建SVN仓库,如axfcms。
svnadmin create /svnRepos/axfcms
3.修改/svnRepos/conf目录下的所有文件。
A.修改svnserv.conf。命令如下:vim /svnRepo/axfcms/conf/svnserve.conf。

[general]
#匿名用户不可读
anon-access = none
#权限用户可写
auth-access = write
#密码文件为passwd
password-db = passwd
#权限文件为authz
authz-db = authz

B.添加访问用户:vim /svnRepo/axfcms/conf/passwd
[users]
# harry = harryssecret
# sally = sallyssecret
tone = 12345 #等号前是用户名,等号后是密码。
C.修改授权信息:vim /svnRepo/axfcms/conf/authz
[groups]
admin= tone
[/]
@admin = rw
*=r
4.启动服务
svnserve -d -T -r /svnRepo
5.随系统启动,在vim /etc/rc.local追加如下
svnserve -d -T -r /svnRepo/

6.客户端访问:
svn checkout svn://xxx.xxx.xxx.xxx/axfcms axfcms