2013年1月28日月曜日

apache mod_suexec install 失敗

apache mod_suexec install

開発環境にてヴァーチャルホストで、
ユーザー、グループの違うディレクトリを参照したいため
mod_suexecを利用したいと考えインストールする。

rootになる
$sudo -s
apacheをインストールしたディレクトリに移動
#cd httpd-2.4.3/modules
moduleを探す
find . -name '*suexec*'

./generators/mod_suexec.c
./generators/mod_suexec.h
モジュールファイルに移動
cd generators
モジュールインストール
/home/httpd/bin/apxs -i -a -c mod_suexec.c


----------------------------------------------------------------------

# /home/httpd/bin/apxs -i -a -c mod_suexec.c
/home/httpd-2.4.3/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/home/httpd-2.4.3/include  -I/home/httpd-2.4.3/include   -I/home/httpd-2.4.3/include   -c -o mod_suexec.lo mod_suexec.c && touch mod_suexec.slo
/home/httpd-2.4.3/build/libtool --silent --mode=link gcc -std=gnu99    -o mod_suexec.la  -rpath /home/httpd-2.4.3/modules -module -avoid-version    mod_suexec.lo
/home/httpd-2.4.3/build/instdso.sh SH_LIBTOOL='/home/httpd-2.4.3/build/libtool' mod_suexec.la /home/httpd-2.4.3/modules
/home/httpd-2.4.3/build/libtool --mode=install install mod_suexec.la /home/httpd-2.4.3/modules/
libtool: install: install .libs/mod_suexec.so /home/httpd-2.4.3/modules/mod_suexec.so
libtool: install: install .libs/mod_suexec.lai /home/httpd-2.4.3/modules/mod_suexec.la
libtool: install: install .libs/mod_suexec.a /home/httpd-2.4.3/modules/mod_suexec.a
libtool: install: chmod 644 /home/httpd-2.4.3/modules/mod_suexec.a
libtool: install: ranlib /home/httpd-2.4.3/modules/mod_suexec.a
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /home/httpd-2.4.3/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /home/httpd-2.4.3/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 /home/httpd-2.4.3/modules/mod_suexec.so
[activating module `suexec' in /home/httpd-2.4.3/conf/httpd.conf]


インストールが出来たと思う。
確認のためdiffをとってみた

# diff httpd.conf httpd.conf.bak
146d145
< LoadModule suexec_module      modules/mod_suexec.so

成功

apacheの再起動
/home/httpd/apachectl restart

error、、、
SuexecUserGroup configured, but suEXEC is disabled: Missing suexec binary /home/httpd-2.4.3/bin/suexec

excite翻訳してみた。
-----------

形成されたSuexecUserGroup、しかし、suEXECは無効になります:
見当たらないsuexecの2進法の/home/httpd-2.4.3/ビン/suexec
------------

# ls -l /home/httpd-2.4.3/bin/suexec
ls: cannot access /home/httpd-2.4.3/bin/suexec: そのようなファイルやディレクトリはありません

suexecがない

調べてみたら、
デフォルトではsuexecはインストールされてないらしい。。

改めてapacheをインストールをしないといけないそうです。

参照
http://bitarts.jp/tech/linux/suexec.html


0 件のコメント:

コメントを投稿