Install HHVM

This post is part of my Your own Virtual Private Server hosting solution project.
Get the latest version of this article here: https://gist.github.com/10816750.

Introduction

HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides.

Requirements

Installation

Get the release codename of your Ubuntu installation.

cat /etc/lsb-release

Where DISTRIB_CODENAME is the release codename.

Add the installation repository for HHVM.

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/ubuntu <release codename> main | sudo tee /etc/apt/sources.list.d/hhvm.list

Install HHVM.

sudo apt-get update
sudo apt-get install hhvm

To run HHVM at boot.

 sudo update-rc.d hhvm defaults

Check the HHVM version.

hhvm --version

Finally let’s change the listener for HHVM.

sudo hhvm --mode server -vServer.Type=fastcgi -vServer.FileSocket=/var/run/hhvm.sock

Source

HHVM Prebuilt Packages on Ubuntu 12.04
FasterCgi with hhvm
FastCGI configuration on the HHVM GitHub Wiki

Leave a Reply