1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

H2Oをcentos6にインストールする方法

1
Last updated at Posted at 2017-10-30

https://github.com/tatsushid/h2o-rpm
より引用

nano /etc/yum.repos.d/h2o.repo

以下をコピペ

# bintray-tatsushid-h2o-rpm - packages by tatsushid from Bintray
[bintray-tatsushid-h2o-rpm]
name=bintray-tatsushid-h2o-rpm
# If your system is CentOS
baseurl=https://dl.bintray.com/tatsushid/h2o-rpm/centos/$releasever/$basearch/
# If your system is Fedora
# baseurl=https://dl.bintray.com/tatsushid/h2o-rpm/fedora/$releasever/$basearch/
gpgcheck=0
repo_gpgcheck=0
enabled=1

自動でインストール

yum install h2o -y

デフォルトの設定だとApacheの設定やSSL証明書が無い等のエラーが出るので/etc/h2o/h2o.confを書き換える。
例えば

user: nobody
hosts:
  "localhost:8080":
    listen:
      port: 8080
      host: 0.0.0.0
    paths:
      "/":
	file.dir: /var/www/html
access-log: /var/log/h2o/access.log
error-log: /var/log/h2o/error.log
pid-file: /var/run/h2o/h2o.pid

書き換え後

sudo /etc/init.d/h2o start

成功したらWebブラウザで
http://localhost:8080
にアクセスする。

以下のように表示されたら成功

Welcome to H2O - an optimized HTTP server

It works!

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?