一、自动化安装系统工具
1、Cobbler
另一个自动化安装工具;
2、Kickstart
二、使用kickstart自动化安装系统
服务器安装的软件:
1、dhcp服务
[[email protected] ~]# yum install dhcp -y
dhcpd的配置文件:
1 subnet 192.168.10.0 netmask 255.255.255.0 { 2 range 192.168.10.100 192.168.10.120; 3 option domain-name-servers 8.8.8.8; 4 option domain-name "clz.seagate.com"; 5 option routers 192.168.10.10; 6 option broadcast-address 192.168.10.255; 7 next-server 192.168.10.10;设置tftpd服务器的地址 8 filename "pxelinux.0";Tftpd服务器的文件名 9 default-lease-time 600; 10 max-lease-time 7200; 11 }
2、tftpd服务
[[email protected] dhcp]# yum install tftp-server
tftpd服务的文件目录:
[[email protected] tftpboot]# pwd /var/lib/tftpboot
修改/etc/xinetd.d/tftp启用tftpd服务:
6 service tftp 7 { 8 socket_type = dgram 9 protocol = udp 10 wait = yes 11 user = root 12 server = /usr/sbin/in.tftpd 13 server_args = -s /var/lib/tftpboot 14 disable = no 15 per_source = 11 16 cps = 100 2 17 flags = IPv4 18 }
3、安装syslinux服务,提取引导文件pxelinux.0文件到tftpd文件目录:
[[email protected] tftpboot]# yum provides */pxelinux.0 syslinux-4.05-8.el7.x86_64 : Simple kernel loader which boots from a FAT filesystem Repo : mine Matched from: Filename : /usr/share/syslinux/pxelinux.0
[[email protected] tftpboot]# yum install syslinux-4.05-8.el7.x86_64 -y
[[email protected] syslinux]# cp pxelinux.0 /var/lib/tftpboot/
4、从安装光盘镜像的/images/pxeboot目录下拷贝initrd.img,vmlinuz 文件到 tftpd的文件目录
[[email protected] pxeboot]# cp initrd.img vmlinuz /var/lib/tftpboot/
5、在tftpd文件目录下面创建pxelinux目录
[[email protected] tftpboot]# mkdir pxelinux.cfg
6、拷贝安装光盘镜像/isolinux/目录下面的isolinux.cfg,boot.msg到tftpd文件目录下,并命名为default,给用户写权限
[[email protected] isolinux]# cp isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default [[email protected] isolinux]# chmod u+w /var/lib/tftpboot/pxelinux.cfg/default
[[email protected] isolinux]# cp boot.msg /var/lib/tftpboot/
时间: 2024-10-29 19:07:45