search
LoginSignup
40
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

Organization

h2oをamazon linux環境(aws)でビルドするためのメモ

@kazuho さんが最近作ったnginxの2倍速いという噂のh2oをamazon linuxでビルドするメモ。
さすがにh2oをmacでbuildするのはこの短時間じゃ無理だった。前に一度まとめた事があるのでメモを開放しておく。

cmake を 3.0.2 にする

sudo yum install curl curl-devel 
sudo yum install libarchive libarchive-devel
sudo yum install expat expat-devel
wget http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz
tar -xvf cmake-3.0.2.tar.gz
cd cmake-3.0.2
./bootstrap --prefix=/usr       \
            --system-libs       \
            --mandir=/share/man \
            --docdir=/share/doc/cmake-3.0.2   &&
make
sudo make install

libyaml を install

wget  http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
tar -xvf yaml-0.1.5.tar.gz
cd yaml-0.1.5
./configure
make
sudo make install

h2o を install

git clone https://github.com/kazuho/h2o.git
cd h2o
git submodule update --init --recursive
cmake .
make h2o
./h2o -c examples/h2o.conf
curl http://localhost:8080/

example h2o.confの中身

listen: 8080
hosts:
  default:
    paths:
      /:
        file.dir: examples/doc_root
    access-log: /dev/stdout

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
What you can do with signing up
40
Help us understand the problem. What are the problem?