ScaleScaleScaleScale

Tips / Nginx


How to install HHVM on Ubuntu 14.x 13.x / Debian 8.x 7.x

HHVM

Recently we explained How to install HHVM on CentOS and Fedora latests versions. Today is the time to do it on Ubuntu and Debian Linux, which are two of the most popular Linux distros. So if you use any of this two distros it’s the perfect time to start working with HHVM to get a performance boost from once. On this post you will learn How to install HHVM on Ubuntu 13.10 and 14.10 LTS, and also how to install HHVM on Debian 7 and 8.

On both distros we will use pre-built packages officially packaged by HHVM team, it’s the best way to get your HHVM ready. Let’s start installing hhvm and hhvm-dbg to help you to debug in case you get segfaults.

Installing HHVM on Ubuntu 13.10 and Ubuntu 14.04 LTS

Ubuntu 13.10 (amd64)

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/ubuntu saucy main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm hhvm-dbg

Ubuntu 14.04 (amd64)

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 hhvm-dbg

Installing HHVM on Debian 7 and Debian 8

Debian 7 (amd64)

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/debian wheezy main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm hhvm-dbg

Debian 8 (amd64)

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/debian jessie main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm hhvm-dbg

Restart the service to ensure it’s ok

/etc/init.d/hhvm restart

Testing HHVM

netstat -plunt | grep hhvm

If everything is fine HHVM should be running at port 9000

[root@my.server.com:~]netstat -plunt | grep hhvm
tcp 0 0 :::9000 :::* LISTEN 18751/hhvm

If you need more information check out the official HHVM documentation

Popular search terms:

  • debian 8 установка hhvm
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking

  • Why support EOL Ubuntu 13.x
    Ubuntu 13.x is already EOL https://wiki.ubuntu.com/Releases

    Some users blindly follow your tutorials and face some issue like dependency conflicts etc

  • hello, i try but get this error

    xxx@xxx:~# apt-get install hhvm hhvm-dbg
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    hhvm-dbg : Conflicts: hhvm
    E: Unable to correct problems, you have held broken packages.

    as a root user