目次



目的

準備

インストール

  1. ソースの取得
    # wget -P /usr/local/src http://subversion.tigris.org/downloads/subversion-1.6.3.tar.gz
    # wget -P /usr/local/src http://subversion.tigris.org/downloads/subversion-deps-1.6.3.tar.gz

  2. ソースの解凍
    # cd /usr/local/src
    # tar zxvf subversion-1.6.3.tar.gz
    # tar zxvf subversion-deps-1.6.3.tar.gz

  3. コンパイル設定
    configureのヘルプ
    # cd /usr/local/src/subversion-1.6.3
    # ./configure \
    > --prefix=/usr/local/subversion-1.6.3 \
    > --with-apxs=/usr/local/apache2/bin/apxs \
    > --without-berkeley-db
    > --with-swig=/usr/local/swig

    neonが無い場合,下記が表示される
    (省略)
    configure: checking neon library
    checking for neon-config... no
    
    An appropriate version of neon could not be found, so libsvn_ra_dav
    will not be built.  If you want to build libsvn_ra_dav, please either
    install neon 0.25.5 on this system
    
    or
    
    get neon 0.25.5 from:
        http://www.webdav.org/neon/neon-0.25.5.tar.gz
    unpack the archive using tar/gunzip and rename the resulting
    directory from ./neon-0.25.5/ to ./neon/
    
    no suitable neon found
    (省略)

    expatが無い場合,下記が表示される
    (省略)
    checking expat.h usability... no
    checking expat.h presence... no
    checking for expat.h... no
    checking for xml2-config... no
    configure: error: no XML parser was found: expat or libxml 2.x required
    configure failed for neon

  4. インストール
    # make
    # make install
    # make swig-py
    # make install-swig-py

  5. シンボリックリンクの作成
    # ln -s /usr/local/subversion-1.6.3 /usr/local/subversion

Apacheへの埋め込み

動作確認

リポジトリの作成

# /usr/local/subversion/bin/svnadmin create /home/svn/test
# chown -R apache:apache /home/svn/test

http,httpsでそれぞれ[http(s)://XXX.XXX.XXX.XXX/svn/test]へアクセスし「Revision 0:」と表示されればOK。

Trac用

  1. Python用PATH?
    # echo /usr/local/subversion/lib/svn-python > /usr/local/python/lib/python2.6/site-packages/subversion.pth

リポジトリのHTTPへの公開

  1. リポジトリ作成
    # svnadmin create /home/svn/hoge-project

  2. 所有権の変更
    # chown -R apache:apache /home/svn/hoge-project

  3. Apacheの設定(httpd.confの編集)
    # vi /usr/local/apache2/conf/httpd.conf
    Include conf/extra/httpd-svn.conf  ← 追記

  4. Apacheの設定(httpd-svn.confの作成)
    # vi /usr/local/apache2/conf/extra/httpd-svn.conf  ← 新規作成
    <Location "/svn/hoge-project">
      DAV svn
      SVNPath /home/svn/hoge-project
      Require valid-user
      AuthType Basic
      AuthName "Subversion repository"
      AuthUserFile /usr/local/apache2/conf/users
    </Location>


トップ   編集 凍結解除 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-05-10 (水) 20:54:00