subversionのインストール

subversiontracをインストールした時のメモ

まずはsubversionをインストール

# yum install mod_dav_svn subversion
$ svnadmin create /home/svn/hoge
$ svn mkdir -m 'first commit' file:///home/svn/hoge/trunk
$ svn mkdir -m 'first commit' file:///home/svn/hoge/branches
$ svn mkdir -m 'first commit' file:///home/svn/hoge/tags

apacheに設定を記述

vi /etc/httpd/conf/httpd.conf
 DocumentRoot /home/svn
 
  DAV svn
  SVNListParentPath on
  SVNParentPath /home/svn/
  SVNAutoversioning on
  AuthType Basic
  AuthUserFile /home/svn/.htpasswd_admin
  AuthName "Subversion Authentication"
  Require valid-user
  AllowOverride None
  Order allow,deny
  Allow from all
 

apacheを再起動して試しにアクセスしてみる

svn ls http://svn.hoge.com/hoge/
svn: リポジトリは恒久的に 'http://svn.hoge.com/hoge/' へ移動しました。relocate (参照 URL の変更) を実行してください

調べてみると「DocumentRoot 」と「SVNParentPath」が同じだとエラーとなるらしい
「DocumentRoot /home/svn」→「DocumentRoot /home/svn_htdoc」に変更すると成功