OpenVZ是我一直在使用的虚拟机软件,之前曾介绍过基于Web管理的Vtonf工具。Vtonf部署和管理都比较方便,适合单台服务器的环境。而今天我要介绍的工具,也是基于Web管理OpenVZ的,名称叫:HyperVM。它是一个支持多平台、Xen/OpenVZ虚拟、多服务器集群的管理平台环境,特别适合于对大规模的虚拟机进行统一管理。
一、准备工作
操作系统平台:centos 5.2
二、关闭selinux
打开setup界面–firewall configureation,将SELinux置为Disabled
或修改
vi /etc/sysconfig/selinux
为
SELINUX=disabled
SELINUXTYPE=targeted
运行 setenforce 0
三、防火墙
如果不想关闭Firewall,需要打开8001端口:
/sbin/iptables -I INPUT -p tcp –dport 8001 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
四、安装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
启动httpd服务
service httpd start
启动hypervm服务:
service hypervm start
或
/usr/local/lxlabs/hypervm/httpdocs
Starting hypervm: mysqld (pid 8554) 正在运行…
Started hypervm
访问HyperVM管理界面
https://<ip-address>:8887
或
http://<ip-address>:8888
(默认用户名和密码都是:admin)
下载更多的OS模板
Linux vps模版http://download.lxlabs.com/download/vpstemplate/
五、修改开机默认启动openvz内核
vi /etc/grub.conf 将default=1 改为 default=1
# grub.conf generated by anaconda
1.
2.Note that you do not have to rerun grub after making changes to this file
3.NOTICE: You have a /boot partition. This means that
4.all kernel and initrd paths are relative to /boot/, eg.
5.root (hd0,0)
6.kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
7.initrd /initrd-version.img
8.boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.18.el5.028stab060.2PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.18.el5.028stab060.2PAE ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-92.1.18.el5.028stab060.2PAE.img
title CentOS (2.6.18-92.1.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.1.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-92.1.1.el5.img
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-92.el5.img
reboot
重启以后
六、 破解HyperVM
(直接复制注意全角双引号)可以下载 display.txt display
我用以下内容覆盖原来的:/usr/local/lxlabs/hypervm/httpdocs/display.php
<?php
function crack( )
{
global $gbl;
global $sgbl;
global $login;
global $ghtml;
$license = $login->getObject( “license” );
$name = $license->licensecom_b->lic_ipaddress;
if ( stristr($name,”Bendy”)) {
return;
}
$license->licensecom_b->lic_ipaddress = “crack by www.dezend.cc Bendy “.stristr($name,”(“);
$license->licensecom_b->lic_domain_num = “Unlimited”;
$license->licensecom_b->lic_pserver_num = “Unlimited”;
$license->licensecom_b->lic_maindomain_num = “Unlimited”;
$license->licensecom_b->lic_vps_num = “Unlimited”;
$license->licensecom_b->maindomain_num = “Unlimited”;
$license->licensecom_b->domain_num = “Unlimited”;
$license->licensecom_b->vps_num = “Unlimited”;
$license->licensecom_b->pserver_num = “Unlimited”;
$license->licensecom_b->client_num = “Unlimited”;
$login->priv->maindomain_num = “Unlimited”;
$login->priv->pserver_num = “Unlimited”;
$login->priv->vps_num = “Unlimited”;
$license->setUpdateSubaction( );
$license->write( );
$login->setUpdateSubaction( );
$login->write( );
throw new lxException (“Crack OK! your have Unlimited domain/vps NUM and full fuction now!”, “”);
exit;
}
$v = 0;
include_once( “htmllib/coredisplaylib.php” );
sleep( $v );
print_time( “start” );
display_init( );
print_time( “start”, “Start” );
crack();
display_exec( );
?>