ReferencePlatforms/Linux-Hardware
Setting up CentOS 5 on a Mac Mini
This procedure will re-create the CentOS 5.0-based reference VM image on a Mac Mini's hardware.
Download the ISOs for CentOS 5 and burn to bootable CD. At the time of writing this the downloads were CentOS-5.2-i386 (6 ISOs of which I only burned 1 - 4)
Setup on a Mac Mini
First you need to partition the mini's hard drive so that it allows you to boot from another OS.
Intel Mac Mini installation instructions for CentOS 5
- Boot from the Mac OS X install CD by holding "C" on a restart.
- Click on "Utilities" in the upper left corner and select disk utilities
- Click on the "Entire" disk, select partition tab, then select 1 partition. Choose MS-DOS (I set the size to 1GB to get it smaller than the 8.XX it wants to leave it at). Then click "Options" and select "Master Boot Record" to support booting other OS (3rd option down).
- I selected the remaining space and selected "Free Space" from the pulldown, then Apply - the disk will get formatted and then you should quit the disk utility, restart the computer holding down "t" to start it in Target Mode, this will allow you to eject the Mac OS X install disk and insert the CentOS install disc (1 of 6) - then reboot again with the power button.
- Go through the install - select "build with defaults on free space", select how you want to build the system. After the reboot, it should just start up properly into CentOS.
Package Selection
While installing, select a the GNOME Desktop and then select Custom package development; the following categories were selected:
- Desktop Environments
- Gnome Desktop Environment
- Applications
- Editors
- Test-based internet
- Add lynx
- Development
- Development Tools
- Development Libraries
- X Software Development
- GNOME Software Development
- Legacy Software Development
- Servers
- Turn all off, except for "Printing Support
- Base System
- Turn off Dialup Networking
- Turn on System Tools
On first boot, CentOS will ask some questions:
- Turn the firewall off (we run our build machines on their own network, behind a firewall)
- Disable SELinux
- Enable NTP
Some Sys-prepping
We have some scripts that do some of this: root, cltbld -- Those scripts needed much editing to compensate for not having the sysprep CD. Also I used the install scripts here to do most of the install since they use wget instead of sysprep. It's pretty clear in the root script from above what is for VM and what is not. Just comment out what you don't need. (On the desktop of the image there is a folder called "sysprep" that will have all the rpms used, as well as the modified script)
What is in Version 1
Make directories
mkdir -p /tools/dist/logs mkdir -p /builds/logs
Install Sun Java JDK
Note: we should archive this binary somewhere
- Go to http://java.sun.com/javase/downloads/
- Click through to JDK 5.0 Update 10
- Download the "Linux self-extracting file"... not the RPM
d916c24bed9eef7aebc2626115e14a11 jdk-1_5_0_10-linux-i586.bin
- Save to /tools
cd /tools chmod 0755 ./dist/jdk-1_5_0_10-linux-i586.bin ./dist/jdk-1_5_0_10-linux-i586.bin # type 'yes' to accept the license ln -s jdk1.5.0_10/ jdk
Make GCC 4.1 (redhat branch)
md5sum gcc-4.1.1-30.src.rpm # 555b8cb95d3d7d851b2ebd5c3cec7837 rpm2cpio gcc-4.1.1-30.src.rpm | cpio -i gcc-4.1.1-20061011.tar.bz2 tar xfvj gcc-4.1.1-20061011.tar.bz2 mkdir gcc-obj-release cd gcc-obj-release/ ../gcc-4.1.1-20061011/configure --enable-long-long --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --with-system-zlib --prefix=/tools/gcc-4.1.1 2>&1 | tee ../gcc-4.1.1-configure.log make 2>&1 | tee ../gcc-4.1.1-make.log make install 2>&1 | tee ../gcc-4.1.1-make_install.log
Build Python 2.5.2
(Some VMs use Python 2.5 or Python 2.4.4 but this is what is on the ref platform.)
wget http://python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2 tar xfvj dist/Python-2.5.2.tar.bz2 cd Python-2.5.2/ ./configure --prefix=/tools/python-2.5.2 2>&1 | tee /tools/dist/logs/python2.5.1-configure.log make 2>&1 | tee /tools/dist/logs/python2.5.2-make.log make install 2>&1 | tee /tools/dist/logs/python2.5.2-make_install.log cd /tools/ ln -s python2.5.2 python
Installing Zope Interface
cd /tools/dist/ wget http://www.zope.org/Products/ZopeInterface/3.4.1/zope.interface-3.4.1.tar.gz tar xfvz zope.interface-3.4.1.tar.gz cd zope.interface-3.4.1/ python setup.py install --prefix=/tools/zope-interface-3.4.1 cd /tools; ln -s zope-interface-3.4.1 zope-interface export PYTHONPATH="/tools/zope-interface/lib/python2.5/site-packages:$PYTHONPATH"
Installing Twisted
cd /tools/dist/ wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/TwistedCore-2.4.0.tar.bz2 wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/Twisted-8.0.1.tar.bz2 tar xfvj TwistedCore-2.4.0.tar.bz2 tar xfvj Twisted-8.0.1.tar.bz2 cd TwistedCore-2.4.0 python setup.py install --prefix=/tools/twisted-core-2.4.0 pushd /tools/; ln -s twisted-core-2.4.0 twisted-core; popd export PYTHONPATH="/tools/twisted-core/lib/python2.5/site-packages:$PYTHONPATH" cd /tools/dist/Twisted-8.0.1/ python setup.py install --prefix=/tools/twisted-8.0.1 cd /tools; ln -s twisted-8.0.1 twisted export PYTHONPATH="/tools/twisted/lib/python2.5/site-packages/:$PYTHONPATH"
Installing Mercurial
wget http://www.selenic.com/mercurial/release/mercurial-0.9.5.tar.gz tar -zvxf mercurial-0.9.5.tar.gz cd mercurial-0.9.5 export PYTHONHOME="/tools/python" export PATH="/tools/python/bin:$PATH" python setup.py install
To Do for a new image
The mozconfig for building mozilla should contain the following settings:
CC=/tools/gcc/bin/gcc CXX=/tools/gcc/bin/g++
Add the following lines to ~/.bash_profile
export CVS_RSH=ssh export JAVA_HOME=/builds/jdk export TBOX_CLIENT_CVS_DIR="/builds/tinderbox/mozilla/tools"
Ssh keys are not installed, so depending on what network the machine is put on, copy from another machine on the network.
Nagios and scratchbox are not installed either - so follow the Instructions