SVN仓库服务端搭建

svn功能强大,主要用在以下方面:1. 版本控制;2. 内容同步;3.文件备份

配置步骤

第一步:安装 yum install subversion

第二步:初始化服务

cd /home
mkdir svn  #创建svn软件工作目录
svnadmin create /home/svn #创建并启动svn服务
[root@192 home]# ls svn
conf  db  format  hooks  locks  README.txt

第三步:配置svn关键参数

  1. conf/svnserve.conf 配置svn服务
#去除下面的5个注释
anon-access = read 	#匿名用户权限
auth-access = write #授权用户权限
password-db = passwd #指定密码文件
authz-db = authz 	#注定权限文件
realm = /home/svn   # 认证空间名,指定版本库所在目录
  1. conf/passwd 配置密码文件
[root@192 conf]# cat passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
ljbao=123321
[root@192 conf]#
  1. conf/authz配置权限文件

[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

[/]
ljbao=rw  ##读写权限

配置结束

使用客户端checkout即可:svn://你的IP

备注:启动命令svnserve -d -r /home/svn(启动) 停止命令kill 9 pid