Skip to content

Building and installing hhvm on centos 6.x

Teguh Dwicaksana edited this page Nov 29, 2013 · 3 revisions

Additional Repository Config Installation

As CentOS doesn't provide some library/packages and some package provided by CentOS is too old, we can using EPEL and HHVM Repository for CentOS/RHEL.

sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh http://dheche.fedorapeople.org/hhvm/el6/RPMS/x86_64/hhvm-release-6-1.noarch.rpm

Development Packages Installation

sudo yum install git cpp make autoconf automake libtool patch memcached gcc-c++ cmake \
  wget expat-devel binutils-devel elfutils-libelf-devel rpmdevtools yum-utils

Installation of Package that Needed by HHVM

sudo yum install libmcrypt-devel glog-devel jemalloc-devel tbb-devel libdwarf-devel mysql-devel \
  libxml2-devel libicu-devel pcre-devel gd-devel boost-devel sqlite-devel pam-devel \
  bzip2-devel oniguruma-devel openldap-devel readline-devel libc-client-devel libcap-devel \
  libevent-devel libcurl-devel libmemcached-devel

Create rpmbuild Environment

rpmdev-setuptree

Getting HHVM Source RPM

yumdownloader --source hhvm

Building HHVM

rpmbuild --rebuild hhvm-2.3.0-0.2.el6.src.rpm 

Installing HHVM

sudo yum localinstall ~/rpmbuild/RPMS/x86_64/hhvm-2.3.0-0.2.el6.x86_64.rpm

Running Programs

  • The hhvm binary can be found in /usr/bin/hhvm.
  • You can start hhvm as daemon using sudo /etc/init.d/hhvm start
  • If you want hhvm automagicly start every boot, run sudo chkconfig hhvm on
  • Log files can be found in /var/log/hhvm
Clone this wiki locally