#freeze
''目次''
#contents
~
----
*目的 [#ica0082f]

*準備 [#kc05d439]
-[[Apache 2.2.12]]
-[[OpenSSL 0.9.8k]]
-[[zlib]]
-expat~
yumでインストールするなら(バージョンは1.95.8)
 # yum install expat-devel
ソースから入れるなら[[expat 2.0.1]]を参照~
とりあえずここではyumから入れておく~
~
-neon~
(subversion-deps-1.6.3.tar.gzに含まれるものを使用)~
~
-ソース -- subversion:http://subversion.tigris.org/~
subversion-1.6.3.tar.gz, subversion-deps-1.6.3.tar.gz~
~
-APRとAPR-Util~
subversion-deps-1.6.3.tar.gzに含まれているバージョンはAPRが1.3.5、APR-Utilは1.3.7~
[[Apache 2.2.12]]に含まれているバージョンはAPRが1.3.7、APR-Utilは1.3.8~
depsに含まれているのを使うのが無難?~
~
もし、[[Apache 2.2.12]]のものを使うならsubversionのconfigureで下記のオプションを追加
 --with-apr=/usr/local/src/httpd-2.2.12/srclib/apr
 --with-apr-util=/usr/local/src/httpd-2.2.12/srclib/apr-util

-SQLite~
無いとconfigure時に下記のメッセージの通り怒られる。~
 configure: checking sqlite library
 amalgamation not found at /usr/local/src/subversion-1.6.3/sqlite-amalgamation/sqlite3.c
 checking sqlite3.h usability... no
 checking sqlite3.h presence... no
 checking for sqlite3.h... no
 checking sqlite library version (via pkg-config)... no
 
 An appropriate version of sqlite could not be found.  We recommmend
 3.6.13, but require at least 3.4.0.
 Please either install a newer sqlite on this system
 
 or
 
 get the sqlite 3.6.13 amalgamation from:
     http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
 unpack the archive using tar/gunzip and copy sqlite3.c from the
 resulting directory to:
 /usr/local/src/subversion-1.6.3/sqlite-amalgamation/sqlite3.c
 This file also ships as part of the subversion-deps distribution.
 
 configure: error: Subversion requires SQLite
subversion-deps-1.6.3.tar.gzに含まれている。~
別途準備するなら下記。
 # wget -P /usr/local/src http://www.sqlite.org/sqlite-amalgamation-3.6.16.tar.gz
 # cd /usr/local/src
 # tar xzf sqlite-amalgamation-3.6.16.tar.gz
 
 # cd /usr/local/src/sqlite-3.6.16
 # mkdir /usr/local/src/subversion-1.6.3/sqlite-amalgamation
 # cp /usr/local/src/sqlite-3.6.16/sqlite3.c /usr/local/src/subversion-1.6.3/sqlite-amalgamation

*インストール [#p41973e1]
+''ソースの取得''
 # 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
~
+''ソースの解凍''
 # cd /usr/local/src
 # tar zxvf subversion-1.6.3.tar.gz
 # tar zxvf subversion-deps-1.6.3.tar.gz
~
+''コンパイル設定''~
[[configureのヘルプ>subversionの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
~
+''インストール''
 # make
 # make install
 # make swig-py
 # make install-swig-py
~
+''シンボリックリンクの作成''
 # ln -s /usr/local/subversion-1.6.3 /usr/local/subversion

**Apacheへの埋め込み [#qd0d7dbf]
-''リポジトリ用のディレクトリを作成''
 # mkdir /home/svn
-''httpd-dav.confの設定''
 # mv /usr/local/apache2/conf/extra/httpd-dav.conf /usr/local/apache2/conf/extra/httpd-dav.conf.org     ← Defaultを残して
 # vi /usr/local/apache2/conf/extra/httpd-dav.conf   ← 新規作成
 
 #以下を追加
 <Location "/svn">
   DAV svn
   SVNParentPath /home/svn
   SVNListParentPath On
 </Location>

-''httpd.confの設定''~
DAV用設定ファイルの有効化
 # vi /usr/local/apache2/conf/httpd.conf
DAV設定ファイルのリンク
 # Distributed authoring and versioning (WebDAV)
 #Include conf/extra/httpd-dav.conf
 ↓
 Include conf/extra/httpd-dav.conf    ← コメント外す
確認
 # /usr/local/apache2/bin/apachectl configtest
 Syntax OK
Httpd再起動
 # /etc/rc.d/init.d/httpd restart
 httpd を停止中:                                            [  OK  ]
 httpd を起動中:                                            [  OK  ]

*動作確認 [#sa915729]
''リポジトリの作成''
 # /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用 [#q84b21df]
+''Python用PATH?''
 # echo /usr/local/subversion/lib/svn-python > /usr/local/python/lib/python2.6/site-packages/subversion.pth

*リポジトリのHTTPへの公開 [#h471f45b]
+''リポジトリ作成''
 # svnadmin create /home/svn/hoge-project
~
+''所有権の変更''
 # chown -R apache:apache /home/svn/hoge-project
~
+''Apacheの設定(httpd.confの編集)''
 # vi /usr/local/apache2/conf/httpd.conf
 Include conf/extra/httpd-svn.conf  ← 追記
~
+''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