hhvm install

PHP 조회 수 926 추천 수 0 2017.02.10 10:14:04

의존 라이브러리 설치

yum install epel-release
yum install gcc gcc-c++ cpp cmake git psmisc ocaml gperf
yum install binutils-devel boost-devel libmcrypt-devel libmemcached-devel jemalloc-devel libevent-devel sqlite-devel libxslt-devel libicu-devel tbb-devel libzip-devel bzip2-devel openldap-devel readline-devel  elfutils-libelf-devel libdwarf-devel libcap-devel libyaml-devel libedit-devel lz4-devel libvpx-devel unixODBC-devel libgmp-devel libpng-devel ImageMagick-devel curl-devel expat-devel openssl-devel glog-devel oniguruma-devel

 

만약 glog와 onig에 관한 부분이 설치되지 않는다면 수동설치

 

- glog 수동설치

cd /usr/src
wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
tar xvzf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure
make
make install

 

- onig 수동설치

cd /usr/src

wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.6.tar.gz
tar xvzf onig-5.9.6.tar.gz
cd onig-5.9.6
./configure
make
make install
 

- hhvm compile

cd /usr/src
git clone https://github.com/facebook/hhvm -b master  hhvm  --recursive
cd hhvm
./configure
make
./hphp/hhvm/hhvm --version
make install

 

- service 등록

vi /etc/systemd/system/hhvm.service

 

[Unit]
Description=HHVM HipHop Virtual Machine (FCGI)
 
[Service]
ExecStart=/usr/local/bin/hhvm --config /etc/hhvm/server.hdf --user nobody --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
 
[Install]
WantedBy=multi-user.target

 

- 관련 디렉토리 생성

mkdir /etc/hhvm 
mkdir /var/log/hhvm

 

- hhvm 환경설정

vi /etc/hhvm/server.hdf

PidFile = /var/run/hhvm

Server {
        Port = 80
        SourceRoot = /apm/apps/docs
        DefaultDocument = index.php
}

Eval {
  Jit = true
}

Log {
        Level = Warning
        AlwaysLogUnhandledExceptions = true
        RuntimeErrorReportingLevel = 8191
        UseLogFile = true
        UseSyslog = false
        File = /var/log/hhvm/error.log
        Access {
                * {
                        File = /var/log/hhvm/access.log
                        Format = %h %l %u % t \"%r\" %>s %b
                }
        }
}

Repo {
        Central {
                Path = /var/log/hhvm/.hhvm.hhbc
        }
}

#include "/usr/share/hhvm/hdf/static.mime-types.hdf"
StaticFile {
        FilesMatch {
                * {
                        pattern = .*\.(dll|exe)
                        headers {
                                * = Content-Disposition: attachment
                        }
                }
        }
        Extensions : StaticMimeTypes
}

MySQL {
        TypedResults = false

}

 

- service control

systemctl enable hhvm
systemctl start hhvm
systemctl status hhvm

 

hhvm.png

 

첨부
엮인글 :
List of Articles
번호 제목 글쓴이 날짜 조회 수