how to install hiphop for php? how to install hiphop for php? php php

how to install hiphop for php?


HipHop is very difficult to install, but luckily for you I've just been through it!

You need a dedicated server, easiest to install on Red Hat or CentOS, or Amazon Linux. You cannot install it on a shared host, you need root access.

It's also easier to install on a clean server (just the OS).

I recommend you get a clean Instance from Amazon Web Services and install it on that, you can turn it off whenever you don't need it. It's not expensive.

This will install it on an AWS Instance, put it into SSH one line at a time:

<!-- language: sh -->sudo su -export LDFLAGS="$LDFLAGS -lrt"export CMAKE_PREFIX_PATH=/home/ec2-user/hiphop/localexport HPHP_HOME=/home/ec2-user/hiphop/hiphop-phpexport HPHP_LIB=/home/ec2-user/hiphop/hiphop-php/binldconfigyum -y install git cmake boost pcre-devel libicu-devel libmcrypt-devel oniguruma-devel mysql-devel gd-devel boost-devel libxml2-devel libcap-devel binutils-devel flex bison expat-devel patch gcc gcc-c++ bzip2 bzip2-devel memcached openldap openldap-devel readline-devel libc-client-devel pam-develmkdir /home/ec2-user/hiphopcd /home/ec2-user/hiphopgit clone git://github.com/facebook/hiphop-php.gitwget "http://downloads.sourceforge.net/project/re2c/re2c/0.13.5/re2c-0.13.5.tar.gz?use_mirror=cdnetworks-us-2"wget "http://www.threadingbuildingblocks.org/uploads/77/142/2.2/tbb22_20090809oss_src.tgz"wget http://curl.haxx.se/download/curl-7.20.0.tar.bz2wget http://www.monkey.org/~provos/libevent-1.4.14-stable.tar.gzwget http://launchpad.net/libmemcached/1.0/0.48/+download/libmemcached-0.48.tar.gztar xvjf curl-7.20.0.tar.bz2tar xvzf libevent-1.4.14-stable.tar.gztar xvzf re2c-0.13.5.tar.gztar xvzf tbb22_20090809oss_src.tgztar xvzf libmemcached-0.48.tar.gzexport LDFLAGS="$LDFLAGS -lrt"export CMAKE_PREFIX_PATH=/home/ec2-user/hiphop/localcd /home/ec2-user/hiphop/tbb22_20090809ossgmakecp -Rp include/tbb/ /usr/include/cp /home/ec2-user/hiphop/tbb22_20090809oss/build/*_release/*.so /usr/lib/cp /home/ec2-user/hiphop/tbb22_20090809oss/build/*_release/*.so.2 /usr/lib/ldconfigcd /home/ec2-user/hiphop/re2c-0.13.5./configure --prefix=/home/ec2-user/hiphop/localmake installcd /home/ec2-user/hiphop/libevent-1.4.14-stablecp /home/ec2-user/hiphop/hiphop-php/src/third_party/libevent-1.4.14.fb-changes.diff .patch < libevent-1.4.14.fb-changes.diff./configure --prefix=/home/ec2-user/hiphop/localmake installcd /home/ec2-user/hiphop/curl-7.20.0cp /home/ec2-user/hiphop/hiphop-php/src/third_party/libcurl.fb-changes.diff .patch -p1 < libcurl.fb-changes.diff./configure --prefix=/home/ec2-user/hiphop/localmake installcd /home/ec2-user/hiphop/libmemcached-0.48./configure --prefix=/home/ec2-user/hiphop/localmake installcd /home/ec2-user/hiphop/hiphop-phpgit submodule initgit submodule updateexport HPHP_HOME=/home/ec2-user/hiphop/hiphop-phpexport HPHP_LIB=/home/ec2-user/hiphop/hiphop-php/bincmake .makealias hphp=/home/ec2-user/hiphop/hiphop-php/src/hphp/hphp

Then every time you login to SSH, paste this:

<!-- language: sh -->sudo su -cd /home/ec2-userexport LDFLAGS="$LDFLAGS -lrt"export CMAKE_PREFIX_PATH=/home/ec2-user/hiphop/localexport HPHP_HOME=/home/ec2-user/hiphop/hiphop-phpexport HPHP_LIB=/home/ec2-user/hiphop/hiphop-php/binldconfigalias hphp=/home/ec2-user/hiphop/hiphop-php/src/hphp/hphp

Oh, I should add that you will need HipHop installed on the server you want to run the compiled scripts on. So with all this considered, it's probably not what you want.


If you use CentOS 5.4, it's more easier to install the entire needed packages via yum.Just have to install first the following repos:

HPHP:

rpm -ivh http://pkg.tag1consulting.com/hphp/x86_64/hphp-release-1.0-2.el5.noarch.rpm

EPEL:

rpm -ivh http://epel.osuosl.org/5/x86_64/epel-release-5-4.noarch.rpm

IUS:

rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-8.ius.el5.noarch.rpm

Before installing, uninstall mysql and php

After installing those repos, you can install by simply typing:

yum install hiphop-php