1. svn服务器安装操作系统: Redhat Linux AS4
获取svn安装包
下载http://subversion.tigris.org/downloads/subversion-1.4.0.tar.gz和http://subversion.tigris.org/downloads/subversion-deps-1.4.0.tar.gz。
编译svn以root用户登录。
将subversion-1.4.0.tar.gz和subversion-deps-1.4.0.tar.gz传到服务器。
tar xfvz subversion-1.4.0.tar.gz
tar xfvz subversion-deps-1.4.0.tar.gz
cd subversion-1.4.0
./configure --prefix=/usr/local/svn --without-berkeley-db
make clean
make
make install
vi /etc/profile,在/etc/profile最后加入:
PATH=$PATH:/usr/local/svn #注意这里不能有空格 即PATH = $PATH:/usr/local/svn
export PATH
svn测试svnserve –version
如果显示如下,svn安装成功:
svnserve, version 1.4.0 (r21228)
compiled Oct 12 2006, 10:18:56Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository back-end (FS) modules are available:
* fs_fs : Module for working with a plain file (FSFS) repository.
#若出现-bash: svn: command not found 则需要重启 执行命令:reboot
2.svn配置建立svn版本库目录可建多个:
mkdir -p /www/svn/konggu
mkdir -p /www/svn/xinfang
建立svn版本库svnadmin create /www/svn/konggu
svnadmin create /www/svn/xinfang
vi /www/svn/konggu/conf/svnserve.conf
内容修改为:
[general]
anon-access = none
auth-access = write
password-db = pwd
authz-db = authz
realm = konggu
1.创建实例
svnadmin create /www/svn/ershoufang
2.删除实例
rm -rf /www/svn/ershoufang
3.创建用户
#/usr/local/http2/bin/htpasswd -c /www/svn/konggu/conf/passwd tiandongzhi
#报错:The file /www/svn/konggu/conf/passwd does not appear to be a valid htpasswd file.