svn的参考网址:http://subversion.apache.org(在该网址中可下载svn的资源文件)



获取相应版本:

wget -c http://download.nextag.com/apache/subversion/subversion-1.8.11.tar.gz



安装过程:

tar -zxvf subversion-1.8.11.tar.gz


cd subversion-1.8.11/


./configure --help (大致看一下参数信息)


./configure --prefix=/usr/local/svnup


这时出现错误:

configure: error: no suitable APR found



好像APR没有,这个参考这个地址:http://apr.apache.org/

我们可以下载这三个包安装:

wget -c http://mirror.cc.columbia.edu/pub/software/apache//apr/apr-1.5.1.tar.gz

wget -c http://mirror.cc.columbia.edu/pub/software/apache//apr/apr-util-1.5.4.tar.gz

wget -c http://mirror.cc.columbia.edu/pub/software/apache//apr/apr-iconv-1.2.1.tar.gz



依次安装:

./configure --prefix=/usr/local/apr/apr-util-1.5.4

出错:

configure: error: APR could not be located. Please use the --with-apr option.

(好像需要--with-apr这个选项)




那就先安装:apr-1.5.1

tar -zxvf apr-1.5.1.tar.gz

cd apr-1.5.1

./configure --prefix=/usr/local/apr/apr-1.5.1


出现:rm: cannot remove 'libtoolT': No such file or directory (不管它,不就是不能删除'libtoolT',没有就不用删除呗!)

make 

make install



接下来就安装apr-util-1.5.4

./configure --prefix=/usr/local/apr/apr-util-1.5.4  --with-apr=/usr/local/apr/apr-1.5.1(这回就加上这个之前apr的安装目录)

make

make install




好像还有一个没有安装啊(apr-iconv-1.2.1 用于字符集的转换)查看三者的./configure --help 发现它是带于apr-util-1.5.4中的,那就在apr-util-1.5.4安装之前先安装apr-iconv-1.2.1

tar -zxvf  apr-iconv-1.2.1.tar.gz

./configure  --prefix=/usr/local/apr/apr-iconv-1.2.1

出现错误configure: error: APR could not be located. Please use the --with-apr option

看来它也要apr的安装目录,那就如下吧

./configure  --prefix=/usr/local/apr/apr-iconv-1.2.1 --with-apr=/usr/local/apr/apr-1.5.1

make 

make install



现在再次安装apr-util-1.5.4

./configure --prefix=/usr/local/apr/apr-util-1.5.4  --with-apr=/usr/local/apr/apr-1.5.1 --with-iconv=/usr/local/apr/apr-iconv-1.2.1

make clean

make 

make install


-------------------------以上三个包安装完成-------------------------



最后再看subversion-1.8.11 中的./configure --help ( --with-apr=PATH         prefix for installed APR, path to APR build tree,or the full path to apr-config)


是不是只安装个apr就可以了,先别说 ,试试 

./configure --prefix=/usr/local/svn-1.8.11(为了以后的版本管理,我把安装目录改成了加版本号的形式) --with-apr=/usr/local/apr/apr-1.5.1


又出错误了,出现:configure: error: no suitable APRUTIL found

那就是说还要apr-util 。(--with-apr-util  --with-apr-util=PATH    prefix for installed APU, path to APU build tree, or the full path to apu-config) 

那就加上呗

再次配置如下:

  ./configure --prefix=/usr/local/svn-1.8.11 --with-apr=/usr/local/apr/apr-1.5.1 --with-apr-util=/usr/local/apr/apr-util-1.5.4



尼玛!又出错了,

configure: error: Subversion requires SQLite

看来还要安装SQLite(能嵌入SQL数据库中的一个引擎),

找到官网:http://www.sqlite.org/

得到下载链接:wget -c http://www.sqlite.org/2015/sqlite-autoconf-3080800.tar.gz

./configure --prefix=/usr/local/sqlite-autoconf-3080800

make 

make install




再次编译subversion-1.8.11

./configure --prefix=/usr/local/svn-1.8.11 --with-apr=/usr/local/apr/apr-1.5.1 --with-apr-util=/usr/local/apr/apr-util-1.5.4 --with-sqlite=/usr/local/sqlite-autoconf-3080800


(玛啊!这次通过了)

make

make install



********************************* :)