User:Tim Starling/HipHop in CentOS chroot

Jump to navigation Jump to search

# Get host packages

apt-get install rpm yum schroot

# Set up the chroot

mkdir -p /home/data/centos
export HOME=/root
rpm --rebuilddb --root=/home/data/centos
wget ''
wget ''
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

# Set up schroot

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

echo '
description=CentOS 5.5 x86-64
' > /etc/schroot/schroot.conf

# Enter chroot

schroot -c centos-source

# Get proper .bashrc

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

# Install HipHop

yum install redhat-release
rpm -ivh
rpm -ivh ''
rpm -ivh ''
yum install hiphop-php
. /etc/profile.d/

# Test

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