Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Building and installing HHVM on Fedora 19 or 20
Packages for building
sudo yum install git svn cpp make autoconf automake libtool patch memcached gcc-c++ cmake wget boost-devel mysql-devel pcre-devel gd-devel libxml2-devel expat-devel libicu-devel bzip2-devel oniguruma-devel openldap-devel libedit-devel libc-client-devel libcap-devel binutils-devel pam-devel elfutils-libelf-devel libmcrypt-devel libcurl-devel libmemcached-devel jemalloc-devel tbb-devel libdwarf-devel ImageMagick-devel libxslt-devel ocaml libevent-devel libyaml-devel readline-devel glog-devel libzip-devel lz4-devel sqlite-devel gmp-devel gperf libatomic
Getting HHVM source code and building
mkdir dev cd dev git clone git://github.com/facebook/hhvm.git --depth=1 export CMAKE_PREFIX_PATH=`pwd` cd hhvm # if git submodule fails because of tree error, then clone hhvm again without the --depth parameter git submodule update --init --recursive cmake . make # Add -jN, with N being numcores+1 to maximize build performance.
If running on a different machine, install runtime dependencies (probably incomplete below):
sudo yum install glog boost
The hhvm executable is
The Hack language
Fedora Service Daemon
To have HHVM start as a system daemon process on Fedora once you have complied HHVM you will want to create an hhvm service below you will find an example of a systemd file. This will allow you to start HHVM as a daemon by issuing service start and stop commands and enable HHVM to be run on boot.
Please note the that hhvm should be linked to or copied to /usr/bin for this script, a config file needs to exist at /etc/hhvm/hhvm.hdf, and user name for HHVM is apache which matches the Fedora default. This can be changed in the hhvm.service script to match your setup.
[Unit] Description=HipHop Virtual Machine [Service] ExecStart=/usr/bin/hhvm -m daemon -u apache -c /etc/hhvm/hhvm.hdf ExecStop=rm /var/run/hhvm.pid PIDFile=/var/run/hhvm.pid [Install] WantedBy=multi-user.target
sudo systemctl start hhvm
Enable HHVM on boot
sudo systemctl enable hhvm