wget http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.6.tar.gz
tar zxvf subversion-1.6.6.tar.gz
tar zxvf subversion-deps-1.6.6.tar.gz
cd subversion-1.6.6
./configure --prefix=/usr/local/svn --with-openssl=/usr/include/openssl --without-berkeley-db
make
make install

添加PATH:

vim /etc/profile

加一行export PATH=$PATH:/usr/local/svn/bin/

source /etc/profile

[root@server ~]# mkdir -p /home/svndata/web #建立版本库
[root@server ~]# /usr/local/svn/bin/svnadmin create /home/svndata/web #修改版本库配置文件
编辑/home/svndata/web/conf/svnserve.conf,内容修改为:
[general]
anon-access = none
auth-access = write
password-db = /usr/local/svn/conf/passwd.conf
authz-db = /usr/local/svn/conf/authz.conf
realm = web
注意:对用户配置文件的修改立即生效,不必重启svn。
在/usr/local/svn/下面新建conf目录,并在/usr/local/svn/conf内新建passwd.conf和authz.conf文件:
mkdir conf
cd conf/
touch passwd.conf
touch authz.conf
编辑/usr/local/svn/conf/passwd.conf,添加如下代码并保存:
[users]
xiao01 = 123456
配置svn用户访问权限,编辑usr/local/svn/conf/authz.conf,添加如下代码并保存:
[groups]
admin = xiao01
[/]
@admin = rw

chown -R svn:svn /home/svndata
root@server ~]# su - svn -c "svnserve -d --listen-port 9999 -r /home/svndata"
其中:
su - svn :表示以用户svn的身份启动svn;
-d :表示以daemon方式(后台运行)运行;
--listen-port 9999 :表示使用9999端口,可以换成你需要的端口。但注意,使用1024以下的端口需要root权限;
-r /home/svndata :指定根目录是/home/svndata。

安装TortoiseSVN,重启系统。启动TortoiseSVN并在地址栏中输入
svn://192.168.3.40:9999/web

根据提示输入用户名与密码后就可以


配置
[groups]
admin=useradmin
devteamcs = useradmin,user1,user2//这里定义了一个用户组
[/]      //对所有的项目,所有的用户都有读权限,admin用户有读写权限
@admin = rw
* = r
[test:/]        //对test项目,


svn升级
原因:svn: This client is too old to work with working copy '.'.  You need
to get a newer Subversion client, or to downgrade this working copy.
See http://subversion.tigris.org/faq.html#working-copy-format-change
for details.
这是由于svn客户端版本过高,导致提交后在服务器上更新出错
解决办法,升级服务端,这里升级到1.7的版本
wget http://archive.apache.org/dist/subversion/subversion-1.7.8.tar.gz
tar zxvf subversion-1.7.8.tar.gz
cd subversion-1.7.8
./configure --prefix=/usr/local/svn --with-openssl=/usr/include/openssl --without-berkeley-db
出现错误,没有sqlite3.c
wget http://www.sqlite.org/sqlite-amalgamation-3070800.zip
unzip sqlite-amalgamation-3070800.zip
cd subversion-1.7.8
mkdir sqlite-amalgamation
cp ../sqlite-amalgamation-3070800/sqlite3.c sqlite-amalgamation/
./configure --prefix=/usr/local/svn --with-openssl=/usr/include/openssl --without-berkeley-db
make
make install
killall  svnserve
/usr/local/svn/bin/svnserve -d --listen-port 10000 -r /data/svndata
到此升级完成,更新没有问题