找回密码
 注册
搜索
热搜: 回贴
微赢网络技术论坛 门户 服务器 Linux/BSD 查看内容

OpenVZ HyperVM安装

2009-12-20 13:44| 发布者: admin| 查看: 71| 评论: 0|原作者: 小可爱

今天把简单的OPENVZ和HYPERVM的安装过程写一个,留下做个记号!
系统:CentOS 5.1 for vmware6.0
系统安装就不说了,选最简单的安装就行,还有把防火墙,SELinux关闭就了!
[root@localhost ~]# uname -r
2.6.18-53.el5
[root@localhost ~]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-53.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-53.el5.img
安装openvz
cd /etc/yum.repos.d
wget
http://download.openvz.org/openvz.repo
rpm --import
http://download.openvz.org/RPM-GPG-Key-OpenVZ

yum install ovzkernel

[root@bogon ~]# uname -r
2.6.18-92.1.13.el5.028stab059.6
安装完之后,会修改启动项,会把vz内核放到第一项去
[root@bogon ~]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS OpenVZ (2.6.18-92.1.13.el5.028stab059.6)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.13.el5.028stab059.6 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.1.13.el5.028stab059.6.img
title CentOS (2.6.18-53.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-53.el5.img
安装vz工具
yum install vzctl vzquota

修改sysctl.conf
vi /etc/sysctl.conf
..........
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
..........

sysctl -p (使sysctl.conf生效)

修改/etc/vz/vz.conf
vi /etc/sysconfig/selinux
........
SELINUX=disabled
........

好了,OPENVZ就这安装好了,接下来安装hypervm
wget
http://download.lxlabs.com/download/hypervm/production/hypervm-install-master.sh
chmod 777 hypervm-install-master.sh
./hypervm-install-master.sh --virtualization-type=openvz
好了,,等他安装完再重启就OK了

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blogimg.chinaunix.net/blog/upfile2/081217105542.jpg');}" onmousewheel="return imgzoom(this);" alt="" />





最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 07:15 , Processed in 0.154827 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部