1. 下載subversion安裝包之後解壓 進入subversion目錄
wget "http://subversion.tigris.org/downloads/subversion-1.6.12.tar.gz"
wget "http://subversion.tigris.org/downloads/subversion-deps-1.6.12.tar.gz"
tar xfvz subversion-1.6.12.tar.gz
tar xfvz subversion-deps-1.6.12.tar.gz
cd subversion-1.6.12
wget "http://subversion.tigris.org/downloads/subversion-deps-1.6.12.tar.gz"
tar xfvz subversion-1.6.12.tar.gz
tar xfvz subversion-deps-1.6.12.tar.gz
cd subversion-1.6.12
2. 編譯
./configure -–prefix=/usr/local/svn -–without-berkeley-db
checking openssl/opensslv.h usability... no
checking openssl/opensslv.h presence... no
checking for openssl/opensslv.h... no
configure: error: We require OpenSSL; try --with-openssl
configure failed for serf
checking openssl/opensslv.h presence... no
checking for openssl/opensslv.h... no
configure: error: We require OpenSSL; try --with-openssl
configure failed for serf
最簡單的方法就是找一下有沒有opensslv.h這個文件
find / -name opensslv.h
如果找不到,就執行
yum install openssl
yum install openssl-devel
yum install openssl-devel
./configure -–prefix=/usr/local/svn -–without-berkeley-db --with-openssl=/usr/include/openssl
注:以svnserve方式運行,不加apache編譯參數。以fsfs格式存儲版本庫,不編譯berkeley-db
如果最後出現下面WARNING,我們直接忽略即可。因爲不使用BDB存儲。
configure: WARNING: we have configured without BDB filesystem support
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.sleepycat.com/download/index.shtml
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.sleepycat.com/download/index.shtml
3.編譯之後的安裝
#make && makeinstall
爲避免出現以下錯誤
error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
執行以下操作:
1、編輯/etc/ld.so.conf文件:
#vi /etc/ld.so.conf
添加下面一行
/usr/local/lib
2、保存後運行ldconfig。
#/sbin/ldconfig
3、再重新運行make install 問題得到解決。
#make install
注:ld.so.conf和ldconfig用於維護系統動態鏈接庫
#vi /etc/ld.so.conf
添加下面一行
/usr/local/lib
2、保存後運行ldconfig。
#/sbin/ldconfig
3、再重新運行make install 問題得到解決。
#make install
注:ld.so.conf和ldconfig用於維護系統動態鏈接庫
至此,安裝完成,執行以下命令測試
# /usr/local/svn/bin/svnserve --version
爲了方便下操作,下面將SVN的BIN添加到PATH
#vi /etc/profile
PATH=/usr/local/svn/bin:$PATH
保存後,使其立即生效
#source /etc/profile
PATH=/usr/local/svn/bin:$PATH
保存後,使其立即生效
#source /etc/profile