hhvm install

PHP 조회 수 935 추천 수 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
번호 제목 글쓴이 날짜sort 조회 수
12 E-Mail RoundCube 첨부 용량 변경 / 한글 수정 LynX 2016-09-22 1519
11 Linux Common Linux 정규식과 표현 LynX 2016-09-22 364
10 PHP php7에 memcache.so 확장 모듈 적용 LynX 2016-09-26 580
9 PHP php에 memcached.so 확장 모듈 적용 LynX 2016-09-26 444
8 Xpress Engine XE에 memcache 사용 설정 LynX 2016-09-26 531
7 Xpress Engine mobileex 사용하여 모바일에서 첨부파일 올릴때 무한 로딩 현상 LynX 2016-09-27 483
6 Linux Common 시간 설정 file LynX 2016-10-10 491
5 PHP php opcache 설치 file LynX 2016-10-14 2109
4 HTTPD Apache httpd 2.4 mod_deflate file LynX 2017-02-10 1556
» PHP hhvm install file LynX 2017-02-10 935
2 HTTPD mod_http2 적용하기 file LynX 2017-02-10 5213
1 HTTPD mod_security2 적용 file LynX 2017-02-10 5134