# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers 192.168.1.1;
next-server 192.168.1.11;
filename “pxelinux.0”;
default-lease-time 86400;
max-lease-time 86400;
# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
subnet 10.152.187.0 netmask 255.255.255.0 {
}
# This is a very basic subnet declaration.
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.20 192.168.1.100;
option routers 192.168.1.1;
}
[root@localhost dhcp]# service dhcpd restart
正在启动 dhcpd: [确定]
[root@localhost dhcp]# chkconfig dhcpd on
4、安装ftp服务并配置
[root@localhost /]# yum install -y tftp-server xinetd vsftpd
[root@localhost /]# vim /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no ####此处将原来的yes改为no
per_source = 11
cps = 100 2
flags = IPv4
}
[root@localhost /]# service xinetd start
正在启动 xinetd: [确定]
[root@localhost /]# chkconfig xinetd on
[root@localhost /]# service vsftpd start
为 vsftpd 启动 vsftpd: [确定]
[root@localhost /]# chkconfig vsftpd on
display boot.msg
menu background splash.jpg
menu title Welcome to CentOS 6.8!
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.1.11/ks/s.cfg #### ks配置文件存放位置
label vesa
menu label Install system with ^basic video driver
kernel vmlinuz
append initrd=initrd.img 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 -