Note: this tutorial was tested with Turnkey Linux 13.0
Turnkey Linux is a great distro that manages to couple the advantages of a minimal Linux setup with powerful tools like webadmin, a pre-built lamp stack, etc.
HHVM (created by Facebook and released as an open-source project) is “an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides.”.
During one of our project we felt the necessity to improve the PHP performance, and we installed HHVM on our TurnkeyLinux-based machine.
We couldn’t find any guide to install HHVM on this specific distro, and we ended using the Debian 7 HHVM installation tutorial (with a little modification) to do the job.
wget -O tempKey http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add tempKey echo deb http://dl.hhvm.com/debian wheezy main | tee /etc/apt/sources.list.d/hhvm.list apt-get update apt-get install hhvm
In case you need them, there are a couple of extra steps as indicated by the HHVM page:
# If you are getting segfaults sudo apt-get install hhvm-dbg # Living on the edge (rebuilt everyday, unstable) sudo apt-get install hhvm-nightly # Segfaults in the nightly sudo apt-get install hhvm-nightly-dbg