Ubuntu 14.04 LEMPH Stack

The next LTS version of Ubuntu named Trusty Tahr was released last May. Servers I’ve upgraded to this release have been running without issues other than HHVM crashing every once in a while. I’ve since replaced HHVM with the standard PHP-FPM stack running PHP 5.6 resulting in nearly identical performance with added stability.

MariaDB 10.0.x
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
echo deb http://mirrors.syringanetworks.net/mariadb/repo/10.0/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/mariadb.list

Nginx 1.6.x
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
echo deb http://nginx.org/packages/ubuntu/ trusty nginx | sudo tee /etc/apt/sources.list.d/nginx.list

Varnish 4.x
wget -O - http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -
echo deb http://repo.varnish-cache.org/ubuntu/ trusty varnish-4.0 | sudo tee /etc/apt/sources.list.d/varnish.list

HHVM 3.0.x
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

Note that HHVM currently requires a 64 bit OS.

Install all the servers
sudo apt-get install mariadb-server nginx hhvm varnish

Configure HHVM
Edit server config to enable UNIX socket
vim /etc/hhvm/server.ini

Disable TCP/IP port
;hhvm.server.port = 9000

Enable Unix socket

Start HHVM at boot
sudo update-rc.d hhvm defaults

Run command line scripts with HHVM:
hhvm whatever.php

Comments Off on Ubuntu 14.04 LEMPH Stack

Categories random