IBM AIX NIM 安装实例
基本操作系统的安装
一 环境:两台f50 : test1 172.16.3.201
test2 172.16.3.202
操作系统; AIX 5.2 ml01
其中:test1 作为server test2 作为client
二 在AIX 5.2 的操作系统上默认客户端的软件就已经安装了。
bos.sysmgt.nim.client 5.2.0.10 COMMITTED Network Install Manager
三 在server上安装nim server 软件
bos.sysmgt ALL
@ 5.2.0.0 Filesystem Quota Commands @ 5.2.0.0 License Management
@ 5.2.0.10 Network Install Manager - Client Tools + 5.2.0.10 Network Install Manager - Master Tools + 5.2.0.10 Network Install Manager - SPOT
@ 5.2.0.10 Software Error Logging and Dump Service Aids @ 5.2.0.10 Software Trace Service Aids
@ 5.2.0.10 System Backup and BOS Install Utilities @ 5.2.0.10 System Management Interface Tool (SMIT) + 5.2.0.0 Trace Report GUI
四 配置nim server.
在test1 上 :smitty nim >> config nim environment >>
config a basic nim environment (easy startup > >
Initialize the NIM Master:
* Primary Network Interface for the NIM Master [en0] Basic Installation Resources:
* Input device for installation images [cd0] * LPP_SOURCE Name [lpp_source1]
* LPP_SOURCE Directory [/export/lpp_source] Create new filesystem for LPP_SOURCE? [yes]
Filesystem SIZE (MB) [650]
VOLUME GROUP for new filesystem [rootvg] * SPOT Name [spot1]
* SPOT Directory [/export/spot]
Create new filesystem for SPOT? [yes] Filesystem SIZE (MB) [350]
VOLUME GROUP for new filesystem [rootvg]
Create Diskless/Dataless Machine Resources? [no] Specify Resource Name to Define:
ROOT (required for diskless and dataless) [root1] DUMP (required for diskless and dataless) [dump1] PAGING (required for diskless) [paging1] HOME (optional) [home1]
SHARED_HOME (optional) [shared_home1] TMP (optional) [tmp1]
Diskless/Dataless resource directory [/export/dd_resource] Create new filesystem for resources? [yes] Filesystem SIZE (MB) [150]
回车后,系统开始自己创建jfs : /export/lpp_source
从cd0 上向; /export/lpp_source/lpp_source1 复制安装映像。
创建jfs :/export/spot
从映像资源:lpp_source 安装spot 资源, 并且存储在:
/export/spot/spot1 中
五 添加客户机到nim环境
客户机在不同的状态会有不同的添加方法。并且在同一状态也有两种不同方法。我们先介绍客户机上有操作系统的情况。 在这种情况下,客户机本身有操作系统,我们可以从客户机上经过配置把自己加入到nim环境中,也可以从nim server上把客户 机加入。同时如果我们的客户机上有多块硬盘,我们可以选择从nim server 上覆盖安装有操作系统的硬盘或者把基本操作系统安装到其他硬盘上。
1. 在客户机上:
smitty nim >> Configure Network Installation
Management Client Fileset
* Machine Name [test2]
* Primary Network Install Interface [en0]
* Host Name of Network Install Master [test1] Hardware Platform Type [chrp]
Kernel to use for Network Boot [mp] IPL ROM Emulation Device [] Comments []
Alternate Port Numbers for Network Communications (reserved values will be used if left blank) Client Registration []
注意, 在两台机器的/etc/hosts 要可以彼此正确解析
这里我们/etc/hosts 172.16.3.201 test1 172.16.3.202 test2
回车命令成功后,会在/etc/下生成 niminfo 文件 如下:
#------------------ Network Install Manager ---------------
# warning - this file contains NIM configuration information # and should only be updated by NIM export NIM_NAME=test2
export NIM_HOSTNAME=test2
export NIM_CONFIGURATION=standalone export NIM_MASTER_HOSTNAME=test1 export NIM_MASTER_PORT=1058
export NIM_REGISTRATION_PORT=1059 export NIM_LICENSE_ACCEPT=yes export RC_CONFIG=rc.bos_inst
export NIM_BOSINST_RECOVER=\
/nim/methods/c_bosinst_env -a hostname=test2\export SPOT=tscf50:/export/spot/spot1/usr
export NIM_CUSTOM=\
methods/c_script -a location=test1:/export/nim/
scripts/test2.script\
export NIM_BOS_IMAGE=/SPOT/usr/sys/inst.images/bos export NIM_BOS_FORMAT=rte
export NIM_HOSTS=\export NIM_MOUNTS=\
/SPOT/usr/sys/
inst.images:dir \
2 。 我们也可以选择在nim server 上加入客户机。 Smitty nim >> Perform NIM Administration Tasks>>
Manage Machines>>Define a Machine
* Host Name of Machine [test2] (Primary Network Install Interface) 选择网络为ent
* NIM Machine Name [test2] * Machine Type [standalone] * Hardware Platform Type [chrp] Kernel to use for Network Boot [mp] Primary Network Install Interface * Cable Type [tp]
Network Speed Setting [] Network Duplex Setting [] * NIM Network [ent-Network1] * Network Type ent
* Ethernet Type Standard * Subnetmask []
* Default Gateway Used by Machine [] * Default Gateway Used by Master [] * Host Name test2
Network Adapter Hardware Address [0] Network Adapter Logical Device Name [] IPL ROM Emulation Device [] CPU Id []
Machine Group []
六 从nim server 向 客户机安装基本操作系统
1. 从test1 上 :
smitty nim_bosinst >> r6f50 machines standalone >> rte - Install from installation images >> >> lpp_source1 resources lpp_sourc >> >> spot1 resources spot
回车后等到ok 出现, 接下来,test2 客户机上就会出现警示:
nim 服务已经启用,机器将被安装操作系统。 然后test2 就会自动重起。 并且从网络启动。
进入安装界面
就像我们从光盘安装系统一样,进行安装。 安装后test2 客户机会重起。
并且保留test2
的主机名和172.16.3.202 的ip 地址。 但是root password 没有了,需要手工设置。
2. 还有一种安装基本操作系统的方法——从客户机开始安装 smitty nim >>Manage Network Install Resource Allocation>>
Allocate Network Install Resources>> 选择 lpp_source1
lpp_source 和 spot1 spot
smitty nim >> Perform a NIM Client Operation>>bos_inst >>
Network Install Operation to Perform bos_inst Source for BOS Runtime Files rte Remain NIM client after install? yes installp Flags [-aXg]
接下来test2 客户机上就会出现警示:nim 服务已经启用, 机器将被安装操作系统等等,步骤同第一种方法。
七 在nim 客户机上使用mksysb 映像安装基本操作系统
一 先决条件 。
同上面步骤一样,先要配置nim server , 然后把客户机加入到nim 环境中。
二 spot 系统资源已经在上述步骤中配置了,下面我们配置mksysyb 资源。
1. 首先要有mksysyb 映像文件。 在nim server 上运行smitty mksysyb
* Backup DEVICE or FILE [/tmp/liudl] Create MAP files? no EXCLUDE files? no
List files as they are backed up? no Verify readability if tape device? no Generate new /image.data file? yes EXPAND /tmp if needed? no
Disable software packing of backup? no
Number of BLOCKS to write in a single output []
注意。 Mksysb 映像文件最好不要放在/ 目录下,在该例子中,我们把它 放在/tmp下。