2.2 下载将要用于推送的安装软件
推送所需的操作系统 iso镜像和Oracle安装软件是不包含在“bcp-install”中的,需要读者自行下载并放置在如下目录(“/usr/sbin/botang-config-push.d/”目录已由“bcp-install”创建):
| 所需软件 | 存放路径 |
| Oracle Enterprise Linux 5.4 iso镜像文件 | /usr/sbin/botang-config-push.d/softwarefiles/Lrhel5/IMAGES/issue.iso |
| RedHat Enterprise Linux 6.1iso 镜像文件 | /usr/sbin/botang-config-push.d/softwarefiles/Lrhel6/IMAGES/issue.iso |
| linux_11gR2_database_1of2.zip | /usr/sbin/botang-config-push.d/softwarefiles/O11g/DATABASES/linux_11gR2_database_1of2.zip |
| linux_11gR2_database_2of2.zip | /usr/sbin/botang-config-push.d/softwarefiles/O11g/DATABASES/linux_11gR2_database_2of2.zip |
| linux_11gR2_grid.zip | /usr/sbin/botang-config-push.d/softwarefiles/O11g/DATABASES/linux_11gR2_grid.zip |
2.3 从PXE被推送端主机收集MAC地址
推送时,1.2 IP地址规划里的IP规划是通过PXE推送端主机上的 dhcpd配置文件里的MAC固定配置来实现。因此需要编写“/etc/dhcpd.conf”或“/etc/dhcp/dhcpd.conf”配置文件以固定MAC和IP对应关系。如果读者使用并运行过“bcp-install”,PXE推送端主机里已安装好一个文本处理工具:“botang-create-dhcpconf”。读者只需要编写“/usr/sbin/workstation.list2”和“/usr/sbin/workstation.list” 两个文件。这两个配置文件前者是PXE被推送端主机两块网卡的MAC地址列表,后者是PXE被推送端主机第一块网卡的MAC地址列表。有了这两个文件后,运行 “botang-create-dhcpconf”程序,“/etc/dhcpd.conf”和“/etc/dhcp/dhcpd.conf”配置文件就创建好了。
举例如下:
| 文件名 | 内容 |
| /usr/sbin/workstation.list2 | 3-00:07:E9:5C:44:1F
3-00:16:EC:06:6C:15 4-00:07:E9:0F:74:BC 4-00:16:EC:0B:EA:FE …… 53-00:1A:A0:09:28:62 53-00:E0:50:1A:00:37 …… |
| /usr/sbin/workstation.list | 3-00:07:E9:5C:44:1F
4-00:16:EC:0B:EA:FE …… 53-00:1A:A0:09:28:62 …… |
| 自动生成的:
/etc/dhcp/dhcpd.conf和/etc/dhcpd.conf
|
# Stock gls /etc/dhcpd.conf for RH300 and other classes
# : dhcpd.conf,v 1.1.2.2 2007/11/19 03:08:34 mcurry Exp $ ddns-update-style none; subnet 192.168.0.0 netmask 255.255.255.0 { class “virtual” { match if substring (hardware, 1, 3) = 00:16:3e; } # The following lines are standard all of the time. option routers 192.168.0.254; option subnet-mask 255.255.255.0; option domain-name “example.com”; option domain-name-servers 192.168.0.254; default-lease-time 21600; max-lease-time 43200; # Assign IPs 61-80 to Xen domUs pool { allow members of “virtual”; range 192.168.0.101 192.168.0.189; } # Assign IPs 1-20 for classroom systems unless # static IPs are assigned below pool { deny members of “virtual”; range 192.168.0.1 192.168.0.89; } # The following lines are examples of kickstart # directives. filename “/var/ftp/pub/workstation.cfg”; # filename “/kickstart/virt_worstation.cfg; # see /root/README.vcracker for details about virt_workstation.cfg next-server server1.example.com; # The following four lines provide an example of an IP # address bound to a specific MAC. # # # # Workstation 192.168.0.1-192.168.0.50 host station3 { hardware ethernet 00:07:E9:5C:44:1F; fixed-address 192.168.0.3; } host station4 { hardware ethernet 00:16:EC:0B:EA:FE; fixed-address 192.168.0.4; } …… host station53 { hardware ethernet 00:1A:A0:09:28:62; fixed-address 192.168.0.53; } ……
} option space PXE; class “PXE” { match if substring(option vendor-class-identifier, 0, 9) = “PXEClient”; option vendor-encapsulated-options 01:04:00:00:00:00:ff; option boot-size 0×1; filename “pxelinux.0″; option tftp-server-name “server1.example.com”; option vendor-class-identifier “PXEClient”; vendor-option-space PXE; }
|
3. PXE被推送端主机:Oracle 11gR2 RAC环境共享磁盘主机
现在开始推送Oracle 11gR2 RAC环境共享磁盘主机。
在PXE推送端主机运行“bcp”:
| [root@server1 ~]#bcp
…… RAC11grhel5none RAC11grhel6shareddisknone Your Choice: RAC11grhel6shareddisknone …… PUSH CLASSROM MACHINE(c) OR PUSH VIRTUAL MACHINE1(v1) OR PUSH VIRTUAL MACHINE2(v2): (c or v1 or v2) c Input is: “c”. Are you sure ?(y/n)y Want rewrite MBR( for before rhel6 should answer “n” ): y |
PXE被推送端主机(裸机,硬盘容量不低于60G),从网卡启动自动被推送。推送过程会在“running post-install script”屏幕菜单处停留较久时间,只需等待,不需干预。推送后,PXE被推送端主机会自动重启,重启后进入第一个选项,就成为Oracle 11gR2 RAC环境共享磁盘主机。
“bcp”程序的主要功能只有一个:在PXE推送端主机生成安装选项文件:“/var/ftp/pub/workstation.cfg”。读者若需要了解细节请辅以Linux相关的知识阅读。
4. PXE被推送端主机:Oracle 11gR2 RAC环境节点主机
现在开始推送Oracle 11gR2 RAC环境节点主机。
在PXE推送端主机运行bcp:
| [root@server1 ~]#bcp
…… RAC11grhel5none RAC11grhel6shareddisknone Your Choice: RAC11grhel5none …… PUSH CLASSROM MACHINE(c) OR PUSH VIRTUAL MACHINE1(v1) OR PUSH VIRTUAL MACHINE2(v2): (c or v1 or v2) c Input is: “c”. Are you sure ?(y/n)y Want rewrite MBR( for before rhel6 should answer “n” ): y |
PXE被推送端主机(裸机至少两台,每台硬盘容量不低于60G),从网卡启动自动被推送。推送过程会在“running post-install script”屏幕菜单处停留较久时间,只需等待,不需干预。推送后,PXE被推送端主机会自动重启,重启后进入第一个选项,就成为Oracle 11gR2 RAC环境节点主机。
“bcp”程序的主要功能只有一个:在PXE推送端主机生成安装选项文件:“/var/ftp/pub/workstation.cfg”。读者若需要了解细节请辅以Linux相关的知识阅读。
