In this tutorial, we will show you how to install and configure HHVM on Debian 8. 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 and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of HHVM (HipHop Virtual Machine) on a Debian 8 server.
- A server running one of the following operating systems: Debian 8.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install HHVM on Debian 8
Step 1. Before we install any software, it’s important to make sure your system is up to date by running the following
apt-get commands in the terminal:
apt-get update apt-get upgrade
Step 2. Installing HHVM.
First, we need to add the HHVM repository to your Debian 8 server with the following command:
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449 echo deb http://dl.hhvm.com/debian $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/hhvm.list
Now we can install HHVM with the following command:
sudo apt-get update sudo apt-get install -y hhvm
Verify the HHVM version:
$ php -v HipHop VM 3.15.0 (rel) Compiler: tags/HHVM-3.15.0-0-g92a682ebaa3c85b84857852d8621f528607fe27d Repo schema: 225d4323575bbc8a4bmwe4609a1c41354f6bca830
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:
<? php phpinfo(); ?>
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.
Congratulations! You have successfully installed HHVM. Thanks for using this tutorial for installing HHVM (HipHop Virtual Machine) on your Debian 8 system. For additional help or useful information, we recommend you to check the official HipHop Virtual Machine website.