二、具体安装过程:
说明:server IP:192.168.9.20 linux版本:centos 5.2
1、安装tftp 服务器 和dhcp服务器:
root@centos CentOS]# rpm -qa |grep tftp tftp-server-0.42-3.1.el5.centos [root@centos CentOS]# rpm -qa |grep dhcp dhcpv6-client-1.0.10-4.el5 dhcp-3.0.5-13.el5
目的是确保客户端能够正常获取到ip地址和pxelinux.0文件。
2:修改tftp参数:
[root@centos CentOS]# vi /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 = yes / 改成no / per_source = 11 cps = 100 2 flags = IPv4 } …………………………………………………………………………………………
/tftpboot 这个参数主要是指定tftp client 客户端从服务器的哪个目录去加载bootloader的pxelinux.0文件。
3:启动tftp:
[root@centos CentOS]# service xinetd restart Stopping xinetd: [FAILED] Starting xinetd: [ OK ]
4:安装dhcpd服务并配置启动:
[root@centos ~]# vi /etc/dhcpd.conf ddns-update-style interim; ignore client-updates; boot bootp; subnet 192.168.9.0 netmask 255.255.255.0 { /分配给client端的ip地址/ option routers 192.168.9.1; option subnet-mask 255.255.255.0; option domain-name "domain.org"; option domain-name-servers 202.96.128.66; option time-offset -18000; range dynamic-bootp 192.168.99.2 192.168.9.100; /用来指定tftp根目录的启动文件实际是在/tftpboot目录下。/ default-lease-time 21600; max-lease-time 43200; next-server 192.168.9.20; /这一句是告诉client从哪里加载bootloade/r}