安装:
yum install -y subversion

建立代码仓库目录;
mkdir /home/svn/

# cd /home/svn
建立一个叫myproject的代码仓库:
# svnadmin create myproject

# ll /home/svn/myproject
drwxr-xr-x 2 root root 4096 Mar 19 01:44 conf
drwxr-sr-x 6 root root 4096 Mar 19 01:50 db
-r--r--r-- 1 root root    2 Mar 19 01:43 format
drwxr-xr-x 2 root root 4096 Mar 19 01:43 hooks
drwxr-xr-x 2 root root 4096 Mar 19 01:43 locks
-rw-r--r-- 1 root root  229 Mar 19 01:43 README.txt
代码仓库是以数据库的形式来存放代码。

# cd /home/svn/myproject/conf
# ls
authz  passwd  svnserve.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
mytestyy = hqy123


主配置文件:
打开下面的注释
password-db = passwd

启动svn服务
svnserve -d -T -r /home/svn
-d以deamon模式启动
-T以线程替代进程方式
-r指定svn代码仓库的根目录