Introduction:-
OpenVZ is a complete server automation and virtualization software. OpenVZ creates multiple isolated Virtual Private Servers (VPSs) on a single physical server to share hardware and management effort with maximum efficiency. Each VPS performs and executes exactly like a stand-alone server for its users and applications as it can be rebooted independently and has its own root access, users, IP addresses, memory, processes, files, applications, system libraries, and configuration files.
Note:- Following steps I have used to install OpenVz on Red Hat Enterprise Linux 5.4 [32 bit].
Per quest:-
- Configure IP = 192.168.1.1 & Hostname = server.rootuser.in
- Create separate partition for container's private directories i.e. /vz.
- Firewall and Selinux should be off.
- Download Kernel and OpenVz Utilities from following link and save it on Desktop & also download precreate OS template.
Kernel Download link = http://wiki.openvz.org/Download/kernel/rhel5/
vzctl utility = http://wiki.openvz.org/Download/vzctl
vzctl-lib=http://download.openvz.org/utils/vzctl/3.0.30.2/vzctl-lib-3.0.30.2-1.i386.rpm
vzquota utility = http://wiki.openvz.org/Download/vzquota
OS template = http://download.openvz.org/template/precreated/
Install OpenVz on redhat:-
1] Install kernel binary rpm.
2] There are a number of kernel limits that should be set for OpenVZ to work correctly.
Edit and append sysctl.conf file.
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
:wq
3] To apply changes use following command.
4] Make sure SELinux is disabled.
SELINUX = disabled
:wq
5] Now, you should reboot your computer and choose "OpenVZ" kernel from the boot loader menu.
6] Install opevz utilities.
7] Start vz service.
Creating New Virtual Private Server:-
1] Download the corresponding OS template and place it to the /vz/template/cache directory of the physical machine.
2] Create new VPS by using following command.
Syntax :- # vzctl create <Container ID> --ostemplate <templage name> --config basic
Example :-
This will create a Virtual Private Server with ID 101, the private area based on
the centos-5-x86 OS template.
3] To check container is created or not.
No comments:
Post a Comment