LoginSignup
1
1

More than 5 years have passed since last update.

ApacheをソースインストールしているCentOS 5環境に最新のSubversionを導入する。

Last updated at Posted at 2013-01-15

前提というか方針というか大人の事情

  1. Subversion本体はパッケージで入れる。
  2. Apacheはソースコンパイルで入っているので、ApacheモジュールはSubversionのソースからコンパイルして入れる。
  • 導入先は /usr/local/apache2

WANdiscoをYumリポジトリに追加

  • CentOS 5向けSubversion最新版(devel)のリポジトリを追加する。

GPG-KEY導入

wget http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /etc/pki/rpm-gpg/RPM-GPG-KEY-WANdisco
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-WANdisco

WANdiscoのSubversion1.7系リポジトリを追加

cat << 'EOM' > /etc/yum.repos.d/WANdisco-devel.repo
[WANdisco-devel]
name=WANdisco SVN Repo 1.7
enabled=1
baseurl=http://opensource.wandisco.com/centos/$releasever/devel/RPMS/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-WANdisco
EOM

Subversion導入

yum install subversion
  • 依存パッケージでsubversion-perlも導入される。

参考にしたページ1

CentOS5.6に、Subversion1.7のインストール
CentOS 5.xのSubversionを1.7.1にアップグレード - プチ技術メモ
WanDisco YUM Repo

SubversionのApacheモジュール導入

yumで入れたSubversionのバージョンを確認

svn --version
出力結果
svn, version 1.7.8 (r1419691)
   compiled Dec 11 2012, 16:34:02

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
  - handles 'https' 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
  • 上記結果より、1.7.8 を入れることにする。

Subversion 1.7.8のApacheモジュールをインストール

ソースダウンロードして伸長

wget http://archive.apache.org/dist/subversion/subversion-1.7.8.tar.bz2
tar jxvf subversion-1.7.8.tar.bz2
cd subversion-1.7.8

SQLiteのソースが必要なので、最新版をダウンロードして伸長

  • パッケージで入れられるバージョンより新しい 3.7.6.3 以上のものが必要になるので、伸長したsubversionソース内に配置する。
    • Fedoraのパッケージをリビルドして入れようとすると、依存地獄が待ち構えている…。
wget http://sqlite.org/sqlite-amalgamation-3071502.zip
unzip sqlite-amalgamation-3071502.zip
mv sqlite-amalgamation-3071502 sqlite-amalgamation

configure

./configure \
            --prefix=/usr \
            --with-apr=/usr/local/apache2/bin/apr-1-config \
            --with-apr-util=/usr/local/apache2/bin/apu-1-config \
            --with-apxs=/usr/local/apache2/bin/apxs \
            --with-apache-libexecdir=/usr/local/apache2/modules \
            --with-berkeley-db

Apacheモジュールのみmake

make apache-mod

Apacheモジュールのみinstall

make install-mods-shared

参考にしたページ2

CentOS5にSubversion1.7.6をソースからインストール | misty-magic.h

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1