LoginSignup
42
42

More than 5 years have passed since last update.

HHVM 3.0.1をCentOS 6.5 (64-bit)にインストールする

Last updated at Posted at 2014-05-26

CentOS6.5を用意する

$ cd /etc/yum.repos.d
$ sudo wget http://www.hop5.in/yum/el6/hop5.repo 

hop5のrepoを追加

HHVMのインストール

$ sudo yum clean all
$ sudo yum install hhvm
$ sudo yum update hiphop-php

動作確認

[vagrant@vagrant-centos65]$ hhvm --version
HipHop VM 3.0.1 (rel)
Compiler:
Repo schema: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391

インストール完了!ここまでは簡単!

nginxのインストール

$ sudo yum install nginx

nginxのConfig修正と起動

$ sudo cp -av /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.20140526
$ sudo vi /etc/nginx/conf.d/default.conf
ーーー
#以下修正
    location / {
        root   /var/www/htdocs;
        index  index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$args;
    }

#以下を server ディレクティブ内に追記
    location ~ \.php$ {
        root           /var/www/htdocs;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
$ sudo /etc/init.d/nginx start

HHVMの起動

$ sudo hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9000

動作確認

http://192.168.33.10 など、設定したIPアドレスにアクセス
「HipHop」と表示されていれば動作中

daemonで起動する方法

調査中

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