Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 1.26 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
  2. #kernel source is needed for vbox additions
  3.  
  4. yum -y install gcc bzip2 make kernel-devel-`uname -r`
  5. yum -y install gcc-c++ zlib-devel openssl-devel readline-devel sqlite3-devel
  6.  
  7. # upgrading kernel means vbox additions are built for wrong version
  8. yum -y update --exclude='kernel*'
  9.  
  10. mkdir -p /usr/src
  11.  
  12. # Install RBEL, Chef packages
  13. rpm -Uvh http://rbel.frameos.org/rbel6
  14. mv /etc/yum.repos.d/rbel{6,}.repo
  15. sed -i '/^enabled/ iexclude = ruby ruby-irb ruby-rdoc' /etc/yum.repos.d/rbel.repo
  16. yum -y install rubygem-chef
  17.  
  18. #Installing vagrant keys
  19. mkdir /home/vagrant/.ssh
  20. chmod 700 /home/vagrant/.ssh
  21. cd /home/vagrant/.ssh
  22. wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
  23. chown -R vagrant /home/vagrant/.ssh
  24.  
  25. VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
  26. #INstalling the virtualbox guest additions
  27. cd /tmp
  28. wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
  29. mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
  30. sh /mnt/VBoxLinuxAdditions.run
  31. umount /mnt
  32.  
  33. rm VBoxGuestAdditions_$VBOX_VERSION.iso
  34.  
  35. sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
  36.  
  37. #poweroff -h
  38.  
  39. exit