subversion1.7版本SSL安装

本文介绍在SUSE Linux环境下从源码安装Subversion (SVN) 的详细步骤,并解决安装过程中遇到的问题,如支持HTTP和HTTPS访问、配置neon库等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

转自http://blog.youkuaiyun.com/icelemon1314/article/details/8535645

在suse linux试过,可以成功安装

安装脚本如下:

[plain]  view plain copy
  1. #!/bin/bash  
  2.   
  3. yum -y remove subversion  
  4. mkdir -p /dist/{dist,src}  
  5. cd /dist/dist  
  6. /bin/rm -f openssl* subversion*  
  7. wget "http://www.openssl.org/source/openssl-1.0.1c.tar.gz"  
  8. wget "http://labs.mop.com/apache-mirror/subversion/subversion-1.7.8.tar.gz"  
  9. wget "http://mirror.bjtu.edu.cn/apache/apr/apr-1.4.6.tar.gz"  
  10. wget "http://mirror.bjtu.edu.cn/apache/apr/apr-util-1.5.1.tar.gz"  
  11. wget "http://www.sqlite.org/sqlite-autoconf-3071502.tar.gz"  
  12. wget "http://www.webdav.org/neon/neon-0.29.6.tar.gz"  
  13.   
  14. cd /dist/src  
  15. rm -rf openssl*  
  16. rm -rf subversion*  
  17. rm -rf apr*  
  18. rm -rf sqlite*  
  19. rm -rf neon*  
  20.   
  21. tar xf /dist/dist/openssl-1.0.1c.tar.gz  
  22. cd openssl-1.0.1c  
  23. ./config --prefix=/usr/local/ssl-1.0.1c shared  
  24. ./config -t  
  25. make  
  26. make install  
  27. echo '/usr/local/ssl-1.0.1c/lib' >/etc/ld.so.conf.d/openssl.conf  
  28. ldconfig -v  
  29. cd /dist/src  
  30. tar xf /dist/dist/apr-1.4.6.tar.gz  
  31. cd apr-1.4.6/  
  32. ./configure --prefix=/usr/local/apr  
  33. make  
  34. make install  
  35. cd /dist/src  
  36. tar xf /dist/dist/apr-util-1.5.1.tar.gz  
  37. cd apr-util-1.5.1/  
  38. ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr  
  39. make  
  40. make install  
  41. cd /dist/src  
  42. tar xf /dist/dist/sqlite-autoconf-3071502.tar.gz  
  43. cd sqlite-autoconf-3071502  
  44. ./configure --prefix=/usr/local/sqlite  
  45. make  
  46. make install  
  47. cd /dist/src  
  48. tar xf /dist/dist/neon-0.29.6.tar.gz  
  49. cd neon-0.29.6  
  50. ./configure --prefix=/usr/local/neon --with-ssl=openssl  
  51. make  
  52. make install  
  53.   
  54. cd /dist/src  
  55. tar xf /dist/dist/subversion-1.7.8.tar.gz  
  56. cd subversion-1.7.8  
  57. ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-sqlite=/usr/local/sqlite --with-ssl --without-berkeley-db --with-neon=/usr/local/neon  
  58. make   
  59. make install  
  60.   
  61. ln -s /usr/local/bin/svn /usr/bin/  


在安装过程中遇到的几个问题:

1、安装subversion后,在svn co https://www.xxx.com/的时候报错:

[plain]  view plain copy
  1. svn: E170000: Unrecognized URL scheme for  
这个是由于你安装的svn不支持http的方式,通过命令【svn --version】可以看到:

[plain]  view plain copy
  1. The following repository access (RA) modules are available:  
  2.   
  3. * ra_svn : Module for accessing a repository using the svn network protocol.  
  4.   - handles 'svn' scheme  
  5. * ra_local : Module for accessing a repository on local disk.  
  6.   - handles 'file' scheme  

上图中的svn只支持svn和file两种方式,所以我们需要安装neon让svn来支持http和https方式,安装办法见完整脚本


2、默认安装好neon的时候,svn是不支持https方式的,通过svn --version可以看到:

[plain]  view plain copy
  1. The following repository access (RA) modules are available:  
  2.   
  3. * ra_neon : Module for accessing a repository via WebDAV protocol using Neon.  
  4.   - handles 'http' scheme  
  5. * ra_svn : Module for accessing a repository using the svn network protocol.  
  6.   - handles 'svn' scheme  
  7. * ra_local : Module for accessing a repository on local disk.  
  8.   - handles 'file' scheme  

所以我们在编译neon的时候需要加上参数:--with-ssl=openssl 这样完整的编译完成后,就可以看到:

出现error: OpenSSL headers not found时,可以使用--with-ssl-headers=/usr/local/ssl安装目录/include/ --with-ssl-lib=/usr/local/ssl安装目录/lib/代替--with-ssl=openssl 

[plain]  view plain copy
  1. The following repository access (RA) modules are available:  
  2.   
  3. * ra_neon : Module for accessing a repository via WebDAV protocol using Neon.  
  4.   - handles 'http' scheme  
  5.   - handles 'https' scheme  
  6. * ra_svn : Module for accessing a repository using the svn network protocol.  
  7.   - handles 'svn' scheme  
  8. * ra_local : Module for accessing a repository on local disk.  
  9.   - handles 'file' scheme  


3、在安装subversion的时候,make后出现如下报错,原因是在configure的时候没有指定--with-neon参数,导致错误

[plain]  view plain copy
  1. /usr/local/lib/libneon.a(ne_auth.o): In function `clean_session':  
  2. /dist/src/neon-0.29.6/src/ne_auth.c:305: undefined reference to `ne__ntlm_destroy_context'  
  3. /usr/local/lib/libneon.a(ne_auth.o): In function `request_ntlm':  
  4. /dist/src/neon-0.29.6/src/ne_auth.c:754: undefined reference to `ne__ntlm_getRequestToken'  
  5. /usr/local/lib/libneon.a(ne_auth.o): In function `ntlm_challenge':  
  6. /dist/src/neon-0.29.6/src/ne_auth.c:788: undefined reference to `ne__ntlm_authenticate'  
  7. /dist/src/neon-0.29.6/src/ne_auth.c:781: undefined reference to `ne__ntlm_destroy_context'  
  8. /dist/src/neon-0.29.6/src/ne_auth.c:785: undefined reference to `ne__ntlm_create_context'  
  9. collect2: ld returned 1 exit status  
  10. make: *** [subversion/libsvn_ra_neon/libsvn_ra_neon-1.la] Error 1  



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值