svn安装使用问题总结

、遇到的问题
问题1.将线上的SVN环境拷贝过来,配置好后,通过URL访问提示如下信息:Could not open the requested SVN filesystem
查看日志文件,发现:Expected FS format ’2′; found format ’3′

问题产生原因:

服务程序是1.4.x版本的svnserve或mod_dav_svn,版本库通过1.5.x版本的svnadmin或TortoiseSVN创建时,会产生这个问题

解决方法:

使用1.5以上的SVN来作为服务
或使用1.4系列的svnadmin或TortoiseSVN来创建版本库
或使用1.4.x系列创建新版本库,通过1.5.x版本备份并恢复原版本库到新版本库

问题2.

httpd: Syntax error on line 443 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: /usr/local/lib/libsvn_subr-1.so.0: undefined symbol: apr_memcache_add_server

问题产生的原因:

SVN 依赖的APR版本要正确。如果Apache为2.0.x,对应的APR版本应为0.9.x;Apache为2.2.x,对应的APR版本应为1.2.x。 由于subversion-deps包里的APR是0.9.x的,因此编译svn时要删除从deps里解压出来的apr, apr-util,改而使用apache 2.2里提供的。(这里指定为开始安装的apr目录),这一点知识非常重要。

解决方法:
下载apr-1.2.12.tar.gz与apr-util-1.2.12.tar.gz。

编译安装这两个包,然后重新安装下apache与subversion即可。

问题3.

/usr/bin/ld: cannot find -lexpatcollect2: ld returned 1 exit status
make[1]: *** [test/serf_get] 错误 1
make[1]: Leaving directory `/root/build/subversion-1.6.11/serf
‘make: *** [external-all] 错误 1

解决方法:

yum install expat-devel

问题 4
$ svn
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_US.UTF-8
svn: warning: please check that your locale name is correct
Type 'svn help' for usage.   
    解决方法很简单,修改/etc/profile:

sudo vi /etc/profile
加入一行:
export LC_ALL=C
source /etc/profile
 svn就可以正常工作了。


问题备忘:

一些备忘:
1. svn checkout
http://localhost/svn/hello.world

2. svn commit 时的默认编辑器的环境变量$SVN_EDITOR=vi需要手动设定,用kate好像有问题

3. 如果linux的登录用户名密码都和svn的其中一个用户名密码相同时,在checkout的时候不会要求输 入用户名密码直接就可以checkout出来。比如:linux有个用户wooin,svn也有一个用户wooin,并且密码 都是一样的,当用wooin登录linux后,执行checkout,可以直接提取出源码文件,不用输入认证信息。

4. 在svn使用过程中牵扯到几种权限:文件系统的权限,linux系统权限,svn用户的权限,apache进程的权限。

文件系统的权限,linux系统权限:这里相同的意思,就是平时大家使用linux时文件夹和文件的访问权限。在 svn建立仓库,文件夹,配置文件的时候用svnroot用户,并将仓库权限设置为700,不允许其他用户直接通过 文件系统查看,只能由svnroot进行管理。

apache进程的权限:因为所有跟仓库传输的操作都是通过apache进程进行的,所以即使你给svn用户设置了 很大的权限,但是apache进程没有访问仓库或者相关文件的权限也没有用,apache进程的权限设置在 /usr/local/apache2/conf/httpd.conf 文件中配置,找到文件中的这两行:
User daemon # 将daemon改为svnroot,让apache进程以svnroot的身份运行
Group daemon
 

svn用户的权限:就是在repository/authz.conf文件中设置的权限信息,是svn用来管理仓库访问权限的。

5. svn服务器设置有两种方式:http 和 svnserve。这里介绍的是http方法

6. 在/etc/profile的结尾设置一些svn启动时要做的工作 # start apache server for svn
/usr/sbin/apachectl start
export SVN_EDITOR=vi
 

7. APR libraries 安装 SVN 的时候最好指定 --with-apr= 和 --with-apr-util= 参数到 Apache 安装的根目录
(ServerRoot)下,而不是使用缺省的 SVN 安装包中自带的 apr 。否则如果你安装的 Apache
版本不同有可能导致 APR 库不匹配,出现类似:
Can't set position pointer in file '/svn/test/db/revs/1': Invalid argument 的错误。
Updated 2006-04-20 16:30 -- 比如说如果你安装的是apache 2.2.0版本,就需要在编译安装svn的时候指定
--with-apxs和--with-apr参数到你的apache2安装目录下:
./configure --prefix=${subversionInstallFolder} /
--with-apxs=${apacheInstallFolder}/bin/apxs /
--with-apr=${apacheInstallFolder} /
--with-apr-util=${apacheInstallFolder} /
--with-ssl /
--with-zlib /
--enable-maintainer-mode

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值