Chris Schuld's Blog

personal musings on the composition of software

Written By: Chris Schuld Saturday, September 5th, 2009

There are a few tutorials out there on installing OpenVZ in CentOS 5.3. Here are the steps I use to install OpenVZ on a brand new installation of CentOS 5.3:

Note: this tutorial / walkthrough is for use 64 bit only

  1. Update the box via yum
  2. Install the OpenVZ Repository and grab the GPG key
  3. Install OpenVZ
  4. Install OpenVZ Controller and Quota system
  5. Configure the local system for the OpenVZ kernel
  6. Update OpenVZ’s ARP Settings
  7. Disable SELINUX
  8. Reboot
yum -y update
cd /etc/yum.repos.d
wget http://download.openvz.org/openvz.repo
rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ
yum -y install ovzkernel.x86_64
yum -y install vzctl.x86_64 vzquota.x86_64

Now; we need to configure the sysctl.conf file for OpenVZ

perl -pi -e 's/net\.ipv4\.ip_forward = 0/net\.ipv4\.ip_forward = 1/' /etc/sysctl.conf
perl -pi -e 's/kernel\.sysrq = 0/kernel\.sysrq = 1/' /etc/sysctl.conf
echo -e "\n\nnet.ipv4.conf.default.proxy_arp = 0\nnet.ipv4.conf.all.rp_filter = 1\nnet.ipv4.conf.default.send_redirects = 1\nnet.ipv4.conf.all.send_redirects = 0\nnet.ipv4.icmp_echo_ignore_broadcasts=1\nnet.ipv4.conf.default.forwarding=1\nkernel.ve_allow_kthreads=1\n" >> /etc/sysctl.conf
perl -pi -e 's/NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/' /etc/vz/vz.conf

Disable SELINUX

vi /etc/sysconfig/selinux

Reboot the machine

reboot
Categories: CentOS5, OpenVZ

Leave a Reply

About Chris

Chris Schuld

Thank you for visiting my website. I use this site for a myriad of things: maintaining software I have open sourced, connecting with my readers and friends and documenting all of this little things "I wished I would have written down." You can read more about me or contact me.


thanks for visiting... happy coding

Recent Comments