Follow the below steps to install OpenVZ in your server. 1. Add the openvz repo.
1 2 3 |
cd /etc/yum.repos.d wget <a class="external free" href="http://download.openvz.org/openvz.repo" rel="nofollow">http://download.openvz.org/openvz.repo</a> yum -y install ovzkernel |
2. Adjust the sysctl.conf
1 |
vi /etc/sysctl.conf |
1 2 3 4 5 6 7 8 9 10 11 12 |
# Controls IP packet forwarding net.ipv4.ip_forward = 1 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Controls the System Request debugging functionality of the kernel kernel.sysrq = 1 net.ipv4.conf.default.proxy_arp = 0 net.ipv4.conf.default.send_redirects = 1 net.ipv4.conf.default.send_redirects = 1 net.ipv4.conf.all.send_redirects = 0 # Enables source route verification net.ipv4.conf.all.rp_filter = 1 |
1 |
sysctl -p |
1 2 |
shutdown -r now uname -r |
3. Install openvz tools.
1 |
yum install vzctl vzquota vzpkg |
4. Start
1 |
/etc/init.d/vz start |
5. Download pre-created templates from http://download.openvz.org/template/precreated/ to your server.
1 2 |
cd /vz/template/cache/ wget <a class="external free" href="http://download.openvz.org/template/precreated/centos-6-x86.tar.gz" rel="nofollow">http://download.openvz.org/template/precreated/centos-6-x86.tar.gz</a> |
6. Create a VPS
1 |
vzctl create 101 --ostemplate centos-5-x86 --config vps.basic |
7. Set hostname
1 |
vzctl set 101 --hostname veeble --save |
Now you have a […]