客户端软件:
(1)Windows下常用的客户端软件常用TortoiseSVN。它是一个免费的开源的客户端。 下载地址:
(2)向Myeclipse,也有一些SVN的插件。
[root@was Packages]#
yum install -y subversion
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
rhel-debuginfo | 3.9 kB 00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package subversion.x86_64 0:1.6.11-7.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
subversion x86_64 1.6.11-7.el6 rhel-debuginfo 2.3 M
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 2.3 M
Installed size: 12 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : subversion-1.6.11-7.el6.x86_64 1/1
Verifying : subversion-1.6.11-7.el6.x86_64 1/1
Installed:
subversion.x86_64 0:1.6.11-7.el6
Complete!
查看版本
[root@was Packages]#
svnserve --version
svnserve, version 1.6.11 (r934486)
compiled Apr 12 2012, 11:09:11
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see
This product includes software developed by CollabNet ().
The following repository back-end (FS) modules are available:
* fs_base : Module for working with a Berkeley DB repository.
* fs_fs : Module for working with a plain file (FSFS) repository.
Cyrus SASL authentication is available.
创建SVN版本库
[root@was Packages]#
mkdir -p /svn
[root@was Packages]#
svnadmin create /svn/hbhesvn
[root@was conf]#
pwd
/svn/hbhesvn/conf
[root@was conf]#
ls
authz passwd svnserve.conf
(1)svnserve.conf: svn服务配置文件下。
(2)passwd: 用户名口令文件。
(3)authz: 权限配置文件。
svnserve.conf 文件, 该文件配置项分为以下5项:
anon-access: 控制非鉴权用户访问版本库的权限。
auth-access: 控制鉴权用户访问版本库的权限。
password-db: 指定用户名口令文件名。
authz-db:指定权限配置文件名,通过该文件可以实现以路径为基础的访问控制。
realm:指定版本库的认证域,即在登录时提示的认证域名称。若两个版本库的认证域相同,建议使用相同的用户名口令数据文件
启动SVN:
[root@was conf]#
svnserve -d -r /svn/
停止SVN:
[root@was conf]#
ps -elf | grep svn
1 S root 10990 1 0 80 0 - 43722 inet_c 14:24 ? 00:00:00 svnserve -d -r /svn/
0 S root 10995 5092 0 80 0 - 25811 pipe_w 14:24 pts/3 00:00:00 grep svn
[root@was conf]#
kill -9 10990
authz文件配置
[root@was conf]#
cat authz
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[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
admin=hbhe
dev=citic
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[hbhesvn]
@admin=rw
@dev=rw
passwd文件配置
[root@was 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
hbhe = hbhepwd
citic = citicpwd
新建一个文件夹,选中文件夹右击,选中【SVN Checkout】