Windows机用的SVN客户端版本是1.9.7,而CentOS自带的版本是1.7.14,然后版本过低 emmmm
首先移除旧的subversion
[root@izwz92gcbuo8pmfguad15kz ~]# yum -y remove subversion
安装依赖
[root@izwz92gcbuo8pmfguad15kz ~]# yum -y install yum install python-devel zlib openssl openssl-devel file-libs libtool libtool-devel
查看版本
[root@izwz92gcbuo8pmfguad15kz ~]# rpm -qa | grep autoconf
autoconf-2.69-11.el7.noarch
[root@izwz92gcbuo8pmfguad15kz ~]# rpm -qa | grep libtool
libtool-2.4.2-21.el7_2.x86_64
[root@izwz92gcbuo8pmfguad15kz ~]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
Copyright (C) 2015 Free Software Foundation, Inc.
下载svn源码包
[root@izwz92gcbuo8pmfguad15kz ~]# wget http://mirrors.tuna.tsinghua.edu.cn/apache/subversion/subversion-1.9.7.tar.gz
[root@izwz92gcbuo8pmfguad15kz ~]# tar zxvf subversion-1.9.7.tar.gz
[root@izwz92gcbuo8pmfguad15kz ~]# cd subversion-1.9.7
使用自带脚本下载svn依赖
[root@izwz92gcbuo8pmfguad15kz subversion-1.9.7]# ./get-deps.sh
[root@izwz92gcbuo8pmfguad15kz subversion-1.9.7]# ll
-rw-r--r-- 1 www www 2032 Mar 11 2013 aclocal.m4
drwxr-sr-x 26 5000 10001 4096 Jan 30 21:12 apr
drwxr-xr-x 20 500 www 4096 Jan 30 21:13 apr-util
-rwxr-xr-x 1 www www 7726 Jul 27 2015 autogen.sh
-rw-r--r-- 1 www www 94 Feb 23 2010 BUGS
drwxr-xr-x 6 www www 4096 Aug 6 00:22 build
-rw-r--r-- 1 www www 48346 Jun 24 2015 build.conf
-rw-r--r-- 1 www www 850339 Aug 6 00:22 build-outputs.mk
-rw-r--r-- 1 www www 327415 Aug 6 00:22 CHANGES
-rw-r--r-- 1 www www 14126 Jan 26 2015 COMMITTERS
-rw-r--r-- 1 root root 71973 Jan 30 21:35 config.log
-rwxr-xr-x 1 root root 177 Jan 30 21:35 config.nice
-rwxr-xr-x 1 root root 70704 Jan 30 21:35 config.status
-rwxr-xr-x 1 www www 877735 Aug 6 00:22 configure
-rw-r--r-- 1 www www 55079 Nov 17 2016 configure.ac
drwxr-xr-x 4 www www 4096 Aug 6 00:22 doc
-rw-r--r-- 1 www www 23 Aug 6 00:22 gen-make.opts
-rwxr-xr-x 1 www www 10988 May 14 2015 gen-make.py
-rwxr-xr-x 1 www www 4859 Aug 4 2016 get-deps.sh
drwxr-xr-x 2 root root 4096 Jan 30 21:35 gmock-fused
-rw-r--r-- 1 www www 58579 Dec 12 2015 INSTALL
-rwxr-xr-x 1 root root 344884 Jan 30 21:35 libtool
-rw-r--r-- 1 www www 19889 Jan 30 2015 LICENSE
-rw-r--r-- 1 root root 39510 Jan 30 21:35 Makefile
-rw-r--r-- 1 www www 40217 Dec 10 2015 Makefile.in
-rw-r--r-- 1 www www 1132 Jun 30 2017 NOTICE
-rw-r--r-- 1 www www 2303 Jun 1 2016 README
drwxr-xr-x 8 501 games 4096 Jan 30 21:14 serf
drwxr-xr-x 36 www www 4096 Jan 30 21:35 subversion
drwxr-xr-x 14 www www 4096 Aug 6 00:22 tools
-rw-r--r-- 1 www www 41945 Dec 7 2015 win-tests.py
drwxr-xr-x 14 501 games 4096 Apr 29 2013 zlib
下载serf构建工具
[root@izwz92gcbuo8pmfguad15kz subversion-1.9.7]# cd serf
[root@izwz92gcbuo8pmfguad15kz serf]# wget http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz
[root@izwz92gcbuo8pmfguad15kz serf]# tar zxvf scons-local-2.3.0.tar.gz
按照如下顺序安装
安装apr
[root@izwz92gcbuo8pmfguad15kz ~]# cd ~/subversion-1.9.7/apr
[root@izwz92gcbuo8pmfguad15kz apr]# ./buildconf
[root@izwz92gcbuo8pmfguad15kz apr]# ./configure
[root@izwz92gcbuo8pmfguad15kz apr]# make
[root@izwz92gcbuo8pmfguad15kz apr]# make install
安装apr-util
[root@izwz92gcbuo8pmfguad15kz ~]# cd ~/subversion-1.9.7/apr-util
[root@izwz92gcbuo8pmfguad15kz apr-util]# ./buildconf
[root@izwz92gcbuo8pmfguad15kz apr-util]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config
[root@izwz92gcbuo8pmfguad15kz apr-util]# make
[root@izwz92gcbuo8pmfguad15kz apr-util]# make install
安装serf
[root@izwz92gcbuo8pmfguad15kz ~]# cd ~/subversion-1.9.7/serf
[root@izwz92gcbuo8pmfguad15kz serf]# ln -s /root/subversion-1.9.7/serf/scons.py /usr/local/bin/scons
[root@izwz92gcbuo8pmfguad15kz serf]# scons APR=/usr/local/apr/bin/apr-1-config APU=/usr/local/apr/bin/apu-1-config OPENSSL=/usr PREFIX=/usr/local
[root@izwz92gcbuo8pmfguad15kz serf]# scons install
安装svn-client
[root@izwz92gcbuo8pmfguad15kz ~]# cd ~/subversion-1.9.7/
[root@izwz92gcbuo8pmfguad15kz ~]# ./configure --with-serf=/usr/local --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config
[root@izwz92gcbuo8pmfguad15kz ~]# make
[root@izwz92gcbuo8pmfguad15kz ~]# make install
- tps:在以上编译过程中可能会出现 configure: error: Subversion requires SQLite
可以到http://www.sqlite.org/download.html下载最新的sqlite-amalgamation-3220000.zip
,然后将解压出来的文件拷贝到./subversion-1.8.4/sqlite-amalgamation
目录下
之后重新执行以上编译步骤
使用
[root@izwz92gcbuo8pmfguad15kz serf]# svn --version
svn, version 1.9.7 (r1800392)
compiled Jan 30 2018, 21:36:38 on x86_64-unknown-linux-gnu
Copyright (C) 2017 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.8 (compiled with 1.3.8)
- handles 'http' scheme
- handles 'https' scheme
The following authentication credential caches are available:
* Plaintext cache in /root/.subversion
* GPG-Agent
===========
参考https://www.cnblogs.com/nidey/p/6247242.html