centos 6.5安装svn并支持https
以前搞过一次,近几天删了某些库,又搞一次...
版本:subversion-1.7.6.tar.gz
1、下载第一个依赖库:apr-1.4.5.tar.gz
解压后cd进入
#./configure --prefix=/usr/local/apr
#make && make install
2、下载第二个依赖库:apr-util-1.3.12.tar.gz
解压后cd进入
#./configure --prefix=/usr/local/apr --with-apr=/usr/local/apr
#make && make install
注意,这俩一定放同一个目录下,否则后续svn运行commit命令将提示:
svn: symbol lookup error: /usr/local/subversion/lib/libsvn_subr-1.so.0: undefined symbol: apr_hash_do
3、下载第三个依赖库:openssl-1.0.0a.tar.gz
#./config
#make && make install
4、下载第四个依赖库:neon-0.29.6.tar.gz
#./configure --with-ssl --with-libs=/usr/local/ssl/ --prefix=/usr/local/neon
#make && make install
这俩第三第四配合用的
PS:安装这个时候出现插曲,提示could not find library containing RSA_new
解决:yum install openssl-devel
另一个插曲,提示error: no XML parser was found: expat or libxml 2.x required
解决:下载expat-2.1.0.tar.gz并安装之
5、下载第五个依赖库:httpd-2.2.19.tar.gz
#./configure --prefix=/usr/local/apache --with-apr=../apr-1.4.5 --with-apr-util=../apr-util-1.3.12 --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite --enable-ssl=/usr/local/ssl
#make && make install
6、下载subversion-1.7.6.tar.gz,编译
#./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-ssl --with-neon=/usr/local/neon
#make && make install
PS:centos6.5 64位版本安装时提示undefined reference to `XML_StopParser'
解决办法,引用自https://blog.csdn.net/supermig/article/details/41351549:
在neon-0.29.6中,运行./configure 后, copy /usr/bin/libtool 到 neon-0.29.6目录中,替换掉原来的(如果没有/usr/bin/libtool 则yum安装一个:yum install libtool)。然后再make &make install
结束后查看版本svn --version,如果能成功看到https实例,则https安装成功。
[root@localhost subversion-1.7.6]# svn --version
svn, version 1.7.6 (r1370777)
compiled Oct 17 2018, 05:23:34
Copyright (C) 2012 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_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
- handles 'https' scheme
* 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
最后将几个常用指令尝试一遍,没有错误的话,恭喜。。
PS:实际svn checkout https://xxx时如果出现sqlite错误svn: E200030: SQLite compiled for 3.8.8.3, but running with 3.6.20
解决方案在这里https://blog.csdn.net/shy_hc/article/details/51323481:
将编译安装的sqlite so库从/usr/local/lib直接覆盖到/usr/lib64下。