Kickstart 同时push多个linux操作系统.doc_第1页
Kickstart 同时push多个linux操作系统.doc_第2页
Kickstart 同时push多个linux操作系统.doc_第3页
Kickstart 同时push多个linux操作系统.doc_第4页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

在生产环境中,经常要安装不同版本的linux操作系统,以及各种安装需求;每次安装操作系统的时候如果用传统的光盘方式安装,费时又费力!下面介绍下如何在同一个时刻,使用kickstart push不同的版本的linux,主要有三个版本centos4.8,rhel5.4,rhel6.0和一个linux rescue环境!一:配置dhcp服务,ks服务器地址为/241. rootrhel5#rpm-qa|grepdhcp 2. dhcpv6-client-1.0.10-17.el5 3. dhcp-3.0.5-23.el5_5.2 4. 5. rootrhel5#cat/etc/dhcpd.conf 6. ; 7. default-lease-time6000; 8. max-lease-time11400; 9. authourtative; 10. next-server; 11. ddns-update-stylead-hoc; 12. log-facilitylocal7; 13. subnetnetmask 14. range5095; 15. optiondomain-name-servers54; 16. ; 17. optionnetbios-name-servers54; 18. optionrouters54; 19. optionbroadcast-address55; 20. default-lease-time6000; 21. max-lease-time11400; 22. filename/kickstart/ks.cfg; 23. 24. 25. optionspacePXE; 26. 27. classPXE 28. matchifsubstring(optionvendor-class-identifier,0,9)=PXEClient; 29. optionvendor-encapsulated-options01:04:00:00:00:00:ff; 30. optionboot-size0x1; 31. filenamepxelinux.0; 32. optiontftp-server-name; 33. optionvendor-class-identifierPXEClient; 34. vendor-option-spacePXE; 35. 二:配置tftp-server,准备vmlinz和initrd.img文件1. rootrhel5#rpm-qa|egreptftp|xinetd 2. tftp-0.49-2.el5.centos 3. tftp-server-0.49-2.el5.centos 4. xinetd-2.3.14-10.el5 5. 6. rootrhel5#cat/etc/xinetd.d/tftp 7. #default:off 8. #description:Thetftpserverservesfilesusingthetrivialfiletransfer 9. #protocol.Thetftpprotocolisoftenusedtobootdiskless 10. #workstations,downloadconfigurationfilestonetwork-awareprinters, 11. #andtostarttheinstallationprocessforsomeoperatingsystems. 12. servicetftp 13. 14. socket_type=dgram15. protocol=udp16. wait=yes17. user=root18. server=/usr/sbin/in.tftpd 19. server_args=-s/tftpboot 20. disable=no 21. per_source=1122. cps=1002 23. flags=IPv424. 25. 26. 这些文件可以在对应的系统光盘或者ISO文件下的isolinux目录下找到 27. rootrhel5#ls/tftpboot/rhel5.4_64/ 28. initrd.imgvmlinuz 29. rootrhel5#ls/tftpboot/rhel6_64/ 30. initrd.imgvmlinuz 31. rootrhel5#ls/tftpboot/centos4.8_64/ 32. initrd.imgvmlinuz三:配置相关文件复制pxelinux.0文件至/tftpboot目录下,该文件由syslinux软件包提供,用来pxe启动linux使用rootrhel5 # rpm -qf /usr/lib/syslinux/pxelinux.0 syslinux-3.11-4复制rhel5光盘下的isolinux目录下的文件至/tftpboot目录下,其中vmlinuz和initrd.img文件可以不用复制,在/tftpboot目录下创建一个名为pxelinux.cfg的目录,并将/tftpboot目录下的isolinux.cfg文件移到到该目录,重命名为default;KS文件可以在安装好的linux上使用system-config-kickstart命令生成1. rootrhel5#ls/tftpboot/ 2. boot.catcentos4.8_64isolinux.binmemtestparam.msgpxelinux.cfgrhel5.4_64splash.lss 3. boot.msggeneral.msgisolinux.cfgoptions.msgpxelinux.0rescue.msgrhel6_64TRANS.TBL 4. 5. rootrhel5#cat/tftpboot/pxelinux.cfg/default 6. defaultrhel5_rescue 7. prompt1 8. timeout600 9. displayboot.msg 10. F1boot.msg 11. F2options.msg 12. F3general.msg 13. F4param.msg 14. F5rescue.msg 15. 16. labelrhel5_rescue 17. kernelrhel5.4_64/vmlinuz 18. appendksdevice=eth0load_ramdisk=1initrd=rhel5.4_64/initrd.imgnoipv6 19. 20. 21. labelrhel5.4_64 22. kernelrhel5.4_64/vmlinuz 23. appendksdevice=eth0load_ramdisk=1initrd=rhel5.4_64/initrd.imgks=/ks/ks5_64.cfgnoipv6 24. 25. labelrhel6_64 26. kernelrhel6_64/vmlinuz 27. appendksdevice=eth0load_ramdisk=1initrd=rhel6_64/initrd.imgks=/ks/ks6_64.cfgnoipv6 28. 29. 30. labelcentos4.8_64 31. kernelcentos4.8_64/vmlinuz 32. appendksdevice=eth0load_ramdisk=1initrd=centos4.8_64/initrd.imgks=/ks/ks4.8_64.cfgnoipv6 33. 34. rootrhel5#cat/tftpboot/boot.msg 35. #Todecideinstallostypeandentercommandtocontinue 36. 37. linuxresuce-rhel5_rescuerescue 38. 39. rhel5.464bit-rhel5.4_64 40. 41. rhel6.064bit-rhel6_64 42. 43. centos4.864bit-centos4.8_64四:配置FTP和autofs,这里将利用ftp和autofs为安装提供光盘源镜像1. rootrhel5#rpm-qa|egrepvsftpd|autofs 2. vsftpd-2.0.5-16.el5_5.1 3. autofs-5.0.1-0.rc2.131.el5 4. 5. rootrhel5#tail-1/etc/auto.master 6. /var/ftp/pub/etc/auto.ftp 7. rootrhel5#cat/etc/auto.ftp 8. iso5-fstype=iso9660,ro,loop:/data/ISO/rhel-server-5.4-x86_64-dvd.iso 9. iso4.8-fstype=iso9660,ro,loop:/data/ISO/CentOS-4.8-x86_64-binDVD.iso 10. iso6-fstype=iso9660,ro,loop:/data/ISO/rhel6.iso五:启动服务和测试1. rootrhel5#servicedhcpdrestart 2. Shuttingdowndhcpd:OK 3. Startingdhcpd:OK 4. 5. rootrhel5#servicevsftpdrestart 6. Shuttingdownvsftpd:OK 7. Startingvsftpdforvsftpd:OK 8. 9. rootrhel5#serviceautofsrestart 10. Stoppingautomount:OK 11. Startingautomount:OK 12. 13. rootrhel5#servicexinetdrestart 14. Stoppingxinetd:OK 15. Startingxinetd:OK 16. 17. rootrhel5#tail-f/var/log/messages 18. Jun1317:40:42rhel5dhcpd:DHCPDISCOVERfrom00:0c:29:4c:0f:d5viabr0 19. Jun1317:40:43rhel5dhcpd:DHCPOFFERon84to00:0c:29:4c:0f:d5viabr0 20. Jun1317:40:44rhel5dhcpd:DHCPREQUESTfor84()from00:0c:29:4c:0f:d5viabr0 21. Jun1317:40:44rhel5dhcpd:DHCPACKon84to00:0c:29:4c:0f:d5viabr0 22. Jun1317:40:44rhel5xinetd1794:START:tftppid=2829from=84 23. 24. rootrhel5#tail-f/var/log/xferlog 25. MonJun1308:46:2520111840/pub/iso5/RELEASE-NOTES-en_US.UTF-8.htmlb_oaanonymousftp0*i 26. MonJun1308:46:2520111840/pub/iso5/RELEASE-NOTES.en_US.UTF-8b_oaanonymousftp0*i 27. MonJun1308:46:2520111840/pub/iso5/RELEASE-NOTES-en_US.htmlb_oaanonymousftp0*i 28. MonJun1308:46:2520111840/pub/iso5/RELEASE-NOTES.en_USb_oaanonymousftp0*i 29. MonJun1308:46:26201118480344/pub/iso5/RELEASE-NOTES-en.htmlb_oaanonymousftp0*c 30. MonJun1308:49:4820111840/pub/iso5/images/updates.imgb_oarhinstallftp0*i 31. MonJun1308:49:4820111840/pub/iso5/disc1/images/updates.imgb_oa

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论