linux:subversion客户端安装及配置-尊龙官方平台

linux:subversion客户端安装及配置

el/2024/3/25 17:06:45

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!


http://www.ngui.cc/el/5127174.html

相关文章

版本中alpha、beta以及rc等代表的含义

版本中alpha、beta以及rc等代表的含义 很多软件在正式发布前都会发布一些预览版或者测试版,一般都叫“beta版”或者 “rc版”,特别是开源软件,可能有alpha版。 alpha版:内部测试版。α是希腊字母的第一个,表示最早的…

svn目录结构:trunk;tags;branches

svn目录结构:trunk;tags;branches 在svn世界中,目录没有特殊的含义(都是人为赋予的),也就是说,所谓的目录结构并不是必须的,而是一种***约定俗成的***,大家都…

linux:使用libgen.h:basename,dirname

linux:使用libgen.h:basename,dirname basename以及dirname是两个命令: [test1280localhost ~]$ which basename /bin/basename [test1280localhost ~]$ which dirname /bin/dirname 可以通过: man 1 basename man…

svn: e220001: item is not readable

svn: e220001: item is not readable 自己搭建的svn服务器,想要看日志时报了一个错: [test1280localhost cjson]$ svn log svn: e220001: item is not readable我的svnserve.conf文件是: anon-access read auth-access write我的authz文…

linux:c/c 接受可变参数的宏

linux:c/c接受可变参数的宏 注:下面的宏定义最好写成大写,我写成了小写debug,需要注意。 测试环境:centos [mytmplocalhost ~]$ uname -a linux localhost.localdomain 2.6.18-371.el5 #1 smp thu sep 5 21:21:44 edt 2013 x86_64…

c/c :宏定义中的#与##

c/c:宏定义中的#与## 测试环境:centos [mytmplocalhost ~]$ uname -a linux localhost.localdomain 2.6.18-371.el5 #1 smp thu sep 5 21:21:44 edt 2013 x86_64 x86_64 x86_64 gnu/linux [mytmplocalhost ~]$ gcc --version gcc (gcc) 4.1.2 20080704 (red hat 4.1…

c/c :__line__;__file__;__date__;__time__;__function__等

c/c:__line__;__file__;__date__;__time__;__function__等 测试环境:centos [mytmplocalhost ~]$ uname -a linux localhost.localdomain 2.6.18-371.el5 #1 smp thu sep 5 21:21:44 edt 2013 x86_64 x86_64 x86_64 gnu/linux [mytmplocalhost ~]$ gcc --version gc…

linux:valgrind使用

linux:valgrind使用 本着实践主义和实用主义,开始学习。 测试环境:centos 7 [test1280localhost 20170504]$ uname -a linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 smp thu nov 19 22:10:57 utc 2015 x86_64 x86_64 x86_64 gnu…

约瑟夫环(josephproblem)

约瑟夫环(josephproblem) 题目: 有41个人围坐成一圈玩游戏,编号分别是0,1,2,…,39,40. 从1开始,每次数到3的人就退出游戏,下个人再次从1开始。 请问最后剩下的人的编号? 约瑟夫环有很多解题…

c/c :使用数组模拟链表

c/c:使用数组模拟链表 链表中每一个node都由两部分组成: 1.真实的数据; 2.下一个数据的位置; 通常的实现可以使用指针作为指示下一个数据的位置的方式,当没有一个合法的数据存在,就将指针部分置为null&…
网站地图