User:Tim Starling/HipHop in CentOS chroot


 * 1) Get host packages

apt-get install rpm yum schroot


 * 1) Set up the chroot

mkdir -p /home/data/centos export HOME=/root rpm --rebuilddb --root=/home/data/centos wget 'http://mirror.centos.org/centos/5/os/x86_64/CentOS/centos-release-5-5.el5.centos.x86_64.rpm' wget 'http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5' rpm --root=/home/data/centos --import RPM-GPG-KEY-CentOS-5 rpm -i --root=/home/data/centos --nodeps 'centos-release-5-5.el5.centos.x86_64.rpm' yum --installroot=/home/data/centos install -y rpm-build yum


 * 1) Set up schroot

mkdir /home/data/chroot cd /home/data/centos tar -czf /home/data/chroot/centos.tgz.

echo ' [centos] type=file description=CentOS 5.5 x86-64 file=/home/data/chroot/centos.tgz ' > /etc/schroot/schroot.conf


 * 1) Enter chroot

schroot -c centos-source


 * 1) Get proper .bashrc

cd /root cp /etc/skel/.*. . ~/.bashrc


 * 1) Install HipHop

yum install redhat-release rpm -ivh http://epel.osuosl.org/5/x86_64/epel-release-5-4.noarch.rpm rpm -ivh 'http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-6.ius.el5.noarch.rpm' rpm -ivh 'http://pkg.tag1consulting.com/hphp/x86_64/hphp-release-1.0-2.el5.noarch.rpm' yum install hiphop-php . /etc/profile.d/hphp.sh


 * 1) Test

echo '<? echo "Hello!\n";' > test.php hphpi -f test.php