Skip to content

Instantly share code, notes, and snippets.

@janikvonrotz
Last active August 26, 2023 06:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janikvonrotz/10816750 to your computer and use it in GitHub Desktop.
Save janikvonrotz/10816750 to your computer and use it in GitHub Desktop.
Ubuntu: Install HHVM #PHP #HHVM

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

  • Ubuntu server

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment