rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
yum -y install git cmake pcre-devel libmcrypt-devel mysql-devel gd-devel libxml2-devel libcap-devel binutils-devel flex bison expat-devel patch gcc44 gcc44-c++ gcc gcc-c++ bzip2 bzip2-devel memcached openldap openldap-devel readline-devel libc-client-devel pam-devel wget ncurses-devel
上面软件是安装过程中需要的,或许你机器已经安装过,假如后面编译时候遇到缺少其他库可以在上面查找
安装以下命令下载必要的软件安装
mkdir hiphop
cd hiphop git clone git://github.com/facebook/hiphop-php.git
使用git 下载hiphop源代码
继续下载其他依赖的库
wget "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.bz2
wget http://www.monkey.org/~provos/libevent-1.4.14-stable.tar.gz wget http://launchpad.net/libmemcached/1.0/0.48/+download/libmemcached-0.48.tar.gz wget http://download.icu-project.org/files/icu4c/4.6.1/icu4c-4_6_1-src.tgz
wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.2.tar.gz
wget "http://downloads.sourceforge.net/project/boost/boost/1.46.1/boost_1_46_1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fboost%2Ffiles%2Fboost%2F1.46.1%2F&use_mirror=ignum"
wget http://php.webtutor.pl/wp-content/uploads/2011/04/libcclient2007-devel.tar.gz
下面解压文件
tar xvjf curl-7.20.0.tar.bz2
tar xvzf libevent-1.4.14-stable.tar.gz
tar xvzf re2c-0.13.5.tar.gz
tar xvzf tbb22_20090809oss_src.tgz
tar xvzf libmemcached-0.48.tar.gz
tar xvzf icu4c-4_6_1-src.tgz
tar xvzf onig-5.9.2.tar.gz
tar xvzf boost_1_46_1.tar.gz
tar xvzf libcclient2007-devel.tar.gz
cd tbb22_20090809oss
gmake
cd tbb22_20090809oss gmake cp -Rp include/tbb/ /usr/include/ cp /build/*_release/*.so /usr/lib/ cp /build/*_release/*.so.2 /usr/lib/ ldconfig cd .. cd re2c-0.13.5 ./configure make install cd .. cd libevent-1.4.14-stable cp ../hiphop-php/src/third_party/libevent-1.4.14.fb-changes.diff . patch < libevent-1.4.14.fb-changes.diff ./configure make install cd .. cd curl-7.20.0 cp ../hiphop-php/src/third_party/libcurl.fb-changes.diff . patch -p0 < libcurl.fb-changes.diff ./configure make install cd .. cd libmemcached-0.48 ./configure make install cd .. cd icu/source ./configure make install cd ../.. cd onig-5.9.2 ./configure make install cd .. cd boost_1_46_1 ./bootstrap.sh ./bjam --layout=system install cd .. cp -r imap local/include/ cp /usr/lib/libc-client.so.2007 local/lib/libc-client.so
以上安装其他依赖库。默认一般都在/usr/local/lib 或者 /usr/local/lib64
cd hiphop-php
git submodule init
git submodule update
export HPHP_HOME=`pwd`
export HPHP_LIB=`pwd`/bin
cmake .
make
转载于:https://blog.51cto.com/mickelfeng/1034551