From Campworld

LinuxServersFC5: HOWTO OpenVZ Server Using Fedora Core 5

History / Status

Introduction

OpenVZ provides a low overhead alternative to Xen.

Setting up a New Yum Repo

To get started we need to add the OpenVZ software repository. Type the following commands.

> cd /etc/yum.repos.d
> wget http://download.openvz.org/openvz.repo

Edit openvz.repo and enable the developement kernel.

Installing OpenVZ

1. First lets install the kernel. Type the following.
> yum --disablerepo=core --disablerepo=updates install kernel-smp

2. Replace /etc/sysctl.conf with the following.

 
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 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

3. Reboot the server. Be sure to boot the OpenVZ kernel.

4. Lets install some needed tools.
> yum install vzctl vzquota

5. Finally lets start OpenVz.
> /sbin/service vz start

Setting up the Fedora Core 5 OS Template

1. First we need to install some tools.
> yum install vzpkg vzyum vzrpm43-python vzrpm44-python

2. Now install the template metadata.
> yum install vztmpl-fedora-core-5

3. Install the repository cache.
> vzpkgcache fedora-core-5-default

Conclusion

That's the complete setup. Now you can create your Virtual servers. Your best bet is to use the tools we've installed.

Links

OpenVZ - http://www.openvz.org

Comments

Retrieved from http://www.campworld.net/thewiki/pmwiki.php/LinuxServersFC5/FC5OpenVZServer
Page last modified on May 30, 2007, at 06:36 PM