@H_403_0@1.yum install subversion安装svn
@H_403_0@
@H_403_0@2.svn --version查看安装版本
@H_403_0@
@H_403_0@3.svnadmin create /duoceshi/svn/repo/创建版本库,(/duoceshi/svn/repo这个目录自定义的,如果不存在执行命令的时候会自动创建)
@H_403_0@
@H_403_0@4.ls -al /duoceshi/svn/repo查看/duoceshi/svn/repo/ 文件夹发现包含了conf,db,format,hooks,locks,README.txt等文件,说明一个SVN库已经建立。
@H_403_0@
@H_403_0@5.用户账号密码配置:
@H_403_0@-bash-4.1# vim passwd
@H_403_0@### This file is an example password file for svnserve.
@H_403_0@### Its format is similar to that of svnserve.conf. As shown in the
@H_403_0@### example below it contains one section labelled [users].
@H_403_0@### The name and password for each user follow,one account per line.
@H_403_0@[users]
@H_403_0@# harry = harryssecret
@H_403_0@# sally = sallyssecret
@H_403_0@duoceshi = 123456
@H_403_0@IceChien = 123456
@H_403_0@
@H_403_0@6.用户权限配置,输入vim authz,加入以下内容:
@H_403_0@#设置根目录表示svn目录所有资源
@H_403_0@[/]
@H_403_0@#用户设置读写权限
@H_403_0@duoceshi = rw
@H_403_0@IceChien = rw
@H_403_0@
@H_403_0@7.配置svnserve.conf服务文件,添加以下内容:
@H_403_0@[general]
#匿名访问的权限,可以是read,write,none,默认为read
anon-access=none
#使授权用户有写权限
auth-access=write
#密码数据库的路径
password-db=passwd
#访问控制文件
authz-db=authz
#认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字
realm=/duoceshi/svn/repo
@H_403_0@
@H_403_0@8.启动svn,使用以下命令:
@H_403_0@ svnserve -d -r /duoceshi/svn/repo/
@H_403_0@
@H_403_0@9.查看启动进程和监听端口号
@H_403_0@ 查看启动进程:
@H_403_0@-bash-4.1# ps -ef|grep svn|grep -v grep
@H_403_0@root 2397 1 0 11:00 ? 00:00:00 svnserve -d -r /duoceshi/svn/repo/
@H_403_0@ 查看监听端口情况:
@H_403_0@-bash-4.1# netstat -ln|grep 3690
@H_403_0@tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN
@H_403_0@
@H_403_0@10.启动和停止svn命令
@H_403_0@ svnserve -d -r /duoceshi/svn/repo/(启动svn服务)
@H_403_0@ killall svnserve(关闭svn服务)
@H_403_0@
@H_403_0@11.SVN服务已经启动,使用客户端测试连接。
@H_403_0@客户端连接地址(在客户端主机安装svn客户端):svn://192.168.1.220
@H_403_0@用户名/密码: duoceshi/123456 IceChien/123456
@H_403_0@测试文件上传更新等操作