Linux svn的安装

9 篇文章 0 订阅

orzdba这个工具是taobao开发的,是一个很不错的工具。orzdba工具下载,需要使用到svn进行下载。所以首先就要先安装svn工具。然而,svn的安装也是比较麻烦的,需要各种包进行支持。

环境:RHEL 6.4 x86_64


1. 使用yum安装一些RPM包

# yum install libserf libtool autoconf gcc libapr libapr-util *sqlite* libz libmagic apr-devel apr-util-devel perl-Class-Data-Inheritable.noarch

2. 安装serf-1.2.1


yum -y install expat-devel
wget http://serf.googlecode.com/files/serf-1.2.1.tar.bz2
tar xjf serf-1.2.1.tar.bz2
cd serf-1.2.1
./configure --prefix=/usr/local/serf
make && make install
 
说明:
(1)1.8版本之前的需要加neon,1.8版本之后弃用neon而改使用serf;
(2)这里使用的是serf-1.2.1,据说subversion 1.8版本使用serf-1.3.0会有异常。
 

3. svn安装

下载subversion:
https://subversion.apache.org/download/
说明:这里使用源码安装。虽然也有RPM包,但每次使用RPM包安装都是失败的。
安装subversion时需要使用到sqlite 3.7.15.1 amalgamation,所以也下载:
http://www.sqlite.org/sqlite-amalgamation-3071501.zip
 
tar xvzf subversion-1.8.9.tar.gz
unzip sqlite-amalgamation-3071501.zip -d ./subversion-1.8.9/
cd subversion-1.8.9/
mv sqlite-amalgamation-3071501 sqlite-amalgamation
./configure --with-serf=/usr/local/serf   ## 1.8版本之前,使用neon,--with-neno=/usr/local/neon
make && make install
 

4. 验证svn是否安装正确


# svn --version
svn, version 1.8.9 (r1591380)
   compiled Aug  1 2014, 22:22:48 on x86_64-unknown-linux-gnu
 
Copyright (C) 2014 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
 
The following repository access (RA) modules are available:
 
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.2.1
  - handles 'http' scheme
  - handles 'https' scheme
支持http、https,安装是OK的。
 
 

5. 安装错误处理方法

(1)在subversion的./configure时出现如下错误:
checking sqlite library version (via header)... unsupported SQLite version
checking sqlite library version (via pkg-config)... none or unsupported 3.6.20
no
 
An appropriate version of sqlite could not be found.  We recommmend
3.7.15.1, but require at least 3.7.12.
Please either install a newer sqlite on this system
 
or
 
get the sqlite 3.7.15.1 amalgamation from:
    http://www.sqlite.org/sqlite-amalgamation-3071501.zip
unpack the archive using unzip and rename the resulting
directory to:
/root/subversion-1.8.9/sqlite-amalgamation
 
configure: error: Subversion requires SQLite
 
就是由于sqlite的版本过低导致,解决办法:
下载:http://www.sqlite.org/sqlite-amalgamation-3071501.zip
然后unzip解决到./subversion-1.8.9/sqlite-amalgamation目录下,重新./configure后通过。
 
(2)安装完成subversion后,使用svn获取http或https上资源时报错:
# svn co http://code.taobao.org/svn/orzdba/trunk 
svn: E170000: Unrecognized URL scheme for 'http://code.taobao.org/svn/orzdba/trunk'
 
解决办法:
在安装subversion之前没有先安装serf。当安装了serf后重新编译subversion即可。
 

-- Bosco
---- END ----

-------------------------------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值