AWS環境で、nghttpxを使ってhttp2対応を
しようとしたんだけど、苦戦したのでメモメモ
まずは、Nghttp2(nghttpx)のインストール!
# wget https://github.com/tatsuhiro-t/nghttp2/releases/download/v1.3.4/nghttp2-1.3.4.tar.gz # tar xvzf nghttp2-1.3.4.tar.gz # cd nghttp2-1.3.4/ # autoreconf -i # automake # autoconf # ./configure # make # sudo make install
すんなりいく予定のはずが、
# autoreconf -i -bash: autoreconf: command not found
まぁ、こんくらいはしょうがない
autoreconfのコマンドないよーってことで、入れてあげる
# yum install autoconf
つぎ~!!
# autoreconf -i Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: No such file or directory
はいはい、automakeも必要なのね。。
# yum install automake
こんどこそー
# autoreconf -i Can't exec "libtoolize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 345, <GEN3> line 5. autoreconf: failed to run libtoolize: No such file or directory autoreconf: libtoolize is needed because this package uses Libtool
libtoolも必要でしたっ
# yum install libtool
ここまでは、まぁ許容範囲内だったんだけど
どうやらまだうまくいかない。。。
nghttp2-1.3.4/config.log
の中身を見てみると
/usr/bin/ld: cannot find -lev
こんなエラーが書かれている
どうやらevのライブラリがないみたい
たしかに、最初によくわからず
libev と libevnt を同じものだと思って
libevntだけ入れて満足してたのが間違いだったようで。。
yum --enablerepo=epel install libev yum --enablerepo=epel install libev-devel yum remove libevent libevent-devel
最後に起動コマンド
nghttpx -f0.0.0.0,3000 -bxxx.xxx.xxx.xxx,80 /etc/pki/tls/private/server.key /etc/pki/tls/certs/xxxx.com.crt –accesslog-file=/var/log/nghttpx/access_log –errorlog-file=/var/log/nghttpx/error_log –add-x-forwarded-for –user=nghttp2 –log-level=NOTICE –host-rewrite
一応これでhttp2のアクセスを確認できたよ
長かった。。。
コメント