自分用のレポジトリを持ちたいという理由で、Subversionをインストールしたときのメモ。
yumでsubversionが既にインストールされているが、Apacheとの連携をする際に、Apacheもyumでインストールしないとうまく連携できないようなので、Subversionもソースからインストールした。
Apache2に関しては、DSOを有効にして既にインストール済みとして進める。
最新版のSubversionをダウンロードし、Configure。
# wget “http://subversion.tigris.org/downloads/subversion-1.6.0.tar.gz”
# tar xvfz subversion-1.6.0.tar.gz
# cd subversion-1.6.0
# ./configure –with-apxs=/usr/local/apache2/bin/apxs \
–with-apr=/usr/local/apache2/bin/apr-1-config \
–with-apr-util=/usr/local/apache2/bin/apu-1-config \
–with-ssl
すると下記のようにsqliteのバージョンが古いというわけでエラーに
An appropriate version of sqlite could not be found. We recommmend
3.6.11, but require at least 3.4.0.
Please either install a newer sqlite on this systemor
get the sqlite 3.6.11 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.11.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/usr/local/src/subversion-1.6.0/sqlite-amalgamation/sqlite3.c
This file also ships as part of the subversion-deps distribution.configure: error: Subversion requires SQLite
sqliteを入れ直すか、sqlite3.cのソースを配置するかといわれるので、後者を選択。
というか、neonなど依存関係を含めたパッケージがあったのでそちらをあわせてダウンロードして利用する。
# cd ../
# wget http://subversion.tigris.org/downloads/subversion-deps-1.6.0.tar.gz
# tar xvfz subversion-deps-1.6.0.tar.gz
# cd subversion-1.6.0
再度、cofigure、makeを続ける。
# ./configure –with-apxs=/usr/local/apache2/bin/apxs \
–with-apr=/usr/local/apache2/bin/apr-1-config \
–with-apr-util=/usr/local/apache2/bin/apu-1-config \
–with-ssl
# make
# make install
make installすると、下記のようにapacheのhttpd.confにmod_dav_svnなどのモジュールが勝手に追加されている。
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
さっそくレポジトリを作成してみる。お決まりの、trunk、tags、brancheseの作成、Apacheから書き込めるように権限の変更もお忘れなく。
# svnadmin create /var/svn/test
# svn mkdir file:///var/svn/test/trunk \
file:///var/svn/test/tags \
file:///var/svn/test/branches
# chown -R daemon:daemon /var/svn/test
あとは、httpd.confに下記のようなsvnのロケーション設定を加えてApacheを再起動。
<Location /svn/test>
DAV svn
SVNPath /var/svn/test
</Location>
あとはcheckoutできるか、試してみる。
Check Tweet$ svn co http://localhost/svn/test/trunk

Pingback: Subversionをインストールしてみる | Stay Foolish!!()