[ root@localhost ~ ]#yum -y install tftp
[ 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
per_source = 11
cps = 1002
flags = IPv4
}
//修改上内容中的disable的yes改为No,表示开机启动
[ root@localhost ~ ]# sservice xinetd start
//启动xinetd
xinetd小介绍:
xinetd是超级守护进程,管理众多的进程,比如telnet服务。xinetd自己是一个sysv,它就像老板一样,自己常驻于内存,管理其它的进程,其它进程就相当于它的员工,在其它进程没有用时会睡眠,并不占用系统资源,当有工作时候老板xinetd会通知它的员工,唤醒某个进程来执行作业。这种方式适合于那些不是经常被人使用,不需要常驻内存的程序,但是此方式响应时间长,但是节省系统资源,方便管理。超级守护进程的配置文件是/etc/xinetd.conf,超级守护进程的子进程们存放在/etc/xinetd.d/目录下
[ root@localhost /var/www/html/ksdir ]#cat ks6.cfg # Kickstart file automatically generated by anaconda.#version=DEVEL
install
url --url=http://192.168.11.12/centos6/
#安装源
reboot
#安装后重启
zerombr
#清除mrb表
text
#字符界面安装
lang en_US.UTF-8#语言
keyboard us
#键盘布局
network --onboot yes --device eth0 --bootproto dhcp --noipv6
#网络设置,默认dhcp获取
rootpw --iscrypted $6$jxJPuR6OAo4mlJ0k$.L0GK24v5MchJX0c8k.jxIwOb7uDMegnNhYYrGh5Umf0FY.wVVR9f6lAgfokK/eFllDIR/ZTlsYiqN9taAatQ1
#root密码,已经加密
firewall --service=ssh
#防火墙
authconfig --enableshadow --passalgo=sha512
#身份验证
selinux --enforcing
#禁用selinux
timezone Asia/Shanghai
#时区
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"#引导信息# The following is the partition information you requested# Note that any partitions you deleted are not expressed# here so unless you clear all partitions first, this is# not guaranteed to work
clearpart --all
#清理分区表
part /boot --fstype=ext4 --size=1000
part / --fstype=ext4 --size=50000
part /software --fstype=ext4 --size=10000
part swap --size=2048#以上四项磁盘分区
%packages
@core
@server-policy
@workstation-policy
%end
#一些包和软件
[ root@localhost /var/lib/tftpboot/pxelinux.cfg ]#vim default
default vesamenu.c32
#prompt 1
timeout 600
menu title Welcome to CentOS 6.9!
label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img ks=http://192.168.11.12/ksdir/ks6.cfg
label local
menu label Boot from ^local drive
localboot 0xffff
#这里我就简单改下了。