系统环境:CentOS
yum -y install subversion
mkdir /home/svn/Repositories
svnadmin create /home/svn/Repositories/file
- 修改配置文件 cd /home/svn/Repositories/file/conf
vim passwd
在最后加上
# mfy是用户名,123456是密码
mfy = 123456
vim authz
在最后面加上
# 表示根目录,即 /home/svn/Repositories
[/]
# 表示用户mfy对根目录具有读写权限
mfy = rw
vim svnserve.conf
# 一下几行在配置文件中均可以找到位置,把注解放开,修改一下值即可
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
# svn仓库的根目录
realm = /home/svn/Repositories
- 启动svn
svnserve -d -r /var/svnrepos
ps -ef | grep svn
svn://192.168.140.133/file
svn co svn://192.168.140.133/file