We knew and heard a whole lot about LAMP and LNMP, but how about LNMH stack? Wait just what? In which may be the P component that represents PHP? In which does it get and what’s the H component here? Meet HHVM, an open-source machine that is virtual for executing programs written in Hack and PHP. Early, HHVM is developed by Facebook because the Zend+Apache that is regular combination much less efficient to provide big applications integrated PHP. It works perfectly and proven serving over a 9x upsurge in internet demand throughput and over a 5x lowering of memory usage for Facebook weighed against the Zend PHP motor + APC. Soon saying, HipHop Virtual device (HHVM) is a machine that is virtual and open sourced by Facebook to process and execute programs and scripts written in PHP and Hack language. HHVM can be used together with a FastCGI-based webserver like nginx or ( that is apache*******)

In this short article, we’ll you will need to discover ways to install Nginx internet host, MySQL and HHVM on Ubuntu 15.04 VPS which in turn we are able to install WordPress to operate onto it. A tutorial with images.


  1. A host (vps, cloud, devoted) operating Ubuntu 15.04 Vivid Vervet x64. For the information, HHVM does not help any 32 bit os and so they haven’t any intends to include help for 32 bit systems. Inside guide a droplet is used by me from Digital Ocean with 1GB RAM that costs $10/month but for this tutorial I spent only $0.030 (2 hours). That’s what I like from DO I can simply create a server and destroy it every time I want to write a tutorial or test something as they charge hourly so. You can view my setup generate a droplet at DO right here.
  2. Some routine knowledge of typical Unix demand.
  3. Some fundamental understanding of Putty (screen) or Terminal (Linux).
  4. A walk or tea.

How to set up Nginx

Step 1 – Login towards host as root or as a person with root privilege (sudo). You should be also asked to change given root password.( if you are using a VPS from DO,*******)


Step 2 -Update all packages and dependencies of this magic command:

to your VPS

apt-get up-date && apt-get upgrade -y

screenshot pic:


Step 3 – problem this demand to put in Nginx on your own Ubuntu 15.04 vps effortlessly:

apt-get install nginx -y

It appears comparable such as this:


How to set up MySQL

Step 1 – and that means you have actually Nginx set up as internet host. You can now go to install MySQL database host which can be generally speaking required by numerous scripts / apps WordPress that is including and. Issue this command:

apt-get install mysql-server*******************) that is-y(*****)The installation should really be done in moments:


Step 2 – When set up, you'll then must setup fundamental MySQL setup including generate brand new password for MySQL root individual.


screenshot (simply click it to see bigger variation):


How to set up HHVM

Step 1 – and that means you have actually Nginx and MySQL set up. Now let’s enter towards the menu that is main is to install HHVM on your vps. But firstly you have to issue commands that are several down load the mandatory HHVM package.

apt-key adv --recv-keys --keyserver hkp:// 0x5a16e7281be7a449
 add-apt-repository 'deb vivid main'



Step 2 – Do apt-get up-date so that the brand new repository is used:

apt-get up-date -y

it seems like this:


Step 3 – Finally make use of this demand to put in HHVM on your own VPS:

apt-get install hhvm -y

the procedure should complete in moments:


If the method gone well, it's also wise to see this welcome message:


Step 4 – Now you need to run the install script which will install HHVM module for Nginx. Problem this demand:


you’ll see something similar to this:


Configure Nginx Virtual Host for HHVM

Step 5 – Assuming you need to include brand new web site called, therefore create brand new host file that is virtual. You can use any text editor but in my guide I use Nano:

nano /etc/nginx/sites-available/

Step 6 – Then copy paste this configuration there:

server {
   listen 80;
     include hhvm.conf;
     access_log   /var/log/nginx/access.log;
     error_log    /var/log/nginx/error.log;
     root /var/www/;
     index index.php;
     location / {
         try_files $uri $/index.php that is uri/args; 

Once done modifying, just Save and Exit the editor which can be in Nano: Control+O then Control+X.


Step 7 – Now make your internet directory and do a little chmod and stuff that is chown-ing*******)

mkdir -p /var/www/
 chmod -R 755 /var/www/
 Chown www-data that are-R /var/www/



Step 8 – Now allow your newly produced digital hosts file by connecting it:

ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Step 9 – Finally restart Nginx and HHVM:

service nginx restart
 solution hhvm restart



Step 10 – Now offer it a test, create a test.php file to ensure if HHVM is operating and ( that is working

nano /var/www/

then put this in that file:

 echo  defined('HHVM_VERSION')?'HHVM is up and working':'Sorry Not using # that are HHVM';*********************************************************************************************************************************************************************************************************************************); ?>



Hit Control+O to truly save then Control+X to leave the editor.

Step 11 – Now start your browser up and open the newly created HHVM test file and Voila!!


That’s it and congratulation you now have HHVM running on your vps and is capable to serve PHP scripts much more faster and efficient plus Nginx on top of that so your website will now faster.

About The Author

How exactly to produce a VPN that is point-To-Point with on Ubuntu 16.04

Previous article

Utilizing Logrotate and S3cmd to Archive Logs to Object space

Next article

You may also like


Leave a Reply

More in advance