LoginSignup
0
0

More than 5 years have passed since last update.

Amazon Linux 2016.09 にh2loadをインストールする

Last updated at Posted at 2017-02-06

久々にインストールしたら、わりとはまったのでメモ

  • ライブラリが揃ってないとh2loadはインストールされない。./configureの実行ログでライブラリがすべて揃っているか確認する。揃ってなくても、エラーは出ず、コンパイル・インストールはされるが、h2loadはインストールされない。以下のようにすべてyesである必要がある
    Libs:
      OpenSSL:        yes (CFLAGS=' ' LIBS='-lssl -lcrypto  ')
      Libxml2:        yes (CFLAGS='' LIBS='-lxml2  ')
      Libev:          yes (CFLAGS='' LIBS='-lev')
      Libc-ares       yes (CFLAGS=' ' LIBS='-lcares  ')
      Libevent(SSL):  yes (CFLAGS=' ' LIBS='-levent_openssl -levent  ')
      Spdylay:        yes (CFLAGS='-I/usr/local/include  ' LIBS='-L/usr/local/lib -lspdylay  ')
      Jansson:        yes (CFLAGS=' ' LIBS='-ljansson  ')
      Jemalloc:       yes (LIBS='-ljemalloc')
      Zlib:           yes (CFLAGS=' ' LIBS='-lz  ')
      Boost CPPFLAGS:
      Boost LDFLAGS:
      Boost::ASIO:
      Boost::System:
      Boost::Thread:
  • 最初に実行しているコマンドは autoREconf であってautoconfではない

ライブラリのインストール

yum-config-manager --enable epel
yum install -y libevent-devel jansson-devel jemalloc jemalloc-devel boost boost-thread Cython c-ares-devel
  • いくつかのパッケージは、epel レポジトリを追加する必要がある。それでもlibevはバージョンが足りない
cd /usr/local/src
wget http://dist.schmorp.de/libev/libev-4.24.tar.gz
tar xvzf libev-4.24.tar.gz
cd libev-4.24
./configure
make 
make install
  • libevはyumでは要求するバージョンのものを入れることができないので、ソースからコンパイルする必要があった

ダウンロード・インストール

  • spdylay インストール(nghttp2のインストールに必要なライブラリ)
cd /usr/local/src
git clone https://github.com/tatsuhiro-t/spdylay.git
cd spdylay
autoreconf -i
automake
autoconf
./configure
makeautoreconf -i
automake
autoconf
./configure
make
make install
  • nghttp2のインストール(これにh2loadが含まれている)
cd /usr/local/src
git clone https://github.com/nghttp2/nghttp2   
export PKG_CONFIG_PATH=/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig
autoreconf -i
automake
autoconf
./configure --with-spdylay --enable-apps
make
make install
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0