---
title: "SUSE 安装 SVN"
author: "vianoz"
date: "2011-03-11T23:43:32Z"
tags: ["Oracle", "SVN", "SuSE", "subversion", "配置管理"]
categories: ["研发管理"]
slug: "suse-svn"
draft: false
lastmod: "2011-03-19T20:59:39Z"
id: 954555
url: "https://vianoz.iteye.com/blog/954555"
---

一.下载svn  
下载地址：[http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&expandFolder=74](http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&expandFolder=74)

选择subversion-1.6.1.tar.gz 和 subversion-deps-1.6.1.tar.gz

二.安装  
cd /usr/local/

tar zxvf subversion-1.6.1.tar.gz

tar zxvf subversion-deps-1.6.1.tar.gz #会自动解压到subversion-1.6.1下  
cd subversion-1.6.1

按照一些网络资料的介绍，执行如下命令即可完成安装

./configure --without-berkeley-db --prefix=/usr/local/subversion

make

make install

 

#错误提示1#

configure: error: We require OpenSSL; try --with-openssl

解决方法：

错误提示需要安装openssl，所以我就安装了一个openssl，安装方法如下：

cd /usr/local

wget [http://www.openssl.org/source/openssl-1.0.0a.tar.gz](http://www.openssl.org/source/openssl-1.0.0a.tar.gz)

tar -zxvf openssl-1.0.0a.tar.gz

cd openssl-1.0.0a

./config  
./config -t  
make depend  
make  
make test  
make install

安装之后会在/usr/local下生成一个ssl目录

设置环境变量，在/etc/profile的PATH中增加如下内容：

PATH=/usr/local/ssl/bin:/sbin/:$PATH:/usr/sbin  
export PATH

ok，错误提示1解决。

 

重新执行./configure --with-openssl=/usr/local/ssl #这里加上--with-openssl参数

#错误提示2#

configure: error: subversion requires zlib

 

解决方法：

cd /usr/local

wget  [http://zlib.net/zlib-1.2.5.tar.gz](http://zlib.net/zlib-1.2.5.tar.gz)  
tar -xvzf zlib-1.2.5.tar.gz  
cd zlib-1.2.5  
./configure  
make  
make install

 

cd /usr/local

ln -s zlib-1.2.5 zlib

 

ok，错误提示2解决。

 

重新执行./configure --with-openssl=/usr/local/ssl --with-zlib=/usr/local/zlib ，成功！

 

接着执行如下命令：

make

make install

完成后屏幕会提示

You don't seem to have Berkeley DB version 4.0.14 or newer  
installed and linked to APR-UTIL.  We have created Makefiles which  
will build without the Berkeley DB back-end; your repositories will  
use FSFS as the default back-end.  You can find the latest version of  
Berkeley DB here:  
[http://www.oracle.com/technology/software/products/berkeley-db/index.html](http://www.oracle.com/technology/software/products/berkeley-db/index.html)

 make && make install

 

ok,svn安装完成。

建立版本库  
svnadmin create /work/svndata

进入/tmp目录下，然后进行checkout操作  
svn co svn://192.168.1.111/svntest

查看文件log的历史记录  
\[root@CentOS\_Test\_Server svntest]# svn log test