-
Notifications
You must be signed in to change notification settings - Fork 3k
Building and installing HHVM on Fedora 19 or 20
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
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 hphp/hhvm/hhvm
.
See https://github.com/facebook/hhvm/wiki/Building-the-Hack-Typechecker.
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
sudo systemctl enable hhvm