さくらインターネットでSubversion
svn+sshで接続できるSubversionをさくらインターネットのサーバ上に構築した時のインストールログ。
環境
FreeBSD 6.1-RELEASE-p23
subversion-1.5.4
ログ
基本的にさくらインターネットでSubversion » サイキョウラインを参考にした。
%mkdir -p $HOME/local/src %cd local/src %wget http://subversion.tigris.org/downloads/subversion-1.5.4.tar.bz2 %tar jxf subversion-1.5.4.tar.bz2 %wget http://subversion.tigris.org/downloads/subversion-deps-1.5.4.tar.gz %tar zxf subversion-deps-1.5.4.tar.gz %cd subversion-1.5.4 %./configure --prefix=$HOME/local --without-serf %make all install clean %cd $HOME %mkdir -p svn/repos %$HOME/local/bin/svnadmin craete svn/repos
最後に、.cshrcでpathに$HOME/local/binを追加。
以上でsvn+sshで利用できるSubversionのレポジトリが出来た。
備考
最初、subversion-1.5.4.tar.bz2だけをダウンロードした状態で
%./configure --prefix=$HOME/local
とconfigureしたら、
configure: WARNING: APR not found The Apache Portable Runtime (APR) library cannot be found. Please install APR on this system and supply the appropriate --with-apr option to 'configure' or get it with SVN and put it in a subdirectory of this source: svn co \ http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x \ apr Run that right here in the top level of the Subversion tree. Afterwards, run apr/buildconf in that subdirectory and then run configure again here. Whichever of the above you do, you probably need to do something similar for apr-util, either providing both --with-apr and --with-apr-util to 'configure', or getting both from SVN with: svn co \ http://svn.apache.org/repos/asf/apr/apr-util/branches/0.9.x \ apr-util configure: error: no suitable apr found
と怒られた。上記のメッセージではapacheからaprを取ってこいと言っているが、Subversionのサイト上にsubversion-deps-1.5.4.tar.gzというファイルがあったので落として解凍してみたら、必要そうなものがいろいろsubversion-1.5.4ディレクトリに追加された。
この状態でもう一度configureすると、今度は
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.oracle.com/technology/software/products/berkeley-db/index.html
というWARNINGが出た。
調べてみると、FSFSというのはSubversionに新しく追加されたFile Systemで、どうもBerkley DBをback-endにするよりよさげな感じ。なのでこのままmakeすることにした。
%make all install clean
今度は
/usr/lib/crt1.o(.text+0x72): In function `_start': : undefined reference to `main' *** Error code 1 Stop in /home/***/local/src/subversion-1.5.4/serf. *** Error code 1 Stop in /home/***/local/src/subversion-1.5.4.
というわけわからんエラーで止まる。調べてみてもぴったり当てはまる件がなかったが、似たような事例の中に1つ--without-serfをつけてconfigureするという解決策があった。serfというのは「The serf library is a C-based HTTP client library built upon the Apache Portable Runtime 」とのことなので、svn+sshで使おうとしている今回の場合はなくても問題なさそう。
ということで、試しに--without-serfを付けてconfigureし、make installすると、見事成功。
ソースからインストールしたことがなかったので、どこかおかしいところはあるかもしれないが、今のところ問題なく動いている。