These instructions install ruby and rubygems from source, not from RPMs. For instructions on installing from RPMs, look at something like http://wiki.opscode.com/display/chef/Installation+on+RHEL+and+CentOS+5+with+RPMs or http://mykestubbs.com/blog/2010/03/chef-installation-on-centos-54.html
Download net install iso: http://mirrors.kernel.org/centos/5.4/isos/i386/CentOS-5.4-i386-netinstall.iso
- Name: vagrant-centos
- Operating System: Linux
- Version: Red Hat (64bit)
- Base Memory Size: 768 MB
- Create new hard disk
- Dynamically expanding storage
- 20 GB
- Enable IO APIC
- Disable Audio
- Disable USB
- Make sure network is set to NAT
- Attach the net install ISO to the CDROM
- Run it
- (mode: linux text)
- Installation Method: HTTP
- Disable IPv6, leave IPv4 enabled with DHCP
- HTTP Setup:
- Web site name: mirrors.kernel.org
- CentOS directory: /centos/5.4/os/i386
- Use text mode
- Initialize drive and erase data: yes
- Configure network: yes
- Set hostname to vagrant-centos
- Root password: vagrant
- Customize software installation:
- Unselect All
- Remove CDRom media
- Reboot
- Disable firewall
- Run Services:
- Disable cups
yum install curl ftp rsync sudo time wget which
yum install gcc bzip2 make kernel-devel-`uname -r`
yum install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
yum erase wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
- Devices -> Install Guest Additions…
- sudo mount -o ro -t iso9660 /dev/cdrom /mnt
- sudo sh /mnt/VBoxLinuxAdditions.run
- Error about Xwindows install - should be okay (?)
groupadd admin useradd -G admin vagrant passwd vagrant
visudo
echo ‘export PATH=$PATH:/usr/sbin:/sbin’ >> ~vagrant/.bashrc
wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.9.2-p290.tar.gz
tar -zxvf ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290
./configure –with-openssl-dir=/usr/lib/openssl
make
sudo make install
cd
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.6.tgz
tar -xzvf rubygems-1.3.6.tgz
cd rubygems-1.3.6
sudo ruby setup.rb –no-rdoc –no-ri
cd
rm -rf ruby*
sudo gem install chef –no-rdoc –no-ri
mkdir .ssh chmod 755 .ssh curl http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub > .ssh/authorized_keys chmod 644 .ssh/authorized_keys
- sudo /sbin/ifconfig
- write down MAC address of eth0 (eg. 08:00:27:60:AE:41)
sudo yum clean headers packages dbcache expire-cache
- shut down vm
Follow instructions on http://vagrantup.com/docs/base_boxes.html