xCAT安装配置文档
一、系统安装规划( 实验环境:Vmware Workstation )
Master
内网:10.1.1.11 eth0 custom
外网:222.31.64.11 eth1 桥接
Node01
10.1.1.12
注意:它们的网络连接应该采用custom:Specific virtual network ; 还有一定要注意计算节点的mac地址是否正确
Node02
10.1.1.13
一、禁用selinux
[root@localhost ~]# vi /etc/sysconfig/selinux
# 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 - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
二、安装xcat
1. 创建目录并上传文件
[root@localhost ~]# mkdir -p /root/xcat2
[root@localhost ~]# cd /root/xcat2/
[root@localhost xcat2]# ll
total 120800
-rw-r--r--. 1 root root 3496088 Apr 23 05:46 xcat-core-2.7.3.tar.bz2
-rw-r--r--. 1 root root 120193975 Apr 23 05:46 xcat-dep-201206121608.tar.bz2
[root@localhost xcat2]#
2. 解压缩文件
[root@localhost xcat2]# tar -jvxf xcat-core-2.7.3.tar.bz2
[root@localhost xcat2]# tar -jxvf xcat-dep-201206121608.tar.bz2
[root@localhost xcat2]# ll
total 120808
drwxrwxr-x. 3 root 1001 4096 Jun 18 2012 xcat-core
-rw-r--r--. 1 root root 3496088 Apr 23 05:46 xcat-core-2.7.3.tar.bz2
drwxrwsrwx. 15 root root 4096 Jun 12 2012 xcat-dep
-rw-r--r--. 1 root root 120193975 Apr 23 05:46 xcat-dep-201206121608.tar.bz2
[root@localhost xcat2]#
3. 创建yum源
[root@master cdrom]# mkdir -p /mnt/cdrom
[root@master cdrom]# mkdir -p /mnt/iso
[root@master cdrom]# mv /root/redhat6u2.iso /mnt/iso/
[root@master cdrom]# mount -o loop /mnt/iso/redhat6u2.iso /mnt/cdrom/
[root@master cdrom]# cd /etc/yum.repos.d/
[root@master cdrom]# mkdir bak
[root@master cdrom]# mv rhel-source.repo bak/
[root@master cdrom]# touch myself.repo
[root@master cdrom]# vi myself.repo
[houqd]
name=RedHat
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
[root@master cdrom]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Cleaning repos: houqd
Cleaning up Everything
[root@master cdrom]# yum makecache
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
houqd | 4.0 kB 00:00 ...
houqd/filelists_db | 3.6 MB 00:00 ...
houqd/primary_db | 3.1 MB 00:00 ...
houqd/other_db | 1.5 MB 00:00 ...
houqd/group_gz | 195 kB 00:00 ...
Metadata Cache Created
[root@master cdrom]#
4. 生成xcat的repo文件,并安装
[root@master xcat2]#
[root@master xcat2]# cd xcat-core
[root@master xcat-core]# ll
total 3728
-rwxrwxr-x. 1 root 1001 222 Jun 22 2012 mklocalrepo.sh
-rw-rw-r--. 1 root 1001 566780 Jun 18 2012 perl-xCAT-2.7.3-snap201206180512.noarch.rpm
drwxrwxr-x. 2 root 1001 4096 Jun 18 2012 repodata
-rw-rw-r--. 1 root 1001 255963 Jun 18 2012 xCAT-2.7.3-snap201206180516.i386.rpm
-rw-rw-r--. 1 root 1001 255848 Jun 18 2012 xCAT-2.7.3-snap201206180516.ppc64.rpm
-rw-rw-r--. 1 root 1001 255744 Jun 18 2012 xCAT-2.7.3-snap201206180516.s390x.rpm
-rw-rw-r--. 1 root 1001 255944 Jun 18 2012 xCAT-2.7.3-snap201206180516.x86_64.rpm
-rw-rw-r--. 1 root 1001 456805 Jun 18 2012 xCAT-client-2.7.3-snap201206180512.noarch.rpm
-rw-rw-r--. 1 root 1001 224 Jun 22 2012 xCAT-core.repo
-rw-rw-r--. 1 root 1001 50261 Jun 18 2012 xCAT-IBMhpc-2.7.3-snap201206180513.noarch.rpm
-rw-rw-r--. 1 root 1001 20051 Jun 18 2012 xCAT-nbroot-core-ppc64-2.7.3-snap201206180516.noarch.rpm
-rw-rw-r--. 1 root 1001 19913 Jun 18 2012 xCAT-nbroot-core-x86-2.7.3-snap201206180516.noarch.rpm
-rw-rw-r--. 1 root 1001 20075 Jun 18 2012 xCAT-nbroot-core-x86_64-2.7.3-snap201206180516.noarch.rpm
-rw-rw-r--. 1 root 1001 71040 Jun 18 2012 xCAT-rmc-2.7.3-snap201206180513.noarch.rpm
-rw-rw-r--. 1 root 1001 1265491 Jun 18 2012 xCAT-server-2.7.3-snap201206180512.noarch.rpm
-rw-rw-r--. 1 root 1001 11180 Jun 18 2012 xCATsn-2.7.3-snap201206180516.i386.rpm
-rw-rw-r--. 1 root 1001 10852 Jun 18 2012 xCATsn-2.7.3-snap201206180516.ppc64.rpm
-rw-rw-r--. 1 root 1001 10740 Jun 18 2012 xCATsn-2.7.3-snap201206180516.s390x.rpm
-rw-rw-r--. 1 root 1001 11147 Jun 18 2012 xCATsn-2.7.3-snap201206180516.x86_64.rpm
-rw-rw-r--. 1 root 1001 57360 Jun 18 2012 xCAT-test-2.7.3-snap201206180516.noarch.rpm
-rw-rw-r--. 1 root 1001 179699 Jun 18 2012 xCAT-UI-2.7.3-snap201206180513.noarch.rpm
[root@master xcat-core]# ./mklocalrepo.sh
/root/xcat2/xcat-core
[root@master xcat-core]# cd ../xcat-dep/rh6/x86_64/
[root@master x86_64]# ./mklocalrepo.sh
/root/xcat2/xcat-dep/rh6/x86_64
[root@master x86_64]#
# 检查:此时会生成xcat的两个repo文件
[root@master x86_64]# cd /etc/yum.repos.d/
[root@master yum.repos.d]# ll
total 20
drwxr-xr-x 2 root root 4096 Apr 23 06:36 bak
-rw-r--r-- 1 root root 119 Apr 23 06:37 myself.repo
-rw-r--r-- 1 root root 78 Apr 23 06:37 redhat.repo
-rw-r--r-- 1 root root 158 Apr 23 06:43 xCAT-core.repo
-rw-r--r-- 1 root root 173 Apr 23 06:44 xCAT-dep.repo
[root@master yum.repos.d]#
[root@master yum.repos.d]# yum install xCAT
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
xcat-2-core | 951 B 00:00 ...
xcat-2-core/primary | 7.3 kB 00:00 ...
xcat-2-core 18/18
xcat-dep | 951 B 00:00 ...
xcat-dep/primary | 15 kB 00:00 ...
xcat-dep 33/33
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xCAT.x86_64 0:2.7.3-snap201206180516 will be installed
--> Processing Dependency: ipmitool-xcat >= 1.8.9 for package: xCAT-2.7.3-snap201206180516.x86_64
--> Processing Dependency: xCAT-server for package: xCAT-2.7.3-snap201206180516.x86_64
--> Processing Dependency: perl(xCAT::MsgUtils) for package: xCAT-2.7.3-snap201206180516.x86_64
--> Processing Dependency: xCAT-client for package: xCAT-2.7.3-snap201206180516.x86_64
--> Processing Dependency: xCAT-genesis-x86_64 for package: xCAT-2.7.3-snap201206180516.x86_64
--> Processing Dependency: /bin/ksh for package: xCAT-2.7.3-snap201206180516.x86_64
--> Processing Dependency: perl-Net-Telnet for package: xCAT-2.7.3-snap201206180516.x86_64
--> Processing Dependency: perl(xCAT::Utils) for package: xCAT-2.7.3-snap201206180516.x86_64
tcl.x86_64 1:8.5.7-6.el6
tftp-server.x86_64 0:0.49-7.el6
vsftpd.x86_64 0:2.2.2-6.el6_0.1
xCAT-client.noarch 4:2.7.3-snap201206180512
xCAT-genesis-x86_64.noarch 1:2.7.3-snap201206111431
xCAT-server.noarch 4:2.7.3-snap201206180512
xinetd.x86_64 2:2.3.14-33.el6
xnba-undi.noarch 0:1.0.3-7
yaboot-xcat.noarch 0:1.3.17-rc1
Complete!
[root@master yum.repos.d]#
5. 检查xCAT是否安装正确
[root@master xcat2]# source /etc/profile.d/xcat.sh
[root@master xcat2]# tabdump site
#key,value,comments,disable
"blademaxp","64",,
"fsptimeout","0",,
"installdir","/install",,
"ipmimaxp","64",,
"ipmiretries","3",,
"ipmitimeout","2",,
"consoleondemand","no",,
"master","10.1.1.11",, # 应该为master的ip
"nameservers","10.1.1.11",, # 应该为master的ip
"maxssh","8",,
"ppcmaxp","64",,
"ppcretry","3",,
"ppctimeout","0",,
"powerinterval","0",,
"syspowerinterval","0",,
"sharedtftp","1",,
"SNsyncfiledir","/var/xcat/syncfiles",,
"tftpdir","/tftpboot",,
"xcatdport","3001",,
"xcatiport","3002",,
"xcatconfdir","/etc/xcat",,
"timezone","America/Los_Angeles",,
"useNmapfromMN","no",,
"enableASMI","no",,
"db2installloc","/mntdb2",,
"databaseloc","/var/lib",,
"sshbetweennodes","ALLGROUPS",,
"dnshandler","ddns",,
"vsftp","n",,
"cleanupxcatpost","no",,
"dhcplease","43200",,
[root@master xcat2]#
6. 配置xcat的相关服务(集群服务包括:network服务、NTP服务、DNS服务、集群管理服务)
# 配置networks表
[root@master ~]# tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,nodehostname,ddnsdomain,vlanid,domain,comments,disable
"10_1_1_0-255_255_255_0","10.1.1.0","255.255.255.0","eth0","10.1.1.11","10.1.1.11","10.1.1.11",,"10.1.1.11","10.1.1.11",,,,,,,
# 注:直接用tabedit networks修改
# 配置NTP(网络时间同步)
[root@master ~]#
[root@master ~]# mv /etc/ntp.conf /etc/ntp.conf.bak
[root@master ~]# vi /etc/ntp.conf
server 10.1.1.11 # Local clock
fudge 10.1.1.11 stratum 10
driftfile /var/lib/ntp/drift
[root@master ~]# chkconfig --level 345 ntpd on
[root@master ~]# chkconfig --list | grep ntpd
ntpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
ntpdate 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@master ~]# service ntpd restart
Shutting down ntpd: [FAILED]
Starting ntpd: [ OK ]
我们需要将ntp服务器记录到site表里:
[root@master ~]# chtab key=ntpservers site.value=10.1.1.11
[root@master ~]# tabdump site
#key,value,comments,disable
"blademaxp","64",,
"fsptimeout","0",,
"installdir","/install",,
"ipmimaxp","64",,
"ipmiretries","3",,
"ipmitimeout","2",,
"consoleondemand","no",,
"master","10.1.1.11",,
"nameservers","10.1.1.11",,
"maxssh","8",,
"ppcmaxp","64",,
"ppcretry","3",,
"ppctimeout","0",,
"powerinterval","0",,
"syspowerinterval","0",,
"sharedtftp","1",,
"SNsyncfiledir","/var/xcat/syncfiles",,
"tftpdir","/tftpboot",,
"xcatdport","3001",,
"xcatiport","3002",,
"xcatconfdir","/etc/xcat",,
"timezone","America/Los_Angeles",,
"useNmapfromMN","no",,
"enableASMI","no",,
"db2installloc","/mntdb2",,
"databaseloc","/var/lib",,
"sshbetweennodes","ALLGROUPS",,
"dnshandler","ddns",,
"vsftp","n",,
"cleanupxcatpost","no",,
"dhcplease","43200",,
"ntpservers","10.1.1.11",, # 此时查看会多出一行来
如果希望xcat安装的节点也自动设置好NTP服务,需要在postscripts表中加入setupntp的脚本:
[root@master ~]# tabdump postscripts
#node,postscripts,postbootscripts,comments,disable
"xcatdefaults","syslog,remoteshell,syncfiles","otherpkgs",,
"service","servicenode",,,
[root@master ~]# chtab node=xcatdefaults postscripts.postscripts=syslog,remoteshell,setupntp
[root@master ~]# tabdump postscripts
#node,postscripts,postbootscripts,comments,disable
"xcatdefaults","syslog,remoteshell,setupntp","otherpkgs",,
"service","servicenode",,,
[root@master ~]#
# 设置DNS
如果系统中安装了bind-chroot的软件包,会与想xCAT冲突,所以如果安装了bind-chroot需要把它卸载掉:
[root@master ~]# rpm -qa | grep bind-chroot
[root@master ~]#
[root@master ~]# rpm -e bind-chroot
在site表中定义DNS服务器Ip地址为10.1.1.11,域名为cluster.com
设置域名:
[root@master install]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master
DOMAINNAME=cluster.com
[root@master install]# vi /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 cluster.com
[root@master ~]# chtab key=domain site.value=cluster.com
配置DNS解析,编辑/etc/hosts,把集群中所有节点都加进去:
[root@master ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.1.1.11 master
10.1.1.12 node01
10.1.1.13 node02
执行DNS配置生成命令:
[root@master ~]# makedns -n
Handling localhost in /etc/hosts.
Handling localhost in /etc/hosts.
Handling master in /etc/hosts.
Handling node01 in /etc/hosts.
Handling node02 in /etc/hosts.
Getting reverse zones, this may take several minutes in scaling cluster.
Completed getting reverse zones.
Updating zones.
Completed updating zones.
Starting named complete
Restarting named
Restarting named complete
Updating DNS records, this may take several minutes in scaling cluster.
Completed updating DNS records.
named has been enabled on boot.
DNS setup is completed
配置/etc/resolv.conf,把nameserver指向管理服务器自己
[root@master ~]# vi /etc/resolv.conf
search cluster.com
nameserver 10.1.1.11
启动DNS服务,并设置开机自启动
[root@master ~]# service named restart
Stopping named: . [ OK ]
Starting named: [ OK ]
[root@master ~]# chkconfig --level 345 named on
[root@master ~]# chkconfig --list | grep named
named 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@master ~]#
运行nslookup node01来检查能否正常解析:
[root@master ~]# nslookup node01
Server: 10.1.1.11
Address: 10.1.1.11#53
Name: node01.cluster.com
Address: 10.1.1.12
[root@master ~]#
# 定义计算节点
[root@master ~]# tabdump nodelist
#node,groups,status,statustime,appstatus,appstatustime,primarysn,hidden,comments,disable
[root@master ~]# chtab node=node01 nodelist.groups=compute,all
[root@master ~]# chtab node=node02 nodelist.groups=compute,all
[root@master ~]# tabdump nodelist
#node,groups,status,statustime,appstatus,appstatustime,primarysn,hidden,comments,disable
"node01","compute,all",,,,,,,,
"node02","compute,all",,,,,,,,
[root@master ~]#
# 添加MAC表
[root@master ~]# tabdump max
Error: No such table: max
[root@master ~]# tabdump mac
#node,interface,mac,comments,disable
[root@master ~]# nodeadd node01 groups=compute,all mac.interface=eth0 hosts.ip=10.1.1.12 mac.mac=00:50:56:36:B5:30 nodehm.mgt=ipmi nodehm.power=ipmi
[root@master ~]# nodeadd node02 groups=compute,all mac.interface=eth0 hosts.ip=10.1.1.13 mac.mac=00:50:56:21:D3:BB nodehm.mgt=ipmi nodehm.power=ipmi
[root@master ~]# tabdump mac
#node,interface,mac,comments,disable
"node01","eth0","00:50:56:36:B5:30",,
"node02","eth0","00:50:56:21:D3:BB",,
[root@master ~]# tabdump hosts
#node,ip,hostnames,otherinterfaces,comments,disable
"node01","10.1.1.12",,,,
"node02","10.1.1.13",,,,
[root@master ~]#
[root@master ~]# makehosts
[root@master ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.1.1.11 master
10.1.1.12 node01 node01.cluster.com # 多加了这个
10.1.1.13 node02 node02.cluster.com
[root@master ~]# makehosts -n
[root@master ~]# vi /etc/hosts
127.0.0.1 localhost
10.1.1.12 node01 node01.cluster.com
10.1.1.13 node02 node02.cluster.com
[root@master ~]# makedhcp -n
Renamed existing dhcp configuration file to /etc/dhcp/dhcpd.conf.xcatbak
The dhcp server must be restarted for OMAPI function to work
Warning: No dynamic range specified for 222.31.64.0. If hardware discovery is being used, a dynamic range is required.
Warning: No dynamic range specified for 10.1.1.0. If hardware discovery is being used, a dynamic range is required.
[root@master ~]# chkconfig --level 345 dhcpd on
# 设置noders表,在noders表中,定义计算节点node01的引导方式是pxe,管理节点是10.1.1.11,安装使用的网卡是eth0,系统的主网卡也是eth0,nfs服务器是10.1.1.11:
[root@master ~]# tabdump noderes
#node,servicenode,netboot,tftpserver,tftpdir,nfsserver,monserver,nfsdir,installnic,primarynic,discoverynics,cmdinterface,xcatmaster,current_osimage,next_osimage,nimserver,routenames,comments,disable
[root@master ~]# chtab node=node01 noderes.netboot=pxe noderes.xcatmaster=10.1.1.11 noderes.installnic=eth0 noderes.primarynic=eth0 noderes.nfsserver=10.1.1.11
[root@master ~]# chtab node=node02 noderes.netboot=pxe noderes.xcatmaster=10.1.1.11 noderes.installnic=eth0 noderes.primarynic=eth0 noderes.nfsserver=10.1.1.11
[root@master ~]# tabdump noderes
#node,servicenode,netboot,tftpserver,tftpdir,nfsserver,monserver,nfsdir,installnic,primarynic,discoverynics,cmdinterface,xcatmaster,current_osimage,next_osimage,nimserver,routenames,comments,disable
"node01",,"pxe",,,"10.1.1.11",,,"eth0","eth0",,,"10.1.1.11",,,,,,
"node02",,"pxe",,,"10.1.1.11",,,"eth0","eth0",,,"10.1.1.11",,,,,,
[root@master ~]#
# 设置nodetype表,定义计算节点node01的操作系统是rhels6u2,架构是x86_64,使用的profile是computer
[root@master ~]# tabdump nodetype
#node,os,arch,profile,provmethod,supportedarchs,nodetype,comments,disable
[root@master ~]# chtab node=node01 nodetype.os=rhels6u2 nodetype.arch=x86_64 nodetype.profile=compute nodetype.nodetype=osi
[root@master ~]# chtab node=node02 nodetype.os=rhels6u2 nodetype.arch=x86_64 nodetype.profile=compute nodetype.nodetype=osi
# 注:这里是导致后面改名的主要原因。 /intall/rhels6u2/x86_64 这里的名字必须和os的名字相同才行
[root@master ~]# tabdump nodetype
#node,os,arch,profile,provmethod,supportedarchs,nodetype,comments,disable
"node01","rhels6u2","x86_64","compute",,,"osi",,
"node02","rhels6u2","x86_64","compute",,,"osi",,
[root@master ~]#
# 定义postscripts表
[root@master ~]# chtab node=xcatdefaults postscripts.postscripts="syslog,remoteshell,syncfiles,setupntp"
[root@master ~]# chtab node=compute postscripts.postscripts="hardeths,configRSH,configService,configNFS"
[root@master ~]# tabdump postscripts
#node,postscripts,postbootscripts,comments,disable
"xcatdefaults","syslog,remoteshell,syncfiles,setupntp","otherpkgs",,
"service","servicenode",,,
"compute","hardeths,configRSH,configService,configNFS",,,
[root@master ~]# chtab node=compute postscripts.postscripts="setupGang,reboot"
[root@master ~]# tabdump postscripts
#node,postscripts,postbootscripts,comments,disable
"xcatdefaults","syslog,remoteshell,syncfiles,setupntp","otherpkgs",,
"service","servicenode",,,
"compute","setupGang,reboot",,,
#配置passwd表
[root@master ~]# chtab key=system passwd.username=root passwd.password=dell_456
[root@master ~]# chtab key=blade passwd.username=USERID passwd.password=PASSWORD
[root@master ~]# chtab key=ipmi passwd.username=USERID passwd.password=PASSWORD
# 注:我觉着可以不用,因为在虚拟机下没有管理模块,blade(刀片)、ipmi(智能平台管理接口),如果是IBM的机架和刀片服务器就可以用了
[root@master ~]# tabdump passwd
#key,username,password,cryptmethod,comments,disable
"omapi","xcat_key","VDR5OVpVaGdQcGhwbGd0Qko3eklDTGprb015eVRWNGI=",,,
"system","root","dell_456",,,
"blade","USERID","PASSWORD",,,
"ipmi","USERID","PASSWORD",,,
[root@master ~]#
# 配置DHCP
[root@master ~]#
[root@master ~]# chtab key=dhcpinterfaces site.value='10.1.1.11|eth0'
[root@master ~]# makedhcp compute
[root@master ~]# service dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]
# 复制安装文件
[root@master ~]# copycds *.iso # 中间会有拷贝进度条
Copying media to /install/rhels6.2/x86_64/ 其实不是完全将iso中的东西拷贝到该目录下,中间还是改变了一些东西,文件大小有变化。
我查看的方式:
[root@master cdrom]# ll >> /root/stdiso.txt
[root@master ~]# ll /install/rhels6u2/x86_64/ >> /root/copyiso.txt
[root@master ~]# diff -u copyiso.txt stdiso.txt
--- copyiso.txt 2013-04-23 20:06:46.280651399 -0700
+++ stdiso.txt 2013-04-23 20:06:09.969645630 -0700
@@ -1,41 +1,41 @@
-total 3560
-dr-xr-xr-x 3 root root 4096 Apr 23 08:24 EFI
--r--r--r-- 1 root root 8794 Sep 2 2010 EULA
--r--r--r-- 1 root root 18092 Jun 29 2010 GPL
-dr-xr-xr-x 3 root root 4096 Apr 23 08:24 HighAvailability
-dr-xr-xr-x 3 root root 4096 Apr 23 08:52 images
-dr-xr-xr-x 2 root root 4096 Apr 23 08:53 isolinux
-dr-xr-xr-x 3 root root 4096 Apr 23 08:24 LoadBalancer
--r--r--r-- 1 root root 114 Nov 17 2011 media.repo
-dr-xr-xr-x 2 root root 241664 Apr 23 08:51 Packages
--r--r--r-- 1 root root 16435 Sep 2 2010 README
--r--r--r-- 1 root root 172833 Nov 15 2011 RELEASE-NOTES-as-IN.html
--r--r--r-- 1 root root 178359 Nov 15 2011 RELEASE-NOTES-bn-IN.html
--r--r--r-- 1 root root 109593 Nov 15 2011 RELEASE-NOTES-de-DE.html
--r--r--r-- 1 root root 101919 Nov 15 2011 RELEASE-NOTES-en-US.html
--r--r--r-- 1 root root 109920 Nov 15 2011 RELEASE-NOTES-es-ES.html
--r--r--r-- 1 root root 114396 Nov 15 2011 RELEASE-NOTES-fr-FR.html
--r--r--r-- 1 root root 166662 Nov 15 2011 RELEASE-NOTES-gu-IN.html
--r--r--r-- 1 root root 168104 Nov 15 2011 RELEASE-NOTES-hi-IN.html
--r--r--r-- 1 root root 108343 Nov 15 2011 RELEASE-NOTES-it-IT.html
--r--r--r-- 1 root root 123332 Nov 15 2011 RELEASE-NOTES-ja-JP.html
--r--r--r-- 1 root root 189916 Nov 15 2011 RELEASE-NOTES-kn-IN.html
--r--r--r-- 1 root root 111469 Nov 15 2011 RELEASE-NOTES-ko-KR.html
--r--r--r-- 1 root root 200245 Nov 15 2011 RELEASE-NOTES-ml-IN.html
--r--r--r-- 1 root root 172372 Nov 15 2011 RELEASE-NOTES-mr-IN.html
--r--r--r-- 1 root root 168580 Nov 14 2011 RELEASE-NOTES-or-IN.html
--r--r--r-- 1 root root 152138 Nov 15 2011 RELEASE-NOTES-pa-IN.html
--r--r--r-- 1 root root 108164 Nov 15 2011 RELEASE-NOTES-pt-BR.html
--r--r--r-- 1 root root 112882 Nov 15 2011 RELEASE-NOTES-ru-RU.html
--r--r--r-- 1 root root 5125 May 4 2010 RELEASE-NOTES-si-LK.html
--r--r--r-- 1 root root 84168 Apr 20 2011 RELEASE-NOTES-ta-IN.html
--r--r--r-- 1 root root 180112 Nov 15 2011 RELEASE-NOTES-te-IN.html
--r--r--r-- 1 root root 203953 Nov 15 2011 RELEASE-NOTES-zh-CN.html
--r--r--r-- 1 root root 197545 Nov 15 2011 RELEASE-NOTES-zh-TW.html
-dr-xr-xr-x 2 root root 4096 Apr 23 08:53 repodata
-dr-xr-xr-x 3 root root 4096 Apr 23 08:51 ResilientStorage
--r--r--r-- 1 root root 3375 Nov 8 2011 RPM-GPG-KEY-redhat-beta
--r--r--r-- 1 root root 3211 Nov 8 2011 RPM-GPG-KEY-redhat-release
-dr-xr-xr-x 3 root root 4096 Apr 23 08:51 ScalableFileSystem
-dr-xr-xr-x 3 root root 4096 Apr 23 08:51 Server
+total 3885
+dr-xr-xr-x 3 root root 2048 Nov 17 2011 EFI
+-r--r--r-- 3 root root 8794 Sep 2 2010 EULA
+-r--r--r-- 3 root root 18092 Jun 29 2010 GPL
+dr-xr-xr-x 3 root root 2048 Nov 17 2011 HighAvailability
+dr-xr-xr-x 3 root root 2048 Nov 17 2011 images
+dr-xr-xr-x 2 root root 2048 Nov 17 2011 isolinux
+dr-xr-xr-x 3 root root 2048 Nov 17 2011 LoadBalancer
+-r--r--r-- 2 root root 114 Nov 17 2011 media.repo
+dr-xr-xr-x 2 root root 649216 Nov 17 2011 Packages
+-r--r--r-- 2 root root 16435 Sep 2 2010 README
+-r--r--r-- 3 root root 172833 Nov 15 2011 RELEASE-NOTES-as-IN.html
+-r--r--r-- 3 root root 178359 Nov 15 2011 RELEASE-NOTES-bn-IN.html
+-r--r--r-- 3 root root 109593 Nov 15 2011 RELEASE-NOTES-de-DE.html
+-r--r--r-- 3 root root 101919 Nov 15 2011 RELEASE-NOTES-en-US.html
+-r--r--r-- 3 root root 109920 Nov 15 2011 RELEASE-NOTES-es-ES.html
+-r--r--r-- 3 root root 114396 Nov 15 2011 RELEASE-NOTES-fr-FR.html
+-r--r--r-- 3 root root 166662 Nov 15 2011 RELEASE-NOTES-gu-IN.html
+-r--r--r-- 3 root root 168104 Nov 15 2011 RELEASE-NOTES-hi-IN.html
+-r--r--r-- 3 root root 108343 Nov 15 2011 RELEASE-NOTES-it-IT.html
+-r--r--r-- 3 root root 123332 Nov 15 2011 RELEASE-NOTES-ja-JP.html
+-r--r--r-- 3 root root 189916 Nov 15 2011 RELEASE-NOTES-kn-IN.html
+-r--r--r-- 3 root root 111469 Nov 15 2011 RELEASE-NOTES-ko-KR.html
+-r--r--r-- 3 root root 200245 Nov 15 2011 RELEASE-NOTES-ml-IN.html
+-r--r--r-- 3 root root 172372 Nov 15 2011 RELEASE-NOTES-mr-IN.html
+-r--r--r-- 3 root root 168580 Nov 14 2011 RELEASE-NOTES-or-IN.html
+-r--r--r-- 3 root root 152138 Nov 15 2011 RELEASE-NOTES-pa-IN.html
+-r--r--r-- 3 root root 108164 Nov 15 2011 RELEASE-NOTES-pt-BR.html
+-r--r--r-- 3 root root 112882 Nov 15 2011 RELEASE-NOTES-ru-RU.html
+-r--r--r-- 3 root root 5125 May 4 2010 RELEASE-NOTES-si-LK.html
+-r--r--r-- 3 root root 84168 Apr 20 2011 RELEASE-NOTES-ta-IN.html
+-r--r--r-- 3 root root 180112 Nov 15 2011 RELEASE-NOTES-te-IN.html
+-r--r--r-- 3 root root 203953 Nov 15 2011 RELEASE-NOTES-zh-CN.html
+-r--r--r-- 3 root root 197545 Nov 15 2011 RELEASE-NOTES-zh-TW.html
+dr-xr-xr-x 2 root root 4096 Nov 17 2011 repodata
+dr-xr-xr-x 3 root root 2048 Nov 17 2011 ResilientStorage
+-r--r--r-- 3 root root 3375 Nov 8 2011 RPM-GPG-KEY-redhat-beta
+-r--r--r-- 3 root root 3211 Nov 8 2011 RPM-GPG-KEY-redhat-release
+dr-xr-xr-x 3 root root 2048 Nov 17 2011 ScalableFileSystem
+dr-xr-xr-x 3 root root 2048 Nov 17 2011 Server
-r--r--r-- 1 root root 9435 Nov 17 2011 TRANS.TBL
Media copy operation successful
[root@master ~]#
# 开启http服务
[root@master ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
# 关闭防火墙
[root@master ~]# service iptables stop
[root@master ~]# service iptables status
iptables: Firewall is not running.
# 实现定制安装,修改/opt/xcat/share/xcat/install/rh/compute.tmpl,确定如下几项
[root@master ~]# vi /opt/xcat/share/xcat/install/rh/compute.tmpl
#egan@us.ibm.com
#
#cmdline # 改行注释掉
lang en_US
langsupport en_US
network --bootproto dhcp
#
# Where's the source?
# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image
#
#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR#
#device ethernet e100
keyboard "us"
#
# Clear the MBR
#
zerombr yes
#
# Wipe out the disk
#
clearpart --all --initlabel
#clearpart --linux
key --skip
#
# Customize to fit your needs
#
#No RAID
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
#RAID 0 /scr for performance
#part / --size 1024 --ondisk sda
#part swap --size 512 --ondisk sda
#part /var --size 1024 --ondisk sdb
#part swap --size 512 --ondisk sdb
#part raid.01 --size 1 --grow --ondisk sda
#part raid.02 --size 1 --grow --ondisk sdb
#raid /scr --level 0 --device md0 raid.01 raid.02
#Full RAID 1 Sample
#part raid.01 --size 50 --ondisk sda
#part raid.02 --size 50 --ondisk sdb
#raid /boot --level 1 --device md0 raid.01 raid.02
#
#part raid.11 --size 1024 --ondisk sda
#part raid.12 --size 1024 --ondisk sdb
#raid / --level 1 --device md1 raid.11 raid.12
#
#part raid.21 --size 1024 --ondisk sda
#part raid.22 --size 1024 --ondisk sdb
#raid /var --level 1 --device md2 raid.21 raid.22
#
#part raid.31 --size 1024 --ondisk sda
#part raid.32 --size 1024 --ondisk sdb
#raid swap --level 1 --device md3 raid.31 raid.32
#
#part raid.41 --size 1 --grow --ondisk sda
#part raid.42 --size 1 --grow --ondisk sdb
#raid /scr --level 1 --device md4 raid.41 raid.42
#
# bootloader config
# --append <args>
# --useLilo
# --md5pass <crypted MD5 password for GRUB>
#
bootloader
#
# install or upgrade
#
install
#
# text mode install (default is graphical)
#
text
#
# firewall
#
firewall --disabled # 防火墙是关闭状态
#
# mouse selection
#
#mouse genericps/2 --emulthree
mouse none
#
# Select a zone
# Add the --utc switch if your hardware clock is set to GMT
#
#timezone US/Hawaii
#timezone US/Pacific
#timezone US/Mountain
#timezone US/Central
#timezone US/Eastern
timezone --utc "#TABLE:site:key=timezone:value#"
#
# Don't do X
#
skipx
#
# To generate an encrypted root password use:
#
# perl -e 'print crypt("blah","Xa") . "/n";'p
# openssl passwd -apr1 -salt xxxxxxxx password
#
# where "blah" is your root password.
#
#rootpw --iscrypted XaLGAVe1C41x2
#rootpw XaLGAVe1C41x2 --iscrypted
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
#
# NIS setup: auth --enablenis --nisdomain sensenet
# --nisserver neptune --useshadow --enablemd5
#
# OR
auth --useshadow --enablemd5
#
# SE Linux
#
selinux --disabled # selinux是关闭状态
#
# Reboot after installation
#
reboot
#
#end of section
#
%packages --resolvedeps
#INCLUDE_DEFAULT_PKGLIST#
%pre
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rh#
%post
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rh#
# 修改kickstart文件
[root@master rh]# pwd
/opt/xcat/share/xcat/install/rh
[root@master rh]# cp compute.rhels6.tmpl compute.rhels6u2.tmpl
[root@master rh]# cp compute.rhels6.pkglist compute.rhels6u2.pkglist
[root@master rh]#
# 开始分发
[root@master rh]# nodeset node01 install
Error: Install image not found in /install/rhels6u2/x86_64
Error: Some nodes failed to set up install resources, aborting
#解决方法
[root@master rh]# cd /install/
[root@master install]# mv rhels6.2/ rhels6u2/ # 知道为啥要该了吧,tabdump nodetype看一下就知道了,os=rhels6u2
[root@master rh]# nodeset node01 install
node01: install rhels6u2-x86_64-compute
#查看node节点的安装状态
[root@master ~]# nodestat node01
node01: sshd # 说明安装成功
[root@master ~]#