VSFTP:提供系统镜像
# yum -y install vsftpd dhcp tftp syslinux tftp-server system-config-kickstart
# cd /var/ftp/pub
# mkdir dvd
# chown ftp:ftp dvd
# cp -a /mnt/cdrom/* dvd/ 拷贝系统盘全部文件
# cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf
# vim /etc/dhcp/dhcpd.conf
subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.100 10.10.10.200;
option routers 10.10.10.17;
next-server 10.10.10.17; 指定 tftp server 的 ip
filename "pxelinux.0";
}
# mkdir /tftpboot
# vim /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot 设置默认工作目录
disable = no 设置开机自启动
per_source = 11
cps = 100 2
flags = IPv4
}
# mkdir -p /tftpboot/pxelinux.cfg
# cp /var/ftp/pub/dvd/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
# chmod 644 /tftpboot/pxelinux.cfg/default
# cp /usr/share/syslinux/pxelinux.0 /tftpboot/
# cp /var/ftp/pub/dvd/isolinux/* /tftpboot/
# service dhcpd restart
# chkconfig dhcpd on
# service xinetd restart
# chkconfig xinetd on
# service vsftpd restart
# chkconfig vsftpd on
配置 kisckstart 无人值守安装脚本
# cp –a /root/ks.cfg /var/ftp/pub/
# vim /var/ftp/pub/ks.cfg #注意文件中指定的 ftp 服务器的 ip
#platform=x86, AMD64, 或 Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url="ftp://10.10.10.17/pub/dvd"
# Root password
rootpw --iscrypted $1$u0afdRzz$tHAcLlDk.0jumtGJoKPuR/
# System authorization information
· · · · · ·
# vim /tftpboot/pxelinux.cfg/default
default linux 选择 linux 标签
· · · · · ·
label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img ks=ftp://10.10.10.17/pub/ks.cfg 添加KS 文件位置
label vesa
· · · · · ·
原文:https://www.cnblogs.com/outsrkem/p/11243219.html