centOS 安装 SVN 版本控制
下载地址http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=9755&expandFolder=9755&folderID=260
subversion-deps-1.5.1.tar.gz subversion-1.5.1.tar.gz
两个文件解压以后竟然跑到一起去了,可真神奇
./configure --prefix=/usr/local/svnserver --without-berkeley-db --with-zlib
error: --with-zlib requires an argument. 真奇怪不会自己找? 加上后重试。
./configure --prefix=/usr/local/svnserver --without-berkeley-db --with-zlib=/usr/local/lib
You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL. We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end. You can find the latest version of
Berkeley DB here:
http://www.oracle.com/technology/software/products/berkeley-db/index.html
哦,这个没关系,不用DB 了。
make && make install
安装完成
自动创建软链,不用修改环境变量了
# ll /usr/bin/ |grep svn
-rwxr-xr-x 1 root root 125896 Aug 6 2009 svn
-rwxr-xr-x 1 root root 31544 Aug 6 2009 svnadmin
-rwxr-xr-x 1 root root 21808 Aug 6 2009 svndumpfilter
-rwxr-xr-x 1 root root 37144 Aug 6 2009 svnlook
-rwxr-xr-x 1 root root 48164 Aug 6 2009 svnserve
-rwxr-xr-x 1 root root 24500 Aug 6 2009 svnsync
-rwxr-xr-x 1 root root 8968 Aug 6 2009 svnversion
# svn --version
svn, version 1.4.2 (r22196)
compiled Aug 5 2009, 19:03:56
Copyright (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 access (RA) modules are available:
创建版本库
svnadmin create /home/svnroot/
cd /home/svnroot/conf/
vi authz
添加
test= rw
vi passwd
test= 123456
vi svnserve.conf
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
启动服务
/usr/local/svnserver/bin/svnserve -d -r /home/svnroot/
连接报错
svnserver.conf 12 option expected
发现前面多了空格
试着导入
Authorization failed
#authz-db = authz这行的#保留
自动检出
1,
svn checkout svn://192.168.1.100/home/svn-chkout
2,vi post-commit
#!/bin/sh
export LANG="zh_CN.UTF-8"
svn update /home/svn-chkout
钩子 “post-commit” 失败(退出代码 255) 没有输出。
chmod 755 post-commit