Install HipHop Virtual Machine (HHVM) in Ubuntu 14.04

HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time compilation approach to achieve superior performance while maintaining the flexibility and ease of use that PHP developers are accustomed to (dynamic features like eval(), rapid run-edit-debug cycle, etc).

HHVM is used by Facebook to serve billions of web requests per day. To date, HHVM (and its predecessor HPHPc before it) has realized over a 9-times increase in web request throughput and over a 5-times reduction in memory consumption for Facebook compared with the Zend PHP 5.2 engine + APC.

[button link=”http://docs.hhvm.com/manual/en/features.php” style=”info” color=”primary”]Features Of HHVM[/button]

Install HHVM on Ubuntu 14.04

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -

echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list

sudo apt-get update

sudo apt-get install hhvm

# If you are getting segfaults

sudo apt-get install hhvm-dbg

Start HHVM at boot

sudo update-rc.d hhvm defaults

Run a PHP program with HHVM

– Create a file called ‘hello.php’ and add following content

< ?php echo 'Hello from Sysads Gazette'; ?>

– Execute the php file

hhvm hello.php

hhvm-01

 
comments powered by Disqus