SVN安裝: node
我採用的是目前當前網站發佈的版本:subversion-1.7.3 web
首先,須要安裝預先安裝四個組件,你的subversion才能正常工做。 sql
-本文假定apahce已經安裝!apache
-系統在 默認狀況下,是已經有apr-util及apr這兩個包的,只不過他們的版本較低,只支持subversion 1.4centos
所以,具體能夠看看: app
# rpm -qa | grep aprsvn
apr-util-1.2.7-7.el5_3.2網站
apr-util-1.2.7-7.el5_3.2ui
apr-1.2.7-11.el5_3.1this
xorg-x11-drv-dynapro-1.1.0-2
apr-1.2.7-11.el5_3.1
-
而subversion要求較高的版本,爲此,咱們須要刪除系統自帶的apr,apr-util這兩個包!強行刪掉!
# rpm -e --allmatches apr-util
error: Failed dependencies:
libaprutil-1.so.0()(64bit) is needed by (installed) subversion-1.4.2-4.el5_3.1.x86_64
libaprutil-1.so.0()(64bit) is needed by (installed) httpd-2.2.3-31.el5.centos.x86_64
libaprutil-1.so.0 is needed by (installed) subversion-1.4.2-4.el5_3.1.i386
# rpm -e --allmatches apr-util --nodeps
# rpm -e --allmatches apr --nodeps
.
.若是你沒有執行以上步驟,你在安裝完成後,你會發現你執行相關的命令都會報錯!
# svnadmin create /data/svn/repos1
svnadmin: symbol lookup error: /usr/local/svn/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr
# svnserve --version
svnserve: symbol lookup error: /usr/local/svn/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr
apr-1.4.6.tar.gz
apr-util-1.3.8.tar.bz2
neon-0.29.6.tar.gz
sqlite-amalgamation(sqlite-autoconf-3071000.tar.gz)
# tar -xzf apr-1.4.6.tar.gz
# cd apr-1.4.6
# ./configure --prefix=/usr/local/apr
# make && make install
# echo "/usr/local/apr/lib/" >> /etc/ld.so.conf
# ldconfig
# wget http://archive.apache.org/dist/apr/apr-util-1.3.8.tar.bz2
# tar -xjf apr-util-1.3.8.tar.bz2
# cd apr-util-1.3.8
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
# make && make install
# echo "/usr/local/apr-util/lib" >> /etc/ld.so.conf
# ldconfig
安裝中發出沒找到neon,雖然編譯的時候沒有中斷報錯,但爲了使用上的便利性,仍是安裝吧!
# wget http://www.webdav.org/neon/neon-0.29.6.tar.gz
# tar -xzf neon-0.29.6.tar.gz
# cd neon-0.29.6
# ./configure --prefix=/usr/local/neon
# make && make install
# echo "/usr/local/neon/lib" >> /etc/ld.so.conf
# ldconfig
還要安裝一個sqlite
編譯svn的時候,提示:
有兩個方法:一要麼安裝新的版本,二要麼替換文件!
An appropriate version of sqlite could not be found. We recommmend
3.7.6.3, but require at least 3.6.18.
Please either install a newer sqlite on this system
or
get the sqlite 3.7.6.3 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.7.6.3.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/root/subversion-1.7.3/sqlite-amalgamation/sqlite3.c
備註:
sqlite-amalgamation 這目錄在subversion-1.7.3下是沒有的,以爲很奇怪,Google後發
現要本身創建。
提示中的地址已經找不到了!
# mkdir /root/subversion-1.7.3/sqlite-amalgamation
# wget http://www.sqlite.org/sqlite-autoconf-3071000.tar.gz
# tar -xzf sqlite-autoconf-3071000.tar.gz
# cd sqlite-autoconf-3071000
# cp sqlite3.c /root/subversion-1.7.3/sqlite-amalgamation/
再次開始編譯!
# ./configure --prefix=/usr/local/svn --with-apr=/usr/local/apr --with-apr-
util=/usr/local/apr-util --with-neon=/usr/local/neon
這個警告,無所謂的,只是告訴你Berkeley DB已再也不被支持了。
You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL. We have created Makefile which will build
Subversion without support for the Berkeley DB back-end. You can find the
latest version of Berkeley DB here:
# make && make install
# echo "/usr/local/svn/lib" >> /etc/ld.so.conf
# ldconfig
-此時,能夠看下apache是否有生成相應的模塊!
# ls /usr/local/apache/modules/ | grep svn
mod_authz_svn.so
mod_dav_svn.so
# /usr/local/svn/bin/svn --version
svn, version 1.7.3 (r1242825)
compiled Feb 22 2012, 17:29:06
Copyright (C) 2012 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_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
* 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
安裝成功了!