CentOS7.2 编译安装SVN1.9.5客户端
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了CentOS7.2 编译安装SVN1.9.5客户端,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含5851字,纯文字阅读大概需要9分钟。
内容图文
背景
原来想在Linux机上开Samba共享,在Windows机上把工作目录映射到网络驱动器,用Source Insight编辑代码后就不用来回同步文件了。
然而在使用中发现,Windows机用的SVN客户端版本是1.9.4,而CentOS自带的版本是1.7.14。
用Windows更新过SVN Work Directory后,一不小心就更到了SVN1.8版格式(应该可以选不更新格式吧?)
这样弄完,Linux机上就无法使用SVN了(使用1.7版格式,提示客户端版本太旧)。
网上搜RPM包但是CentOS木有更新的版本了,无奈只好琢磨编译安装最新版!这样两个平台都用1.9版的,就应该没问题了!
环境
[root@min-base ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core)
且是Minimal Install
安装
主要参考官网的安装说明,这里没有研究最小依赖安装环境,不过也挺小的了。
安装开发环境工具
[root@min-base ~]# yum -y groupinstall "Deveolpment tools"
这里也会把svn客户端安上,但是是1.7.14版本的,移除它
[root@min-base ~]# yum -y remove subversion
根据安装说明,这里需要几个依赖
安装依赖
[root@min-base ~]# yum -y installyuminstall python-devel zlib openssl openssl-devel file-libs libtool libtool-devel
查看版本
[root@min-base ~]# rpm -qa | grep autoconf autoconf-2.69-11.el7.noarch [root@min-base ~]# rpm -qa | grep libtool libtool-2.4.2-21.el7_2.x86_64 [root@min-base ~]# gcc --version gcc (GCC) 4.8.520150623 (Red Hat 4.8.5-11) Copyright (C) 2015 Free Software Foundation, Inc.
下载svn源码包
[root@min-base ~]# wget http://mirrors.tuna.tsinghua.edu.cn/apache/subversion/subversion-1.9.5.tar.gz [root@min-base ~]# tar zxvf subversion-1.9.5.tar.gz [root@min-base ~]# cd subversion-1.9.5 [root@min-base subversion-1.9.5]# ll -rw-rw-r--. 1100010002032 Mar 112013 aclocal.m4 -rwxrwxr-x. 1100010007726 Jul 272015 autogen.sh -rw-rw-r--. 11000100094 Feb 232010 BUGS drwxrwxr-x. 6100010004096 Nov 2121:57 build -rw-rw-r--. 11000100048346 Jun 242015 build.conf -rw-rw-r--. 110001000850308 Nov 2121:57 build-outputs.mk -rw-rw-r--. 110001000325464 Nov 2121:07 CHANGES -rw-rw-r--. 11000100014126 Jan 262015 COMMITTERS -rwxrwxr-x. 110001000877735 Nov 2121:57 configure -rw-rw-r--. 11000100055079 Nov 1712:00 configure.ac drwxrwxr-x. 41000100066 Nov 2121:57 doc -rw-rw-r--. 11000100023 Nov 2121:57 gen-make.opts -rwxrwxr-x. 11000100010988 May 142015 gen-make.py -rwxrwxr-x. 1100010004859 Aug 412:00 get-deps.sh -rw-rw-r--. 11000100058579 Dec 122015 INSTALL -rw-rw-r--. 11000100019889 Jan 302015 LICENSE -rw-rw-r--. 11000100040217 Dec 102015 Makefile.in -rw-rw-r--. 1100010001132 Apr 212016 NOTICE -rw-rw-r--. 1100010002303 Jun 12016 README drwxrwxr-x. 36100010004096 Nov 2121:57 subversion drwxrwxr-x. 14100010004096 Nov 2121:57 tools -rw-rw-r--. 11000100041944 Dec 72015 win-tests.py
使用自带脚本下载svn依赖(前面加了===的为get-deps.sh脚本下载的依赖)
[root@min-base subversion-1.9.5]# ./get-deps.sh [root@min-base subversion-1.9.5]# ll -rw-rw-r--. 1100010002032 Mar 112013 aclocal.m4 ===drwxr-sr-x. 255000100014096 Feb 82012 apr ===drwxr-xr-x. 1950010004096 Sep 82012 apr-util -rwxrwxr-x. 1100010007726 Jul 272015 autogen.sh -rw-rw-r--. 11000100094 Feb 232010 BUGS drwxrwxr-x. 6100010004096 Nov 2121:57 build -rw-rw-r--. 11000100048346 Jun 242015 build.conf -rw-rw-r--. 110001000850308 Nov 2121:57 build-outputs.mk -rw-rw-r--. 110001000325464 Nov 2121:07 CHANGES -rw-rw-r--. 11000100014126 Jan 262015 COMMITTERS -rwxrwxr-x. 110001000877735 Nov 2121:57 configure -rw-rw-r--. 11000100055079 Nov 1712:00 configure.ac drwxrwxr-x. 41000100066 Nov 2121:57 doc -rw-rw-r--. 11000100023 Nov 2121:57 gen-make.opts -rwxrwxr-x. 11000100010988 May 142015 gen-make.py -rwxrwxr-x. 1100010004859 Aug 412:00 get-deps.sh -rw-rw-r--. 11000100058579 Dec 122015 INSTALL -rw-rw-r--. 11000100019889 Jan 302015 LICENSE -rw-rw-r--. 11000100040217 Dec 102015 Makefile.in -rw-rw-r--. 1100010001132 Apr 212016 NOTICE -rw-rw-r--. 1100010002303 Jun 12016 README ===drwxr-xr-x. 6501 games 4096 Oct 212014 serf ===drwxr-xr-x. 2 root root 71 Dec 202012 sqlite-amalgamation drwxrwxr-x. 36100010004096 Nov 2121:57 subversion drwxrwxr-x. 14100010004096 Nov 2121:57 tools -rw-rw-r--. 11000100041944 Dec 72015 win-tests.py ===drwxr-xr-x. 14501 games 4096 Apr 292013 zlib
下载serf构建工具
[root@min-base subversion-1.9.5]# cd serf [root@min-base serf]# wget http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz [root@min-base serf]# tar zxvf scons-local-2.3.0.tar.gz
按照如下顺序安装
安装apr
[root@min-base ~]# cd ~/subversion-1.9.5/apr [root@min-base apr]# ./buildconf [root@min-base apr]# ./configure [root@min-base apr]# make [root@min-base apr]# makeinstall
安装apr-util
[root@min-base ~]# cd ~/subversion-1.9.5/apr-util [root@min-base apr-util]# ./buildconf [root@min-base apr-util]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config [root@min-base apr-util]# make [root@min-base apr-util]# makeinstall
安装serf
[root@min-base ~]# cd ~/subversion-1.9.5/serf [root@min-base serf]# ln -s /root/subversion-1.9.5/serf/scons.py /usr/local/bin/scons [root@min-base serf]# scons APR=/usr/local/apr/bin/apr-1-config APU=/usr/local/apr/bin/apu-1-config OPENSSL=/usr PREFIX=/usr/local [root@min-base serf]# scons install
安装svn-client
[root@min-base ~]# cd ~/subversion-1.9.5/ [root@min-base ~]# ./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@min-base ~]# make [root@min-base ~]# makeinstall
使用
[root@min-base serf]# svn --version svn, version 1.9.5 (r1770682) compiled Jan 42017, 07:40:17 on x86_64-unknown-linux-gnu Copyright (C) 2016 The Apache Software Foundation. This software consists of contributions made by many people; see the NOTICE fileformore 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
原文:http://www.cnblogs.com/nidey/p/6247242.html
内容总结
以上是互联网集市为您收集整理的CentOS7.2 编译安装SVN1.9.5客户端全部内容,希望文章能够帮你解决CentOS7.2 编译安装SVN1.9.5客户端所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。