author:JevonWei
版权声明:原创作品
- 192.168.198.134作为安装服务器,由httpd服务共享安装程序
- 192.168.198.134作为dhcp服务器,客户机获取IP
一、安装相应的服务程序包
yum -y install dhcp tftp-server syslinux vsftpd
chkconfig dhcpd on
service xinetd restart
chkconfig tftp on
service vsftpd start
chkconfig vsftpd on
iptables -F
setenforce 0
二、配置dhcp服务
cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf
vim /etc/dhcp/dhcpd.conf
subnet 192.168.198.0 netmask 255.255.255.0 {
range 192.168.198.10 192.168.198.100;
filename "pxelinux.0";
next-server 192.168.198.128;
}
service dhcpd start
三、配置yum安装源及应答文件
cd /var/ftp/pub/
mkdir ks
mv /root/anaconda-ks.cfg ks/centos6.cfg \复制系统中的应答文件到此目录共享
chmod a+r centos6.cfg
四、配置tftp共享目录
cd /var/lib/tftpboot
mkdir pxelinux.cfg
cp /mnt/isolinux/* .
mv isolinux.cfg pxelinux.cfg/default
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
vim /var/lib/tftpboot/pxelinux.cfg/default
五、客户端测试