mirror of
https://github.com/facebook/hhvm.git
synced 2026-03-20 04:46:21 +00:00
Page:
Building and installing HHVM on Amazon Linux 2016.03
Pages
Building and installing HHVM on OSX 10.8 With Homebrew
Building RPMs for HHVM on CentOS 6.6
Building and Installing HHVM on Cygwin
Building and Installing HHVM
Building and Installing on FreeBSD 8.2
Building and Installing on OpenBSD 6.1
Building and installing HHVM on Amazon Linux 2013.09.1
Building and installing HHVM on Amazon Linux 2014.03
Building and installing HHVM on Amazon Linux 2016.03
Building and installing HHVM on CentOS 5
Building and installing HHVM on CentOS 6.3
Building and installing HHVM on CentOS 6.4
Building and installing HHVM on CentOS 6.6
Building and installing HHVM on Debian 6
Building and installing HHVM on Debian 7
Building and installing HHVM on Debian 8
Building and installing HHVM on Fedora 19 or 20
Building and installing HHVM on Fedora 19
Building and installing HHVM on FreeBSD from ports
Building and installing HHVM on Gentoo
Building and installing HHVM on Mint 15
Building and installing HHVM on Mint 17
Building and installing HHVM on OSX 10.10 with MacPorts
Building and installing HHVM on OSX 10.10
Building and installing HHVM on OSX 10.9
Building and installing HHVM on RHEL 7
Building and installing HHVM on Ubuntu 12.04
Building and installing HHVM on Ubuntu 12.10
Building and installing HHVM on Ubuntu 13.04
Building and installing HHVM on Ubuntu 13.10
Building and installing HHVM on Ubuntu 14.04 (arm64)
Building and installing HHVM on Ubuntu 14.04
Building and installing HHVM on Ubuntu 14.10
Building and installing HHVM on Ubuntu 15.04
Building and installing HHVM on Ubuntu 15.10
Building and installing HHVM on Windows with MSVC
Building and installing hhvm on CentOS 7.x
Building and installing on Ubuntu 10.04 LTS
Building and installing on Ubuntu 10.10
Building the Hack Typechecker
DSO 3.5.0
Extension API
FAQ
FastCGI
Getting Started
HHVM Composer Plugin for Debian Based Systems
HHVM builtin Webserver
Hack Editor Plugins
Hackabook. ID#1080032452
Home
How to Report Issues
Human Timeouts
INI Settings
Libevent Removal
Long term support (LTS)
Mirror
Open Academy
Package Maintainers
Performance Tuning
Prebuilt Packages for HHVM
Prebuilt Packages on Arch Linux
Prebuilt Packages on Centos 7.x
Prebuilt Packages on Debian 7
Prebuilt Packages on Debian 8
Prebuilt Packages on Mint 15
Prebuilt Packages on Mint 16
Prebuilt Packages on Ubuntu 12.04
Prebuilt Packages on Ubuntu 13.04
Prebuilt Packages on Ubuntu 13.10
Prebuilt Ulyaoth Repository
Prebuilt packages on Ubuntu 10.04
Prebuilt packages on Ubuntu 14.04
Prebuilt packages on Ubuntu 15.04 (vivid)
Profiling
Reporting Crashes
Running HipHop VM
Running PHP programs with HHVM
Users
What is Phabricator
No results
5
Building and installing HHVM on Amazon Linux 2016.03
Nando edited this page 2017-01-05 14:52:04 +01:00
This process was tested against HHVM 3.14.1 on Amazon Linux 2016.03
Install Various Dependencies
Dependencies from Amazon Linux and EPEL
sudo yum-config-manager --enable epel && \
sudo yum -y update && \
sudo yum -y install \
autoconf \
automake \
binutils-devel \
boost-devel \
bzip2-devel \
chrpath \
cmake \
cpp \
curl-devel \
elfutils-libelf-devel \
expat-devel \
gcc-c++ \
gd-devel \
git \
jemalloc-devel \
libIDL-devel \
libc-client-devel \
libcap-devel \
libevent-devel \
libicu-devel \
libmcrypt-devel \
libmemcached-devel \
libtool \
libxml2-devel \
make \
memcached \
mysql-devel \
oniguruma-devel \
openldap-devel \
pam-devel \
patch \
pcre-devel \
readline-devel \
svn \
wget \
libxslt-devel \
ImageMagick-devel \
gmp-devel \
gperf \
libdwarf-devel \
libedit-devel \
libvpx-devel \
libyaml-devel \
libzip-devel \
lz4-devel \
numactl-devel \
sqlite-devel \
unixODBC-devel \
fribidi-devel \
fastlz-devel \
enca \
re2-devel \
cmake3 \
;
OCaml
sudo yum-config-manager --add-repo http://download.opensuse.org/repositories/home:ocaml/CentOS_6/home:ocaml.repo
sudo yum -y install ocaml
sudo yum-config-manager --disable home_ocaml
Google glog
wget https://github.com/google/glog/archive/v0.3.4.tar.gz && \
tar zxvf v0.3.4.tar.gz && \
cd glog-0.3.4 && \
./configure --prefix=/usr && \
make && \
sudo make install && \
cd ..
Intel Threading Building Blocks (tbb) (>=4.)
sudo yum -y remove tbb tbb-devel && \
cd ~ && \
wget https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160526oss_src_0.tgz && \
tar zxvf tbb44*.tgz && \
cd tbb44* && \
cd src && \
make && \
cd .. && \
sudo mkdir -p /usr/include/serial && \
sudo cp -a include/serial/* /usr/include/serial/ && \
sudo mkdir -p /usr/include/tbb && \
sudo cp -a include/tbb/* /usr/include/tbb/ && \
sudo cp build/linux_intel64*/libtbb.so.2 /usr/lib64/ && \
sudo ln -s /usr/lib64/libtbb.so.2 /usr/lib64/libtbb.so && \
cd ..
Checkout HHVM and submodules
cd ~ && \
git clone git://github.com/facebook/hhvm.git --depth=1 && \
cd hhvm && \
git checkout HHVM-3.14.1 && \
git submodule update --init --recursive && \
Building HHVM
Compiling and installing
cd ~/hhvm && \
cmake3 . && \
make -j$(($(nproc)+1)) && \
sudo make install
Alternatively compile with Zend Compat layer:
cd ~/hhvm && \
cmake3 -DENABLE_ZEND_COMPAT=ON . && \
make && \
sudo make install
Running HHVM on Amazon EC2
t1.micro
Because of its low memory, if you want to run HHVM on a t1.micro instance, you'll need to add the following to your config.hdf file (#1129):
Eval {
JitASize = 134217728
JitAStubsSize = 134217728
JitGlobalDataSize = 67108864
}
Or the config.ini equivalent (not tested):
hhvm.eval.jit_a_size = 134217728
hhvm.eval.jit_a_stubs_size = 134217728
hhvm.eval.jit_global_data_size = 67108864
Beefier instance types don't have this issue, although it would still be a good idea to tweak your settings for your instance type.