ModSecurity 3.0 on CentOS 6.9 (1)

表題でいろいろハマったので、ハマったことを含めて残しておく。1回目。

■ 環境

  • ModSecurity 3.0
  • CentOS 6.9
  • Vagrant 2.1.1
  • macOS High Sierra

■ ModSecurity 3.0

VagrantのBoxは下記を使用している。

vagrant init centos/6

rootで作業をしてしまう。

$ vagrant ssh
[vagrant@localhost ~]$ sudo su -
[root@localhost ~]# yum install git
  :
[root@localhost ~]# git clone https://github.com/SpiderLabs/ModSecurity
  :
[root@localhost ~]# cd ModSecurity
[root@localhost ~]# git checkout -b v3/master origin/v3/master
Branch v3/master set up to track remote branch v3/master from origin.
Switched to a new branch 'v3/master'
[root@localhost ModSecurity]#
[root@localhost ModSecurity]# ./build.sh
./build.sh: line 6: libtoolize: command not found
./build.sh: line 7: autoreconf: command not found
./build.sh: line 8: autoheader: command not found
./build.sh: line 9: automake: command not found
./build.sh: line 10: autoconf: command not found
[root@localhost ModSecurity]#

必要なものをインストールする。

[root@localhost ModSecurity]# yum install libtool -y autoconf automake

再度`./build.sh`を実行。

[root@localhost ModSecurity]# ./build.sh
  :
configure.ac:47: warning: macro `AM_PROG_AR' not found in library
/usr/bin/m4:configure.ac:201: bad expression in eval: m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print '} | sed 's/\"//g') + m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print '} | sed 's/\"//g')
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
/usr/bin/m4:configure.ac:201: bad expression in eval: m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print '} | sed 's/\"//g') + m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print '} | sed 's/\"//g')
autom4te: /usr/bin/m4 failed with exit status: 1
autoheader: '/usr/bin/autom4te' failed with exit status: 1
/usr/bin/m4:configure.ac:201: bad expression in eval: m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print '} | sed 's/\"//g') + m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print '} | sed 's/\"//g')
autom4te: /usr/bin/m4 failed with exit status: 1
automake: autoconf failed with exit status: 1
/usr/bin/m4:configure.ac:201: bad expression in eval: m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print '} | sed 's/\"//g') + m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print '} | sed 's/\"//g')
autom4te: /usr/bin/m4 failed with exit status: 1
[root@localhost ModSecurity]#

上記のようなエラーで止まってしまった。

AM_PROG_AR“を調べてみると、どうやら`automake`のversionが古いようである。

[root@localhost ~]# curl --silent http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz | tar zx
[root@localhost ~]# cd automake-1.15/
[root@localhost automake-1.15]#
[root@localhost automake-1.15]# ./configure
  :
configure: error: Autoconf 2.65 or better is required.
[root@localhost automake-1.15]#

`autoconf`も必要だった…。

1回目はここまで。最後に正常に稼働した手順をまとめる予定。

以上。

■ 関連

ModSecurity 3.0 on CentOS 6.9 (2)

ModSecurity 3.0 on CentOS 6.9 (3)

コメントを残す

メールアドレスが公開されることはありません。

CAPTCHA


This site uses Akismet to reduce spam. Learn how your comment data is processed.