首先安装所需要包
yum -y install httpd*tftp-server system-config-kickstart dhcp syslinux
挂载WiLinux的DVD光盘,并复制第一张光盘下的所有内容(文件和文件夹)到到/var/wwwhtml/下cp –rf /mnt/cdrom/* /var/www/html/
配置dhcp服务
vi /etc/dhcp/dhcpd.conf
servicedhcpd restart
chkconfigdhcpd on
更改配置文件
1.#option domain-name-servers 10.0.0.1;
2.max-lease-time 7200;
3.authoritative;
4.
5.subnet 10.0.0.0 netmask 255.255.255.0 {
6. range 10.0.0.1 10.0.0.253;
7. next-server 10.0.0.8;
8. filename "pxelinux.0";
9. }
配置nfs服务器
vi /etc/exports
/os * (ro) 根据实际放ISO镜像目录
/tftpboot * (ro)
servicenfs restart
chkconfignfs on
配置tftp服务器
vi /etc/xinted.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 = 100 2
flags = IPv4
}
[root@shanker html]#
servicexinetd restart
chkconfigxinetd on
然后是system-config-kickstart图形界面下配置(如图1)
本次配置是NFS,所以选择NFS(如图2)
选择安装分区(如图3)
配置完成后,保存为ks.cfg文件
建立tftpboot文件夹,并把配置文件复制过去
进入tftpboot 文件夹没有就重建一个
#Cd /var/lib/tftpboot
#Mkdir/var/lib/tftpboot
mkdir /tftpboot
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot
3.cp/usr/share/syslinux/vesamenu.c32/var/lib/tftpboot
cd /var/www/html/p_w_picpath/pxeboot/
cp initrd.img var/lib/tftpboot
cp vmlinux /var/lib/tftpboot
cp /var/www/html/isolinux/*.msg var/lib/tftpboot
mkdir /tftpboot/pxelinux.cfg
cp /var/www/html/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
复制kickstart保存的文件到OS下
cp /ks.cfg /os
更改/tftpboot/pxelinux.cfg/deafault文件增加nfs目录
ks=nfs:192.168.1.221:/iso/ks.cfg
保存后即可添加新的设备网络安装