How To Install HHVM on Ubuntu 14.04

r00t August 12, 2015

Install HHVM on Ubuntu 14.04

This how to will help you with your install and configuration of HHVM on your Ubuntu 14.04 server. For those of you who didn’t know, HipHop Virtual Machine (HHVM) is a virtual machine developed and open sourced by Facebook to process and execute programs and scripts written in PHP. Facebook developed HHVM because the regular Zend+Apache combination isn’t as efficient to serve large applications built in PHP.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation HHVM on Ubuntu 14.04 server.

Install HHVM on Ubuntu 14.04

Step 1. First of all make sure that all packages are up to date.

Step 2. Install HHVM.

First we need to add the HHVM key to your Ubuntu Server with the following command:

Then run the commands below to add HHVM repository to your system:

Now we can install HHVM with the following command:

HHVM should have been successfully installed, to make sure run the following command:

Make it start on boot by running the command:

HHVM includes an excellent script to install FastCGI based on web server you have installed. This section will help you configure HHVM in the FastCGI mode with the Apache and Nginx servers:

With Apache

Configuring HHVM to work in the FastCGI mode with Apache is extremely simple. All you need to do is execute the following following script:

With Nginx

If you are using Nginx with PHP-FPM, you’ll have to modify the configuration file to disable the use of PHP-FPM. This file is normally located at /etc/nginx/sites-available/default. Look for the following section and make sure it’s all commented (by adding a # at the beginning of each line):

After doing this, execute the following script:

Finally, run the commands below to start up HHVM:

Step 3. Testing HHVM.

To test HHVM, create a test page in the root directory and type these lines in the file and save it:

Then add the following code to your new file:

Try to access it at http://your_server_ip/hhvminfo.php. If the PHP info page is rendered in your browser then everything looks good and you are ready to proceed further.


HHVM info page

Congratulation’s! You have successfully installed HHVM. Thanks for using this tutorial for installing HHVM (HipHop Virtual Machine) in Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official HHVM web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!


Share on Google+3Share on Facebook0Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon4Share on Reddit1Pin on Pinterest3
The Tags:

Leave a Comment