Linux:Subversion客户端安装及配置

2024-03-25 17:08

本文主要是介绍Linux:Subversion客户端安装及配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Linux:Subversion客户端安装及配置

注:如果很着急安装,可以直接看第二种方式;如果不着急,还想要体验一把“依赖”的酸爽,可以慢慢看下面的步骤。

环境:

CentOS 6.8:

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

一、从官网获取源码包

http://subversion.apache.org/

二、上传源码包至/usr/local/src下

[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# pwd
/usr/local/src
[root@localhost src]# ll
total 10368
-rw-r--r--. 1 root root 10615674 Apr 27 08:33 subversion-1.9.5.tar.gz

三、解压缩

[root@localhost src]# tar zxf subversion-1.9.5.tar.gz 
[root@localhost src]# ll
total 10372
drwxrwxr-x. 6 1000 1000     4096 Nov 21 05:57 subversion-1.9.5
-rw-r--r--. 1 root root 10615674 Apr 27 08:33 subversion-1.9.5.tar.gz

四、看看INSTALL文件

注意有以下内容:

II.   INSTALLATION============A.  Building from a Tarball------------------------------1.  Building from a TarballDownload the most recent distribution tarball from:http://subversion.apache.org/download/Unpack it, and use the standard GNU procedure to compile:$ ./configure$ make # make installYou can also run the full test suite by running 'make check'.  Even in successful runs, some tests will report XFAIL; that is normal.Failed runs are indicated by FAIL or XPASS results, or a non-zero exit code from "make check".

……我觉得我的博客都不用再写了。。

五、我的安装过程

[root@localhost subversion-1.9.5]# ./configure --prefix=/usr/local/subversion
configure: Configuring Subversion 1.9.5
configure: creating config.nice
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
……
checking for APR... no
configure: WARNING: APR not found
The Apache Portable Runtime (APR) library cannot be found.
Please install APR on this system and configure Subversion
with the appropriate --with-apr option.You probably need to do something similar with the Apache
Portable Runtime Utility (APRUTIL) library and then configure
Subversion with both the --with-apr and --with-apr-util options.configure: error: no suitable APR found

没有APR。

说的很明白了,没找到APR库,检查–with-apr是不是有问题。

好吧,现在开始安装APR。

http://apr.apache.org/

我下载的是:

apr-1.5.2.tar.gz

同理上传到:

/usr/local/src
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# pwd
/usr/local/src
[root@localhost src]# ll
total 11380
-rw-r--r--. 1 root root  1031613 Apr 27 08:38 apr-1.5.2.tar.gz
drwxrwxr-x. 6 1000 1000     4096 Apr 27 08:35 subversion-1.9.5
-rw-r--r--. 1 root root 10615674 Apr 27 08:33 subversion-1.9.5.tar.gz
[root@localhost src]# tar zxf apr-1.5.2.tar.gz 
[root@localhost src]# ll
total 11384
drwxr-xr-x. 27 1000 1000     4096 Apr 25  2015 apr-1.5.2
-rw-r--r--.  1 root root  1031613 Apr 27 08:38 apr-1.5.2.tar.gz
drwxrwxr-x.  6 1000 1000     4096 Apr 27 08:35 subversion-1.9.5
-rw-r--r--.  1 root root 10615674 Apr 27 08:33 subversion-1.9.5.tar.gz
[root@localhost apr-1.5.2]# ./configure --prefix=/usr/local/apr
……
[root@localhost apr-1.5.2]# make && make install
……
----------------------------------------------------------------------
Libraries have been installed in:/usr/local/apr/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:- add LIBDIR to the `LD_LIBRARY_PATH' environment variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring linking- use the `-Wl,-rpath -Wl,LIBDIR' linker flag- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
……
[root@localhost local]# pwd
/usr/local
[root@localhost local]# ll
total 44
drwxr-xr-x. 6 root root 4096 Apr 27 08:41 apr
drwxr-xr-x. 2 root root 4096 Sep 23  2011 bin
drwxr-xr-x. 2 root root 4096 Sep 23  2011 etc
drwxr-xr-x. 2 root root 4096 Sep 23  2011 games
drwxr-xr-x. 2 root root 4096 Sep 23  2011 include
drwxr-xr-x. 2 root root 4096 Sep 23  2011 lib
drwxr-xr-x. 2 root root 4096 Sep 23  2011 lib64
drwxr-xr-x. 2 root root 4096 Sep 23  2011 libexec
drwxr-xr-x. 2 root root 4096 Sep 23  2011 sbin
drwxr-xr-x. 5 root root 4096 Apr 26 14:41 share
drwxr-xr-x. 4 root root 4096 Apr 27 08:38 src

可以看到已经有了apr目录。

[root@localhost local]# pwd
/usr/local
[root@localhost local]# cd apr/
[root@localhost apr]# pwd
/usr/local/apr
[root@localhost apr]# ll
total 16
drwxr-xr-x. 2 root root 4096 Apr 27 08:41 bin
drwxr-xr-x. 2 root root 4096 Apr 27 08:41 build-1
drwxr-xr-x. 3 root root 4096 Apr 27 08:41 include
drwxr-xr-x. 3 root root 4096 Apr 27 08:41 lib
[root@localhost apr]# cd bin/
[root@localhost bin]# ll
total 8
-rwxr-xr-x. 1 root root 6946 Apr 27 08:41 apr-1-config

建立一个软链接:

[root@localhost bin]# ln -s /usr/local/apr/bin/apr-1-config /usr/bin/apr-1-config
[root@localhost bin]# which apr-1-config
/usr/bin/apr-1-config

这回应该可以了吧?

[root@localhost subversion-1.9.5]# ./configure --prefix=/usr/local/subversion
……
configure: Apache Portable Runtime (APR) library configuration
checking for APR... yes
checking APR version... 1.5.2
configure: Apache Portable Runtime Utility (APRUTIL) library configuration
checking for APR-util... no
configure: WARNING: APRUTIL not found
The Apache Portable Runtime Utility (APRUTIL) library cannot be found.
Install APRUTIL on this system and configure Subversion with theappropriate --with-apr-util option.configure: error: no suitable APRUTIL found

可以看到,检查APR已经OK了,但是APR-util没找到。

再去安装APR-util吧。

依然是上面的官网:

http://apr.apache.org

下载,上传,解压缩…

[root@localhost src]# cd
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# ll
total 12232
drwxr-xr-x. 28 1000 1000     4096 Apr 27 08:41 apr-1.5.2
-rw-r--r--.  1 root root  1031613 Apr 27 08:38 apr-1.5.2.tar.gz
-rw-r--r--.  1 root root   867573 Apr 27 08:54 apr-util-1.5.2.tar.gz
drwxrwxr-x.  6 1000 1000     4096 Apr 27 08:46 subversion-1.9.5
-rw-r--r--.  1 root root 10615674 Apr 27 08:33 subversion-1.9.5.tar.gz
[root@localhost src]# tar zxf apr-util-1.5.2.tar.gz 
[root@localhost src]# ll
total 12236
drwxr-xr-x. 28 1000 1000     4096 Apr 27 08:41 apr-1.5.2
-rw-r--r--.  1 root root  1031613 Apr 27 08:38 apr-1.5.2.tar.gz
drwxr-xr-x. 19 1000 1000     4096 Mar 30  2013 apr-util-1.5.2
-rw-r--r--.  1 root root   867573 Apr 27 08:54 apr-util-1.5.2.tar.gz
drwxrwxr-x.  6 1000 1000     4096 Apr 27 08:46 subversion-1.9.5
-rw-r--r--.  1 root root 10615674 Apr 27 08:33 subversion-1.9.5.tar.gz
[root@localhost apr-util-1.5.2]# ./configure --prefix=/usr/local/apr-util
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
APR-util Version: 1.5.2
checking for chosen layout... apr-util
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Applying apr-util hints file rules for x86_64-unknown-linux-gnu
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.

指定一下apr的位置。

[root@localhost apr-util-1.5.2]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
……
[root@localhost apr-util-1.5.2]# make && make install
……
----------------------------------------------------------------------
Libraries have been installed in:/usr/local/apr-util/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:- add LIBDIR to the `LD_LIBRARY_PATH' environment variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring linking- use the `-Wl,-rpath -Wl,LIBDIR' linker flag- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
……
[root@localhost apr-util-1.5.2]# cd /usr/local/apr-util/
[root@localhost apr-util]# ll
total 12
drwxr-xr-x. 2 root root 4096 Apr 27 08:57 bin
drwxr-xr-x. 3 root root 4096 Apr 27 08:57 include
drwxr-xr-x. 3 root root 4096 Apr 27 08:57 lib
[root@localhost apr-util]# cd bin/
[root@localhost bin]# ll
total 8
-rwxr-xr-x. 1 root root 6542 Apr 27 08:57 apu-1-config
[root@localhost bin]# ln -s /usr/local/apr-util/bin/apu-1-config /usr/bin/apu-1-config
[root@localhost bin]# which apu-1-config
/usr/bin/apu-1-config

这下子可以在subversion中执行configure了吧?

[root@localhost bin]# cd /usr/local/src/subversion-1.9.5/
[root@localhost subversion-1.9.5]# ./configure --prefix=/usr/local/subversion 
……
configure: checking sqlite library
checking sqlite amalgamation... no
checking sqlite amalgamation... no
checking sqlite3.h usability... no
checking sqlite3.h presence... no
checking for sqlite3.h... no
checking sqlite library version (via pkg-config)... noAn appropriate version of sqlite could not be found.  We recommmend
3.7.15.1, but require at least 3.7.12.
Please either install a newer sqlite on this systemorget the sqlite 3.7.15.1 amalgamation from:http://www.sqlite.org/sqlite-amalgamation-3071501.zip
unpack the archive using unzip and rename the resulting
directory to:
/usr/local/src/subversion-1.9.5/sqlite-amalgamationconfigure: error: Subversion requires SQLite

步骤说的很明白了。

首先下载

http://www.sqlite.org/sqlite-amalgamation-3071501.zip

然后解压缩到指定目录即可。

[root@localhost subversion-1.9.5]# cd
[root@localhost ~]# pwd
/root
[root@localhost ~]# cd /usr/local/src/subversion-1.9.5/
[root@localhost subversion-1.9.5]# ll
total 3752
……
-rw-r--r--.  1 root root 1396268 Apr 27 09:03 sqlite-amalgamation-3071501.zip
drwxrwxr-x. 36 1000 1000    4096 Nov 21 05:57 subversion
……
[root@localhost subversion-1.9.5]# unzip sqlite-amalgamation-3071501.zip 
Archive:  sqlite-amalgamation-3071501.zipcreating: sqlite-amalgamation-3071501/inflating: sqlite-amalgamation-3071501/sqlite3.h  inflating: sqlite-amalgamation-3071501/shell.c  inflating: sqlite-amalgamation-3071501/sqlite3ext.h  inflating: sqlite-amalgamation-3071501/sqlite3.c  
[root@localhost subversion-1.9.5]# rm sqlite-amalgamation-3071501.zip 
rm: remove regular file `sqlite-amalgamation-3071501.zip'? y
[root@localhost subversion-1.9.5]# ll
total 2392
……
-rw-rw-r--.  1 1000 1000   2303 May 31  2016 README
drwxr-xr-x.  2 root root   4096 Dec 19  2012 sqlite-amalgamation-3071501
drwxrwxr-x. 36 1000 1000   4096 Nov 21 05:57 subversion
……
[root@localhost subversion-1.9.5]# mv sqlite-amalgamation-3071501 sqlite-amalgamation

最后一步别忘记按照人家的提示重命名呀!

[root@localhost subversion-1.9.5]# ./configure --prefix=/usr/local/subversion
……
configure: zlib library configuration via pkg-config
checking for zlib library... no
configure: zlib library configuration
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
configure: error: subversion requires zlib

安装zlib。

http://www.zlib.net/
zlib-1.2.11.tar.gz
[root@localhost src]# ll zlib* -d
drwxr-xr-x. 14 test1280 games   4096 Jan 15 09:36 zlib-1.2.11
-rw-r--r--.  1 root     root  607698 Apr 27 09:10 zlib-1.2.11.tar.gz
[root@localhost zlib-1.2.11]# ./configure
Checking for gcc...
Checking for shared library support...
Building shared library libz.so.1.2.11 with gcc.
Checking for size_t... Yes.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
[root@localhost zlib-1.2.11]# make && make install
……

再次在subversion中configure:

[root@localhost subversion-1.9.5]# ./configure --prefix=/usr/local/subversion
……

执行成功。

[root@localhost subversion-1.9.5]# make && make install
……

得执行好一阵~

[root@localhost ~]# cd /usr/local/subversion/
[root@localhost subversion]# ll
total 16
drwxr-xr-x. 2 root root 4096 Apr 27 09:17 bin
drwxr-xr-x. 3 root root 4096 Apr 27 09:17 include
drwxr-xr-x. 2 root root 4096 Apr 27 09:17 lib
drwxr-xr-x. 4 root root 4096 Apr 27 09:17 share
[root@localhost subversion]# ll bin/
total 2632
-rwxr-xr-x. 1 root root 1174906 Apr 27 09:17 svn
-rwxr-xr-x. 1 root root  171860 Apr 27 09:17 svnadmin
-rwxr-xr-x. 1 root root  225211 Apr 27 09:17 svnbench
-rwxr-xr-x. 1 root root   92387 Apr 27 09:17 svndumpfilter
-rwxr-xr-x. 1 root root  100064 Apr 27 09:17 svnfsfs
-rwxr-xr-x. 1 root root  161796 Apr 27 09:17 svnlook
-rwxr-xr-x. 1 root root   88406 Apr 27 09:17 svnmucc
-rwxr-xr-x. 1 root root  184701 Apr 27 09:17 svnrdump
-rwxr-xr-x. 1 root root  286996 Apr 27 09:17 svnserve
-rwxr-xr-x. 1 root root  148724 Apr 27 09:17 svnsync
-rwxr-xr-x. 1 root root   38888 Apr 27 09:17 svnversion
[root@localhost subversion]# which svn
/usr/bin/which: no svn in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@localhost subversion]# ln -s /usr/local/subversion/bin/svn /usr/bin/svn
[root@localhost subversion]# which svn
/usr/bin/svn

简直太麻烦了!!!

注:

相关的代码包可以从我的个人资源里面下载。


----------------------------------分割线----------------------------------------


上面的是直接源码安装,是在是各种依赖各种安装。。

其实有很简单的方式就能安装好svn.

官网中很明确地说了:

这里写图片描述

下面的是一样一样的机器(VM),我直接按照官网yum来去做:

首先执行:

yum install subversion

这里写图片描述

结果是:

这里写图片描述

有客户端(svn),但是无svnserve。

执行:

yum install mod_dav_svn

结果是:

这里写图片描述

安装完毕后即可看到svnserve。

最后带上个链接:

http://blog.csdn.net/fengyily/article/details/36649711

个人认为这个写的很不错~很有参考价值。

需要注意的是,这个版本比较旧,有两个包,其中一个是deps。

而在我上面介绍的源码安装只有一个包,对此,官网给的解释是:

这里写图片描述

这里写图片描述

不再使用deps!

这篇关于Linux:Subversion客户端安装及配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/845668

相关文章

Linux之systemV共享内存方式

《Linux之systemV共享内存方式》:本文主要介绍Linux之systemV共享内存方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、工作原理二、系统调用接口1、申请共享内存(一)key的获取(二)共享内存的申请2、将共享内存段连接到进程地址空间3、将

Win安装MySQL8全过程

《Win安装MySQL8全过程》:本文主要介绍Win安装MySQL8全过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Win安装mysql81、下载MySQL2、解压文件3、新建文件夹data,用于保存数据库数据文件4、在mysql根目录下新建文件my.ini

SpringBoot3.4配置校验新特性的用法详解

《SpringBoot3.4配置校验新特性的用法详解》SpringBoot3.4对配置校验支持进行了全面升级,这篇文章为大家详细介绍了一下它们的具体使用,文中的示例代码讲解详细,感兴趣的小伙伴可以参考... 目录基本用法示例定义配置类配置 application.yml注入使用嵌套对象与集合元素深度校验开发

IntelliJ IDEA 中配置 Spring MVC 环境的详细步骤及问题解决

《IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决》:本文主要介绍IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决,本文分步骤结合实例给大... 目录步骤 1:创建 Maven Web 项目步骤 2:添加 Spring MVC 依赖1、保存后执行2、将新的依赖

快速修复一个Panic的Linux内核的技巧

《快速修复一个Panic的Linux内核的技巧》Linux系统中运行了不当的mkinitcpio操作导致内核文件不能正常工作,重启的时候,内核启动中止于Panic状态,该怎么解决这个问题呢?下面我们就... 感谢China编程(www.chinasem.cn)网友 鸢一雨音 的投稿写这篇文章是有原因的。为了配置完

SpringBoot基于配置实现短信服务策略的动态切换

《SpringBoot基于配置实现短信服务策略的动态切换》这篇文章主要为大家详细介绍了SpringBoot在接入多个短信服务商(如阿里云、腾讯云、华为云)后,如何根据配置或环境切换使用不同的服务商,需... 目录目标功能示例配置(application.yml)配置类绑定短信发送策略接口示例:阿里云 & 腾

如何为Yarn配置国内源的详细教程

《如何为Yarn配置国内源的详细教程》在使用Yarn进行项目开发时,由于网络原因,直接使用官方源可能会导致下载速度慢或连接失败,配置国内源可以显著提高包的下载速度和稳定性,本文将详细介绍如何为Yarn... 目录一、查询当前使用的镜像源二、设置国内源1. 设置为淘宝镜像源2. 设置为其他国内源三、还原为官方

最详细安装 PostgreSQL方法及常见问题解决

《最详细安装PostgreSQL方法及常见问题解决》:本文主要介绍最详细安装PostgreSQL方法及常见问题解决,介绍了在Windows系统上安装PostgreSQL及Linux系统上安装Po... 目录一、在 Windows 系统上安装 PostgreSQL1. 下载 PostgreSQL 安装包2.

Maven如何手动安装依赖到本地仓库

《Maven如何手动安装依赖到本地仓库》:本文主要介绍Maven如何手动安装依赖到本地仓库问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、下载依赖二、安装 JAR 文件到本地仓库三、验证安装四、在项目中使用该依赖1、注意事项2、额外提示总结一、下载依赖登

CentOS7更改默认SSH端口与配置指南

《CentOS7更改默认SSH端口与配置指南》SSH是Linux服务器远程管理的核心工具,其默认监听端口为22,由于端口22众所周知,这也使得服务器容易受到自动化扫描和暴力破解攻击,本文将系统性地介绍... 目录引言为什么要更改 SSH 默认端口?步骤详解:如何更改 Centos 7 的 SSH 默认端口1