1.SVN安装
Ubuntu系统下安装:sudo apt-get install subversion
源码安装:1.下载:archive.apache.org/dist/subversion
2.解压:tar xvf subversion-0.19.1.tar.gz
3.移动:sudo mv subversion-0.19.1 /usr/svn
4.进入:/usr/svn,配置:./configure --prefix=/usr/svn
5.编译:make
6.安装:make install
7.设置环境变量:vi /etc/profile 加入:export PATH=/usr/svn/bin:$PATH
8.测试:svn -h
可能依赖的安装包:
gcc(gcc/c++.x86_64)
apr(apr-devel.x86_64)
apr-util(apr-util-devel.x86_64)
sqlite(sqlite-devel.x86_64)
zlib(zlib-devel.x86_64)
编译,出现错误
make[2]: Entering directory `/usr/svn/apr/network_io/unix‘
make[3]: Entering directory `/usr/svn/apr/network_io/unix‘
/bin/bash /usr/svn/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -D_REENTRANT -D_GNU_SOURCE -I../../include -I../../include/arch/unix -I../../include/arch/unix -c sockopt.c && touch sockopt.lo
sockopt.c: In function ‘apr_socket_opt_set‘:
sockopt.c:242:27: error: ‘SCTP_NODELAY‘ undeclared (first use in this function)
optname = SCTP_NODELAY;
^
sockopt.c:242:27: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [sockopt.lo] Error 1
make[3]: Leaving directory `/usr/svn/apr/network_io/unix‘
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/svn/apr/network_io/unix‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/svn/apr‘
make: *** [external-all] Error 1
2.SVN仓库的创建与配置
1.建立版本库目录:mkdir -p /usr/svn/svndata
2.建立版本库:svnadmin create /usr/svndata/repo1
执行该命令后自动在repos目录下添加必须的配置文件
conf db format hooks locks README.txt
conf中的四个配置文件:authz hooks-env.tmpl passwd svnserve.conf
3.多项目多仓库管理