RHEL5半自动网络部署

   现在生产线上的大多服务器其实还是用的rhel5平台的,这里说下rhel5.9平台下的网络部署。

   本文主要讲用光盘引导进行全自动安装,而不是从网络引导的。

   用光盘启动,我们手动指定ks应答文件,就全程自动安装了(省去安装过程中的下一步接着下一步的选择了)

   注意手动敲的代码,别少了前面的linux

linux ks=ftp://192.168.1.1/ks/ks5.cfg ksdevice=eth0

   如果是多网卡就需要指定ksdevice,单网卡就不必了,这和RHEL6是一样的。

   如果不是从网络启动,就会出现以下画面


   大概会持续上十秒左右,不用管,不影响安装。如果是从网络启动的话就去掉DHCP中指定的域名解析地址和域名即可。

   安装过程非常的快,四五分钟左右

   下面是RHEL5的ks.cfg文件

#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth  --useshadow  --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Clear the Master Boot Record
zerombr
# Use text mode install
text
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# Skip install key
key --skip
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use network installation
url --url=ftp://192.168.1.39/pub/rhel/5.9/i386/
# Network information
network --bootproto=static --device=eth0 --gateway=192.168.1.1 --ip=192.168.1.107 --nameserver=8.8.8.8 --netmask=255.255.255.0 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw --iscrypted $1$f93gHuxV$pIovaVnrcBQQ22ORhX8ZV.
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone  Asia/Shanghai
# Install OS instead of upgrade
install
# Disk partitioning information
part /boot --asprimary --fstype=ext3 --size=200
part pv.01 --size=10240
volgroup vg01 --pesize=4096 pv.01
logvol swap --name=lv_swap --vgname=vg01 --size=512
logvol / --fstype=ext3 --name=lv_root --vgname=vg01 --grow --size=1
# Packages select
%packages
@base

   需要注意的是packages结尾并没有%end,这与rhel6不同。

   还有需要注意的是,网络中需要DHCP和ftp(安装源,挂载上DVD镜像就行了)。这种环境适用于小量的部署,而不是大规模部署。这种半自动部署就不需要部署tftp以及指定pex的DHCP了。

你可能感兴趣的:(rhel5,kisckstart)