Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->发行版专区 ->CentOS ->正文

在CentOS 4.4上安装配置OpenVZ

来源:howtoforge 作者:ganesh35  时间:2007-04-22 点击: [收藏] [投稿]

In this HowTo I will describe how to prepare a CentOS 4.4 server for OpenVZ virtual machines. With OpenVZ you can create multiple Virtual Private Servers (VPS) on the same hardware, similar to Xen and the Linux Vserver project. OpenVZ is the open-source branch of Virtuozzo, a commercial virtualization solution used by many providers that offer virtual servers.

0. Minimum Requirements
    - Hardware
    - Software
    - Other

1. Installing and Configuring Host Operating System on Hardware Node
Step #1 – Install the Base System
Step #2 – Disk Partitioning
Step #3 – Configuring Grub, Network and Security
Step #4 – Other Settings
Step #5 – Package Selection and Finalizing the system
Step #6 - Post Installation

2. Installing and Configuring OpenVZ Kernel
Step #7 - Downloading and Installing OpenVZ Kernel
Step #8 - Configuring the bootloader
Step #9 - Configuring sysctl
Step #10 - Configuring SELinux
Step #11 - Conntracks
Step #12 - Rebooting into OpenVZ kernel
Step #13 - Installing the utilities
Step #14 - Starting OpenVZ

3. OS template cache preparation
Step #15 - Installing template utilities
Step #16 - Installing OS template metadata
Step #17 - Installing repository cache (optional)

4. VE Creation and other oprations with VEs
Step #19 – Creating VE
Step #20 – Adding IP(s) to VE
Step #21 – Starting VE
Step #22 – Running ps command from Hardware Node
Step #23 - Entering VE
Step #24 - Exiting from VE
Step #25 - Stopping VE
Step #26 - Destroying VE

0. Minimum Requirements

- Hardware
    Pentium based cpu, 256 MB RAM, 6
- Software
    Any Linux distribution ( Preferred CentOS )
- Other
    NIC and Internet Connection

1. Installing and Configuring Host Operating System on Hardware Node

This section explains how to install Fedora Core 4 on the Hardware Node and how to configure it for OpenVZ. If you are using another distribution, please consult the corresponding installation guides about the installation specifics.

Info: Download the 4 CentOS 4.4 CD iso images from a mirror near you (the list of mirrors can be found here: http://www.centos.org/modules/tinycontent/index.php?id=13).

Step #1 – Install the Base System

Boot from your CentOS 4.4 CD (CD 1). / DVD

It can take a long time to test the installation media so we skip this test here:

The welcome screen of the CentOS installer appears. Click on Next:

Choose your language next:

Select your keyboard layout:

We want to install a server so we choose Server here:

Step #2 – Disk Partitioning

On the Disk Partitioning Setup screen, select Manual partition with Disk Druid. Do not choose automatic partitioning since this type of partitioning will create a disk layout intended for systems running multiple services. In case of OpenVZ, all your services shall run inside Virtual Private Servers.

I'm installing CentOS 4.3 on a fresh system, so I answer Yes to the question Would you like to initialize this drive, erasing ALL DATA?

Select Remove all partitions on this system.

We want to remove all Linux partitions, so we answer Yes to the following question:

Create the following partitions on the Hardware Node:

For example: 



 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:使用Bastille完美加固CentOS Linux系统   下一篇:入侵监测系统的构建(chkrootkit )

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Partition FS Type  Typical size Description