|
[需要的安装包下载](http://pan.baidu.com/s/1qWNhAqS)
在用CentOS默认的svn客户端工具访问Windows下搭建的subversion时会提示如下错误:
[kuring@localhost 桌面]$ svn checkout https://192.168.100.100/svn/test
svn:方法 OPTIONS 失败于 “https://192.168.100.100/svn/test: SSL handshake failed:SSL 错误:Key usage violation in certificate has been detected. (https://192.168.100.100)
通过执行如下命令可以看到svn是支持https协议的:
[kuring@localhost ~]$ svn --version
svn,版本 1.6.11 (r934486)
编译于 Apr 11 2013,16:13:51
版权所有 (C) 2000-2009 CollabNet。
Subversion 是开放源代码软件,请参阅 http://subversion.tigris.org/ 站点。
此产品包含由 CollabNet(http://www.Collab.Net/) 开发的软件。
可使用以下的版本库访问模块:
* ra_neon : 通过 WebDAV 协议使用 neon 访问版本库的模块。
- 处理“http”方案
- 处理“https”方案
* ra_svn : 使用 svn 网络协议访问版本库的模块。 - 使用 Cyrus SASL 认证
- 处理“svn”方案
* ra_local : 访问本地磁盘的版本库模块。
- 处理“file”方案
```
这是由于svn客户端在https协议中使用了GnuTLS库造成的,将其更改为使用openssl库即可。通过执行如下命令可以查看svn使用的库:
[kuring@localhost bin]$ ldd svn | grep ssl
[kuring@localhost bin]$ ldd svn | grep tls
libgnutls.so.26 => /usr/lib64/libgnutls.so.26 (0x00007f33004ad000)
-------
下面选择重新编译的方式来安装svn。
# 删除subversion
执行:`yum remove subversion`
# 检查openssl安装情况
这里已经安装:
[kuring@localhost tmp]$ rpm -qa | grep openssl
openssl-1.0.1e-15.el6.x86_64
openssl-devel-1.0.1e-15.el6.x86_64
# 安装neon
这里选择的安装版本为0.29.6,subversion对neon的版本有要求。如果不是subversion的版本,在执行subversion下的configure文件时并不会报错
[kuring@localhost software]$ tar zvxf neon-0.29.6.tar.gz
[kuring@localhost software]$ cd neon-0.29.6
./configure --with-ssl=openssl
make
make install
# 安装apr
tar zvxf apr-1.5.0.tar.gz
cd apr-1.5.0
./configure
make
make install
# 安装apr-util
tar zvxf apr-util-1.5.3.tar.gz
cd apr-util-1.5.3
./configure --with-apr=/usr/local/apr
make
make install
# 下载sqllite
unzip sqlite-amalgamation-3080401.zip
mv sqlite-amalgamation-3080401 sqlite-amalgamation
mv sqlite-amalgamation subversion-1.7.16/// 将其复制到subversion源码目录下
# 安装subversion
tar zvxf subversion-1.7.16.tar.gz
./configure --with-ssl --with-neon=/usr/local --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
make
make install
然后再执行`svn --version`命令可以看到已经包含了https协议。
# 参考资料
[SSLhandshake failed: SSL error: Key usage violation in certificate has been detected CentOS](http://itekblog.com/key-usage-violation-in-certificate-has-been-detected-centos/)
SVN1.8.9版本支持http和https
操作系统:Centos6.3
SVN版本:1.8.9
昨天编译安装的svn是成功了,在eclipse中是可以用了...不过今天在linux上执行 svn checkout http://.... 命令时候报错了...
svn: E170000: Unrecognized URL scheme for
又重新 svn --version
svn, version 1.8.9 (r1591380)
compiled Jun 7 2014, 06:14:20 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.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
发现 dev 模块根本没加载进来.....
在svn1.8版本之前按照原来的安装方法是可以加载到dav的模块,但是,1.8版本以后,需要serf软件包支持访问 http 协议的版本库,不然就会报错. serf需要用scons来编译安装,所以先安装下scons
wgethttp://downloads.sourceforge.net/project/scons/scons/2.3.0/scons-2.3.0-1.noarch.rpm?r=http%3A%2F%2Fwww.scons.org%2F&ts=1387258358&use_mirror=softlayer-ams
rpm -ivh scons-2.3.0-1.noarch.rpm
下载,编译安装scons
wget https://serf.googlecode.com/files/serf-1.3.3.tar.bz2
scons PREFIX=/home/rely/serf APR=/home/rely/apr APU=/home/rely/apr-util OPENSSL=/usr/bin
tar -jxvf serf-1.3.3.tar.bz2
cd serf-1.3.3
scons install
重新编译svn 加上 --with-serf=/home/rely/serf
./configure--prefix=/home/svn/server --with-apxs=/home/apache/bin/apxs --with-apr=/home/rely/apr/bin/apr-1-config --with-apr-util=/home/rely/apr-util/bin/apu-1-config --without-berkeley-db --with-openssl --enable-maintainer-mode --with-sqlite=/home/sqlite --with-zlib=/home/rely/zlib --with-serf=/home/rely/serf
再加一步,把serf源码包里的 libserf-1.so.1 复制到svn的安装目录下的lib目录,否则会报错
svn: error while loading shared libraries: libserf-1.so.1: cannot open shared object file: No such file or directory
cp libserf-1.so.1 /home/svn/server/lib
svn --version 看下信息
svn, version 1.8.9 (r1591380)
compiled Jun 8 2014, 01:20:36 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.
- 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.3.3
- handles 'http' scheme
- handles 'https' scheme |
|
|