구축 작업 노트
컨디션
설치 # root ユーザで実行
# https://github.com/h2o/h2o/releases の tarファイルのURLから
wget https://github.com/h2o/h2o/archive/v1.6.3.tar.gz
tar xzf v1.6.3.tar.gz
cd h20-1.6.3
cmake .
make
sudo make install
설정 
최종 구성 파일 군
 root@precise64:/usr/local/etc# tree h2o/
h2o/
|-- access-log
|-- cert.csr
|-- cert.key
|-- cert.pem
|-- error-log
|-- h2o.conf
|-- index.html
`-- pid-file
인증서 작성
 $ mkdir /usr/local/etc/h2o/
$ cd /usr/local/etc/h2o/
$ openssl genrsa 2048 > cert.key
$ openssl req -new -key cert.key  > cert.csr
$ openssl x509 -days 3650 -req -signkey cert.key < cert.csr > cert.pem
다양한 시작에 필요한 파일 만들기
 $ touch /usr/local/etc/h2o/access-log
$ touch /usr/local/etc/h2o/error-log
$ touch /usr/local/etc/h2o/pid-file
conf 파일 생성
 $ cd /usr/local/etc/h2o/
$ vi h2o.conf 
#----------------------
 1 user: root
 2 hosts:
 3   "*":
 4     listen:
 5       port: 443
 6       ssl:
 7         certificate-file: /usr/local/etc/h2o/cert.pem
 8         key-file:  /usr/local/etc/h2o/cert.key
 9     paths:
 10       "/":
 11         file.dir: /usr/local/etc/h2o/
 12 
 13 access-log: /usr/local/etc/h2o/access-log
 14 error-log: /usr/local/etc/h2o/error-log
 15 pid-file: /usr/local/etc/h2o/pid-file
index.>의 제작
 $ cd /usr/local/etc/h2o
$ vi index.html 
-----------------------------
<html>
<head>
        <title>hello, h2o! </title>
</head>
<body>
        hello, h2o!
</body>
<html>
시작 및 종료 # 起動前のテスト
$ sudo /usr/local/bin/h2o -m test -c /usr/local/etc/h2o/h2o.conf
# Backgroundプロセスとして起動
$ sudo /usr/local/bin/h2o -m daemon -c /usr/local/etc/h2o/h2o.conf 
# 停止
$ sudo kill -TERM `cat /usr/local/etc/h2o/pid-file`
방문 
※ host os:8443→VM os:443 forwording 설정
h2o 
다른 일 
소스에서 cmake 설치
 
왜냐하면 appt-get에 설치된 cmake 버전이 낡았어요.# rootユーザで実行
sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz --no-check-certificate
tar xf cmake-3.2.2.tar.gz
cd cmake-3.2.2
./configure
make
make install
참고 자료 
# root ユーザで実行
# https://github.com/h2o/h2o/releases の tarファイルのURLから
wget https://github.com/h2o/h2o/archive/v1.6.3.tar.gz
tar xzf v1.6.3.tar.gz
cd h20-1.6.3
cmake .
make
sudo make install
최종 구성 파일 군
root@precise64:/usr/local/etc# tree h2o/
h2o/
|-- access-log
|-- cert.csr
|-- cert.key
|-- cert.pem
|-- error-log
|-- h2o.conf
|-- index.html
`-- pid-file
인증서 작성
$ mkdir /usr/local/etc/h2o/
$ cd /usr/local/etc/h2o/
$ openssl genrsa 2048 > cert.key
$ openssl req -new -key cert.key  > cert.csr
$ openssl x509 -days 3650 -req -signkey cert.key < cert.csr > cert.pem
다양한 시작에 필요한 파일 만들기
$ touch /usr/local/etc/h2o/access-log
$ touch /usr/local/etc/h2o/error-log
$ touch /usr/local/etc/h2o/pid-file
conf 파일 생성
$ cd /usr/local/etc/h2o/
$ vi h2o.conf 
#----------------------
 1 user: root
 2 hosts:
 3   "*":
 4     listen:
 5       port: 443
 6       ssl:
 7         certificate-file: /usr/local/etc/h2o/cert.pem
 8         key-file:  /usr/local/etc/h2o/cert.key
 9     paths:
 10       "/":
 11         file.dir: /usr/local/etc/h2o/
 12 
 13 access-log: /usr/local/etc/h2o/access-log
 14 error-log: /usr/local/etc/h2o/error-log
 15 pid-file: /usr/local/etc/h2o/pid-file
index.>의 제작
$ cd /usr/local/etc/h2o
$ vi index.html 
-----------------------------
<html>
<head>
        <title>hello, h2o! </title>
</head>
<body>
        hello, h2o!
</body>
<html>
시작 및 종료 # 起動前のテスト
$ sudo /usr/local/bin/h2o -m test -c /usr/local/etc/h2o/h2o.conf
# Backgroundプロセスとして起動
$ sudo /usr/local/bin/h2o -m daemon -c /usr/local/etc/h2o/h2o.conf 
# 停止
$ sudo kill -TERM `cat /usr/local/etc/h2o/pid-file`
방문 
※ host os:8443→VM os:443 forwording 설정
h2o 
다른 일 
소스에서 cmake 설치
 
왜냐하면 appt-get에 설치된 cmake 버전이 낡았어요.# rootユーザで実行
sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz --no-check-certificate
tar xf cmake-3.2.2.tar.gz
cd cmake-3.2.2
./configure
make
make install
참고 자료 
# 起動前のテスト
$ sudo /usr/local/bin/h2o -m test -c /usr/local/etc/h2o/h2o.conf
# Backgroundプロセスとして起動
$ sudo /usr/local/bin/h2o -m daemon -c /usr/local/etc/h2o/h2o.conf 
# 停止
$ sudo kill -TERM `cat /usr/local/etc/h2o/pid-file`
※ host os:8443→VM os:443 forwording 설정
h2o
다른 일 
소스에서 cmake 설치
 
왜냐하면 appt-get에 설치된 cmake 버전이 낡았어요.# rootユーザで実行
sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz --no-check-certificate
tar xf cmake-3.2.2.tar.gz
cd cmake-3.2.2
./configure
make
make install
참고 자료 
# rootユーザで実行
sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz --no-check-certificate
tar xf cmake-3.2.2.tar.gz
cd cmake-3.2.2
./configure
make
make install
  Reference
이 문제에 관하여(구축 작업 노트), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/naotospace/items/badedb8c8272ad56118d텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)