Linux中编译安装Subversion客户端的教程

这篇文章主要讲解了“Linux中编译安装Subversion客户端的教程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Linux中编译安装Subversion客户端的教程”吧!

创新互联公司服务项目包括浏阳网站建设、浏阳网站制作、浏阳网页制作以及浏阳网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,浏阳网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到浏阳省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

Subversion(简称svn)是近年来崛起的版本管理软件系统,是cvs的接班人。目前,绝大多数开源软件都使用svn作为代码版本管理软件。
Subversion是一个版本控制系统,相对于的RCS、CVS,采用了分支管理系统,它的设计目标就是取代CVS。互联网上免费的版本控制服务多基于Subversion。
Subversion的版本库可以通过网络访问,从而使用户可以在不同的电脑上进行操作。从某种程度上来说,允许用户在各自的空间里修改和管理同一组数据可以促进团队协作。因为修改不再是单线进行(单线进行也就是必须一个一个进行),开发进度会进展迅速。此外,由于所有的工作都已版本化,也就不必担心由于错误的更改而影响软件质量—如果出现不正确的更改,只要撤销那一次更改操作即可。某些版本控制系统本身也是软件配置管理系统(SCM),这种系统经过精巧的设计,专门用来管理源代码树,并且具备许多与软件开发有关的特性—比如,对编程语言的支持,或者提供程序构建工具。不过Subversion并不是这样的系统。它是一个通用系统,可以管理任何类型的文件集。

Subversion 1.8中http客户端基于neon已经被移除,改用self。如果要支持http方式需要在安装svn前安装serf,安装serf推荐用serf-1.2.1,安装是./configure;serf-1.3.0安装是用scons(yum -y install scons)方式,安装serf-1.3.0后安装可能会报误,Google没找到解决方法,如下报错
checking for serf-2 library... no
checking for serf-1 library... no
checking was serf enabled... no

An appropriate version of serf could not be found, so libsvn_ra_serf
will not be built.  If you want to build libsvn_ra_serf, please
install serf 1.2.1 or newer.

configure: error: Serf was explicitly enabled but an appropriate version was not found.

安装步骤:
(本文只基于LAMP一键安装包环境部署好之后进行)
1. 安装apr、apr-unit

代码如下:


cd /root/lamp/source
#wget http://archive.apache.org/dist/apr/apr-1.4.8.tar.gz #LAMP中已经下载
#wget http://archive.apache.org/dist/apr/apr-util-1.5.2.tar.gz
tar xzf apr-1.4.8.tar.gz
cd apr-1.4.8
./configure --prefix=/usr/local/apache
make && make install
cd ../
tar xzf apr-util-1.5.2.tar.gz
cd apr-util-1.5.2
./configure --prefix=/usr/local/apache
make && make install
cd ../

2. 安装serf-1.2.1

代码如下:


yum -y install expat-devel
wget http://serf.googlecode.com/files/serf-1.2.1.tar.bz2 #serf-1.2.1.zip是win版有问题
tar xjf serf-1.2.1.tar.bz2
cd serf-1.2.1
./configure --prefix=/usr/local/serf --with-apr=/usr/local/apache --with-apr-util=/usr/local/apache
make && make install
cd ..

3. 安装svn

代码如下:


tar xzf subversion-1.8.1.tar.gz
cd subversion-1.8.1
./get-deps.sh
./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs \
--with-apr=/usr/local/apache --with-apr-util=/usr/local/apache --with-zlib \
--with-openssl --enable-maintainer-mode --with-serf=/usr/local/serf --enable-mod-activation
make && make install
cd ..

4. 检查是否安装成功
安装成功会在/usr/local/apache/conf/httpd.conf自己加入下面2行

代码如下:


LoadModule dav_svn_module     /usr/local/subversion/libexec/mod_dav_svn.so
LoadModule authz_svn_module   /usr/local/subversion/libexec/mod_authz_svn.so


 检查svn是否支持http方式:

代码如下:


# svn --version


svn, version 1.8.1 (r1503906)
   compiled Aug  2 2013, 11:36:48 on x86_64-unknown-linux-gnu

Copyright (C) 2013 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.
  - with Cyrus SASL authentication
  - 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.
  - handles 'http' scheme
  - handles 'https' scheme

感谢各位的阅读,以上就是“Linux中编译安装Subversion客户端的教程”的内容了,经过本文的学习后,相信大家对Linux中编译安装Subversion客户端的教程这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!


网站栏目:Linux中编译安装Subversion客户端的教程
本文网址:http://myzitong.com/article/ipjcco.html