-
-
Save pjjw/1131048 to your computer and use it in GitHub Desktop.
Script for installing and compiling HipHop for PHP on a fresh install of Ubuntu 11.04 x64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# HipHop for PHP scripted installation | |
# by Steve Kamerman, July 12, 2011 | |
echo -e "\e[00;31m**** Installing Prerequisites\e[00m" | |
sudo apt-get --yes install autoconf binutils-dev ccache cmake g++ gcc git-core libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libbz2-dev libcap-dev libc-client2007e-dev libcurl4-openssl-dev libgd2-xpm-dev libgoogle-perftools-dev libicu-dev libmcrypt-dev libmemcached-dev libmysqlclient-dev libncurses-dev libonig-dev libpcre3-dev libreadline-dev libtbb-dev libtool libxml2-dev memcached openssl php5-imagick php5-mcrypt wget zlib1g-dev | |
echo -e "\e[00;31m**** Getting HIPHOP in 5 seconds ****\e[00m" | |
sleep 5 | |
mkdir -p /opt/hiphop/dev | |
cd /opt/hiphop/dev | |
git clone git://github.com/facebook/hiphop-php.git | |
cd hiphop-php | |
rm CMakeCache.txt | |
export CMAKE_PREFIX_PATH=`/bin/pwd`/../ | |
export HPHP_HOME=`/bin/pwd` | |
export HPHP_LIB=`/bin/pwd`/bin | |
MAKEOPTS="-j$(grep -c '^processor' /proc/cpuinfo)" | |
cd .. | |
echo -e "\e[00;31m**** Getting LIBEVENT in 5 seconds ****\e[00m" | |
sleep 5 | |
wget http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz | |
tar -xzvf libevent-1.4.14b-stable.tar.gz | |
cd libevent-1.4.14b-stable | |
cp ../hiphop-php/src/third_party/libevent-1.4.14.fb-changes.diff . | |
patch -p1 < libevent-1.4.14.fb-changes.diff | |
./configure --prefix=$CMAKE_PREFIX_PATH | |
make | |
make install | |
cd .. | |
echo -e "\e[00;31m**** Getting LIBCURL in 5 seconds ****\e[00m" | |
sleep 5 | |
wget http://curl.haxx.se/download/curl-7.21.2.tar.gz | |
tar -xvzf curl-7.21.2.tar.gz | |
cd curl-7.21.2 | |
cp ../hiphop-php/src/third_party/libcurl.fb-changes.diff . | |
patch -p1 < libcurl.fb-changes.diff | |
./configure --prefix=$CMAKE_PREFIX_PATH | |
make | |
make install | |
cd .. | |
echo -e "\e[00;31m**** Getting LIBMEMCACHED in 5 seconds ****\e[00m" | |
sleep 5 | |
wget http://launchpad.net/libmemcached/1.0/0.49/+download/libmemcached-0.49.tar.gz | |
tar -xzvf libmemcached-0.49.tar.gz | |
cd libmemcached-0.49 | |
./configure --prefix=$CMAKE_PREFIX_PATH | |
make | |
make install | |
cd .. | |
echo -e "\e[00;31m**** Ready to build HipHop for PHP ****\e[00m" | |
echo "This process may take 30 minutes or more" | |
echo "Please review the output above and press 'y' if you are ready to build HipHop" | |
read -p "Build HipHop now (y/n)?" | |
if [ "$REPLY" != "y" ]; then | |
echo "You can build HipHop later with the following commands:" | |
echo "cd /opt/hiphop/dev/hiphop-php/" | |
echo "git submodule init" | |
echo "git submodule update" | |
echo "cmake ." | |
echo "make" | |
exit 0 | |
fi | |
cd hiphop-php | |
git submodule init | |
git submodule update | |
cmake . | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
missing a library on apt-get install => distcc