• Xen Cloud Platform 系列:xcp安装(一)


    我们好像在池塘的水底。从一个月亮走向另一个月亮。-王小波

    xcp即是xen的平台虚拟化解决方案,作为Critix XenServer的开源实现。它的安装过程还是挺简单的,犹如安装linux系统。

    xcp需要直接安装在裸机上,可以选择cd安装和pxe安装。

    安装版本:xcp 1.1.0

    安装方式:pxe安装

    安装机器:具有pxe启动网卡的服务器

    PXE环境服务器:CentOS 6.0

    XCP Base Pack CD  下载:http://xen.org/download/xcp/index_1.1.0.html

    参考文档:

    http://wiki.openstack.org/XenServer/Install/PXE

    http://xen.org/files/XenCloud/installation.pdf

    具体的安装过程如下:

    1.在另一台服务器上,部署pxe安装环境,涉及到DHCP服务,TFTP服务,HTTP服务,将这些服务安装上。

        dhcp服务给将pxe启动的机器提供ip地址,tftp服务使安装机器能够pxe启动,http存储安装系统的相关文件。

        安装tftp服务

    1 rpm -q syslinux //安装syslinux
    2 rpm -q tftp-server //确认tftp是否安装
    3 yum -y tftp-server //若没有,则安装
    4 
    5 编辑/etc/xinetd.d/tftp
    6 disable = no //将yes改为no
    7 
    8 service xinetd restart //重启服务,管理tftp

       安装dhcp服务

      

     1 yum -y dhcp // 安装dhcp服务
     2 开始配置dhcp服务,编辑文件/etc/dhcp/dhcpd.conf 
     3 allow bootp;
     4 
     5 use-host-decl-names true;
     6 option domain-name "Network 1";
     7 option domain-name-servers 192.168.0.1;
     8 subnet 192.168.0.0 netmask 255.255.255.0 {
     9         range 192.168.0.100 192.168.0.200;
    10         filename "pxelinux.0";
    11 }
    12 service dhcpd restart //启动服务

        安装http服务

    1 yum -y httpd
    2 
    3 service httpd restart

    2.pxe环境配好后,开始准备xcp安装

     1 mkdir xenserver  //在/tftpboot 创建文件夹
     2 
     3 cd /usr/lib/syslinux //进入这个目录
     4 
     5 将 mboot.c32 pxelinux.0 这两个文件拷贝到tftpboot目录
     6 
     7 将下载的xcp盘中的install.img, vmlinuz,xen.gz 拷贝到 /tftpboot/xenserver目录下
     8 
     9 在tftpoot目录,创建文件夹,pxelinux.cfg,在这个目录中,创建文件default
    10 在default文件中添加如下内容:
    11 default xenserver-auto
    12 label xenserver-auto
    13 kernel mboot.c32
    14 append /tftpboot/xenserver/xen.gz dom0_mem=752M com1=115200,8n1 \
    15 console=com1,tty --- /tftpboot/xenserver/vmlinuz \
    16 xencons=hvc console=hvc0 console=tty0 \
    17 answerfile=http://pxehost.example.com/answerfile \
    18 install --- /tftpboot/xenserver/install.img

     开始配置http访问的answerfile,answerfile文件放在/var/www/html目录下,在个文件在上面的default中提及

     1 <?xml version="1.0"?>
     2 <installation srtype="ext">
     3 <primary-disk>sda</primary-disk>
     4 <keymap>us</keymap>
     5 <root-password>在此处填安装后系统的密码</root-password>                      
     6 <source type="url">http://192.168.0.1/xenserver/</source>
     7 <ntp-server>IP address of my ntp server</ntp-server>       
     8 <admin-interface name="eth0" proto="dhcp" />
     9 <timezone>Asia/Shanghai</timezone>
    10 </installation>

    在这个目下创建xenserver,将安装盘中的如下文件拷到该目录下

    1 cp -r packages* /var/www/html/xenserver
    2 cp XS-REPOSITORY-LIST /var/www/html/xenserver

    3.重启安装xcp的服务器,开始pxe安装。

    4.安装结果如下:

    体验xcp的旅程就开始了。

  • 相关阅读:
    爬虫的基本原理
    爬虫的分类
    gcc编译
    C++字符串总结
    PE文件格式学习笔记
    学习SDR过程中的参考网页
    Linux下源码编译安装遇到的问题
    web | jsp考试复习要点整理
    爬虫 | php封装 | file_get_contents
    re | [NPUCTF2020]EzObfus-Chapter2
  • 原文地址:https://www.cnblogs.com/liuan/p/2563499.html
Copyright © 2020-2023  润新知