- Name: vagrant-centos
- Operating System: Linux
- Version: Red Hat
- Base Memory Size: 360 MB
- Create new hard disk
- Dynamically expanding storage
- 40 GB
- 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: URL
- Disable IPv6, leave IPv4 enabled with DHCP
- URL Setup:
- Use text mode
- Re-initialize all drives
- Root password: vagrant
- Partitioning Type: Use entire drive
- Configure network: yes
- Set hostname to vagrant-centos
- Customize software installation:
- Unselect:
- Dial-up networking
- Editors
- Text-based internet
- Base
- Unselect:
- Remove CDRom media
- Reboot
- Disable firewall
- Run Services:
- Disable cups
yum install curl ftp rsync sudo time wget which openssh-clients
yum install gcc bzip2 make kernel-devel-`uname -r`
yum install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
yum install perl Xorg
- In /etc/selinux/config, set SELINUX=disabled
- chkconfig iptables off
- export KERN_DIR=/usr/src/kernels/2.6.32-220.17.1.el6.x86_64
- Devices -> Install Guest Additions…
- sudo mount -o ro -t iso9660 /dev/cdrom /mnt
- sudo sh /mnt/VBoxLinuxAdditions.run
- reboot
groupadd admin useradd -G admin vagrant passwd vagrant
visudo
echo ‘export PATH=$PATH:/usr/sbin:/sbin’ >> ~vagrant/.bashrc
curl -L get.rvm.io | sudo bash -s stable logout login as root rvm install 1.9.2
rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-1.noarch.rpm yum install puppet
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
Back on host
- vagrant package –base vbox_vm_name
- vagrant box add centos62 package.box