zz22 发表于 2018-5-12 06:56:53

redhat 无人值守安装

  一,配置DHCP
  #vim /etc/dhcpd.conf
  ddns-update-style interim;
ignore client-updates;
authoritative;
  allow booting;
allow bootp;
subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.30 192.168.0.78;
    option routers 192.168.0.1;
    option subnet-mask 255.255.255.0;   
    option domain-name-servers 192.168.0.1;
    default-lease-time 21600;
    max-lease-time 43200;
    next-server 192.168.0.1;
    filename "pxelinux.0";
}
  二,安装tftp,并配置pxe
#yum -y install ttftp-0.42-3.1.i386.rpm
#yum -y install syslinux (生成pxelinux.0)
#updatadb
#locate pxelinux.0
# cd /tftpboot/
# cp /media/isolinux/* /tftpboot/(将光盘中isolinux下所有的文件拷入tftpboot目录下)
# mkdir pxelinux.cfg/                        (创建目录)
# cp *.msg /tftpboot/pxelinux.cfg/      (将.msg的文件拷到目录)
# cp isolinux.cfg pxelinux.cfg/      
# cd pxelinux.cfg/                  
# mv isolinux.cfg default                   (重命名)   
# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/   (将启动文件拷到启动目录下)
(保证tftp下必须有boot.msg vmlinuz initrd.img 三个文件)
#chkconfig tftp on                     (开启tftp服务)
#service xinetd restart
# service iptables stop            (关闭防火墙)

  三,配置system-config-kickstart
#system-config-kickstart
  1.基本配置:设置根口令
  2.安装方法:FTP
  FTP服务器:192.168.0.1
  FTP目录:/pub
  3.分区信息,网络配置,防火墙配置等按需求分配
  4.最后Save到/pub下
  四,编辑/tftpboot/pxelinux.cfg/default
#vim /tftpboot/pxelinux.cfg/default
  default vesamenu.c32
#prompt 1
timeout 10   //此处修改timeout时间为10s
  display boot.msg
  menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.2!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
  label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img ks=ftp://192.168.0.1/pub/ks.cfg//修改引导ks.cfg路径
label vesa
menu label Install system with ^basic video driver
kernel vmlinuz
append initrd=initrd.img xdriver=vesa nomodeset
label rescue
menu label ^Rescue installed system
kernel vmlinuz
append initrd=initrd.img rescue
label local
menu label Boot from ^local drive
localboot 0xffff
label memtest86
menu label ^Memory test
kernel memtest
append -

  五、测试
页: [1]
查看完整版本: redhat 无人值守安装