使用xCAT安装部署Linux以及Windows操作系统

xCAT (Extreme Cloud Administration Toolkit) 是一个开源的可扩展的高级集群管理和配置工具,允许使用者通过一个单点控制和管理一个集群系统。

xCAT 的工作流程:xCAT 是基于客户机 / 服务器架构的应用程序,客户端和服务器端的通信主要是由管理节点上运行的 xCAT daemon(xcatd)来控制的,可以说运行于管理节点上的 xCAT daemon(xcatd)就是整个 xCAT 软件正常工作的心脏。 当管理节点上的 xCAT daemon(xcatd)接收到计算节点发送过来的用 XML 封装的的命令时,它将通过 ACL(Access Control Lists)来判定发送者是否有权限执行这些命令。此外,xCAT daemon(xcatd)在安装配置计算节点和各个节点重新启动的时候还会收集各个节点发来的状态和资源信息。

一. xCAT的安装部署

1.  禁用selinux

[root@xcat-server xcat]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

2.  安装xCAT

xCAT的下载地址:http://sourceforge.net/projects/xcat/files/

下载并解压:

[root@xcat-server xcat]# pwd
/home/xcat
[root@xcat-server xcat]# ls
xcat-core  xcat-core-2.8.5.tar.bz2  xcat-dep  xcat-dep-201409250202.tar.bz2

添加yum源:

需要3个yum源,一个是操作系统的yum源,我这里用的是Redhat6.5的标准iso,另外两个yum源通过运行xcat的脚本自动生成。

Redhat6.5yum源:

[root@xcat-server xcat]# cat /etc/yum.repos.d/cdrom.repo
[cdrom-source]
name=cdrom
baseurl=http://10.7.0.20/os/rhel/x86_64/6.5/
enabled=1
gpgcheck=0
xCAT-core.repo和xCAT-dep.repo:

[root@xcat-server xcat]# /home/xcat/xcat-core/mklocalrepo.sh
[root@xcat-server xcat]# /home/xcat/xcat-dep/rh6/x86_64/mklocalrepo.sh


[root@xcat-server xcat]# cat /etc/yum.repos.d/xCAT-core.repo
[xcat-2-core]
name=xCAT 2 Core packages
baseurl=file:///home/xcat/xcat-core
enabled=1
gpgcheck=1
gpgkey=file:///home/xcat/xcat-core/repodata/repomd.xml.key
[root@xcat-server xcat]# cat /etc/yum.repos.d/xCAT-dep.repo
[xcat-dep]
name=xCAT 2 depedencies
baseurl=file:///home/xcat/xcat-dep/rh6/x86_64
enabled=1
gpgcheck=1
gpgkey=file:///home/xcat/xcat-dep/rh6/x86_64/repodata/repomd.xml.key


安装xCAT并检查是否安装正确:

[root@xcat-server xcat]# yum install xCAT
[root@xcat-server xcat]# tabdump site
#key,value,comments,disable
"blademaxp","64",,
"fsptimeout","0",,
"installdir","/install",,
"ipmimaxp","64",,
"ipmiretries","3",,
"ipmitimeout","2",,
"consoleondemand","no",,
"master","10.11.0.10",,  #xCAT master的IP地址
"forwarders","10.11.0.14",,
"nameservers","10.11.0.10",,
"maxssh","8",,
"ppcmaxp","64",,
"ppcretry","3",,
"ppctimeout","0",,
"powerinterval","0",,
"syspowerinterval","0",,
"sharedtftp","1",,
"SNsyncfiledir","/var/xcat/syncfiles",,
"nodesyncfiledir","/var/xcat/node/syncfiles",,
"tftpdir","/tftpboot",,
"xcatdport","3001",,
"xcatiport","3002",,
"xcatconfdir","/etc/xcat",,
"timezone","Asia/Shanghai",,
"useNmapfromMN","no",,
"enableASMI","no",,
"db2installloc","/mntdb2",,
"databaseloc","/var/lib",,
"sshbetweennodes","ALLGROUPS",,
"dnshandler","ddns",,
"vsftp","n",,
"cleanupxcatpost","no",,
"dhcplease","43200",,
"domain","",,
"ntpservers","10.11.0.10",,
"dhcpinterfaces","eth0,eth1,eth2,eth3,eth4",,


3.  配置xCAT的相关服务

ntp服务:

[root@xcat-server xcat]# cat /etc/ntp.conf
driftfile /var/lib/ntp/drift
disable auth
server  10.11.0.10
fudge   10.11.0.10 stratum 10

将NTP server记录在site表里:

[root@xcat-server ~]# chtab key=ntpservers site.value=10.1.1.11

DNS服务:

卸载与xCAT冲突的软件包:

[root@xcat-server ~]# rpm -qa | grep bind-chroot
[root@xcat-server ~]# rpm -e bind-chroot


设置域名:

[root@xcat-server ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=xcat-server
DOMAINNAME=domain.com
使开机启动偶自动设置域名:

[root@xcat-server ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/bin/domainname domain.com

在site表中添加DNS服务器:

[root@xcat-server ~]# chtab key=domain site.value=domain.com

配置DNS解析之前,需要将所有要添加的节点的ip与对应的host name写入/etc/hosts中:

[root@xcat-server ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.11.0.10 xcat-server xcat-server.domain.com
10.14.0.10 xcat-server xcat-server.domain.com
10.1.0.10 xcat-server xcat-server.domain.com
10.1.0.70 10-1-0-70

再执行DNS生成命令:

[root@xcat-server ~]# makedns -n


配置/etc/resolv.conf:

[root@xcat-server ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search domain.com
nameserver 10.1.0.10


配置DHCP服务:

添加dhcp的网卡端口&

  • 1
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值