Amazon EC2で動いているCentOSにsvnとtracを入れる

| | コメント(0) | トラックバック(1)


 http経由でアクセスさせようと思う。
最新がsubversion-1.5.4だったのでこれをwgetして
bzip2 -d してtar xvfしてconfigureする。

[root:/usr/local/src/subversion-1.5.4] ./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-apxs=/usr/local/apache2/bin/apxs
~中略~
You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL.  We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end.  You can find the latest version of
Berkeley DB here:
  http://www.oracle.com/technology/software/products/berkeley-db/index.html

BerkleyDBがないって言われた。BerkleyDBってOracleが管理してんのかと思いながらログにでてたURLからソースをゲットする。

[root:/usr/local/src] wget http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz
[root:/usr/local/src] tar zxvf db-4.7.25.tar.gz
[root:/usr/local/src/db-4.7.25]./configure

ってconfigureがない。調べてみると、もいっこ下のdistってディレクトリがインストール作業に使うディレクトリらしい
[root:/usr/local/src/db-4.7.25/dist] ./configure

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking if building in the top-level or dist directories... yes
configure: error: Berkeley DB should not be built in the top-level or "dist" directories. Change directory to the build_unix directory and run ../dist/configure from there.

ってまた起こられた。ああ、結局distディレクトリと同レベルにあるbuild_unixディレクトリからやれってことらしい。なんでかは調べる気にならないので素直に言われるとおりにする。

[root:/usr/local/src/db-4.7.25/build_unix] ../dist/configure
[root:/usr/local/src/db-4.7.25/build_unix] make
[root:/usr/local/src/db-4.7.25/build_unix] make install

おし。さいどSubversionをconfigure

[root:/usr/local/src/subversion-1.5.4] ./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-apxs=/usr/local/apache2/bin/apxs
~中略~
You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL.  We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end.  You can find the latest version of
Berkeley DB here:
  http://www.oracle.com/technology/software/products/berkeley-db/index.html

・・・同じ事いわれた。んだよーと思ったら「You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL.」ということで「linked to APR-UTIL」に該当する作業をしなきゃいけないらしい。
要はBerkeleyDBの場所がわかればいいんだろ。

[root:/usr/local/src/subversion-1.5.4] ./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-apxs=/usr/local/apache2/bin/apxs  --with-berkeley-db=/usr/local/BerkeleyDB.4.7
~中略~
checking for Apache module support via DSO through APXS... ./configure: line 3936: /usr/local/apache2/bin/apxs  --with-berkeley-db=/usr/local/BerkeleyDB.4.7: No such file or directory
configure: error: no - APXS refers to an old version of Apache
                     Unable to locate /mod_dav.h

あー、この前にmod_dav入れなきゃいけないのか。。。

mod_davを探しにいく
[root:/usr/local/src/httpd-2.2.9] find ./ -name "*dav*"
~中略~
./modules/dav/main/mod_dav.c
./modules/dav/main/mod_dav.dsp
./modules/dav/main/mod_dav.h
./modules/dav/main/dav.imp
./modules/dav/lock/mod_dav_lock.c
./modules/dav/lock/mod_dav_lock.dsp

あった。この場でコンパイルしてみる。

[root:/usr/local/src/httpd-2.2.9/modules/dav/main] /usr/local/apache2/bin/apxs -c mod_dav.c
[root:/usr/local/src/httpd-2.2.9/modules/dav/main] ll
~略~
-rw-r--r-- 1 root root     794 Dec 11 01:59 mod_dav.la
-rw-r--r-- 1 root root     312 Dec 11 01:59 mod_dav.lo
-rw-r--r-- 1 root root  156852 Dec 11 01:59 mod_dav.o
-rw-r--r-- 1 root root       0 Dec 11 01:59 mod_dav.slo

うまくいって↑みたいのができた。
最後インストール

[root:/usr/local/src/httpd-2.2.9/modules/dav/main] /usr/local/apache2/bin/apxs -i -a -n dav mod_dav.la
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' mod_dav.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp mod_dav.la /usr/local/apache2/modules/
cp .libs/mod_dav.so /usr/local/apache2/modules/mod_dav.so
cp .libs/mod_dav.lai /usr/local/apache2/modules/mod_dav.la
cp .libs/mod_dav.a /usr/local/apache2/modules/mod_dav.a
chmod 644 /usr/local/apache2/modules/mod_dav.a
ranlib /usr/local/apache2/modules/mod_dav.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/local/apache2/modules/mod_dav.so
[activating module `dav' in /usr/local/apache2/conf/httpd.conf]

よかった。うまくいった。けど、またどっかで詰まる雰囲気ムンムンだし気力が尽きたので続きはまた今度。

トラックバック(1)

このブログ記事を参照しているブログ一覧: Amazon EC2で動いているCentOSにsvnとtracを入れる

このブログ記事に対するトラックバックURL: http://hirop0164.s326.xrea.com/mt/mt-tb.cgi/223

subversion+インストールに関するブログをまとめています。 続きを読む

コメントする


画像の中に見える文字を入力してください。

このブログ記事について

このページは、ぴろしが2008年12月11日 02:04に書いたブログ記事です。

ひとつ前のブログ記事は「Amazon EC2にEBSのボリュームをマウント」です。

次のブログ記事は「Amazon EC2で動いているCentOSにsvnとtracを入れる2」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。