Create VPS on CentOs

  • cd /etc/yum.repos.d wget http://download.openvz.org/openvz.repo rpm --import http://download.openvz.org/rpm-GPG-key-openvz
  • # vi openvz.repo [openvz-kernel-rhel5] enable=0 [openvz-kernel-rhel6] enable=1
  • #yum search vzkernel #yum install vzkernel.x86_64/vzkernal-devel.x86_64
  • vi /boot/grub/menu.lst # yum install vzctl vzquota
  • #vi /etc/sysctl.conf ipv4.ip forverding =1 ipv4.default.rp.filter=1 kernal.sysrp =1
  • sysctl -p
  • # vi /etc/vz/vz.conf NEIGHBOUR_DEVS=all
  • Download from openvz.org
  • wget http://download.openvz.org/template/precreated/ubuntu-12.04-x86_64.tar.gz
  • #vzctl create 10 --ostemplate ubuntu-12.04.x86_64 #vzctl set 10 --onboot yes --save (start on boot)
  • #vzctl set 10 --ipadd 192.168.88.240 --save
  • #vzctl set 10 --nameserver 192.168.88.2 --save #vzctl set 10 --nameserver 192.168.88.2 --save
  • # vzctl set 10 --hostname vps.domain.com --save
  • # vzctl set 10 --diskspace 10G:12G --save
  • #vzctl start 10
  • vzctl exec 10 passwd
  • # vzctl enter 10

Tips

Check list for creating vps on any linux server