The server environment used here is
Ubuntu Server 12.04
1, install the necessary software package
# apt-get Install System-config-kickstart dhcp3-server tftpd-hpa tftp-hpa debmrror
Install the configuration of VNC, and open a remote connection up, VNC configuration omitted
# System-config-kickstart
Pop-up above a graphical interface configuration window, after the configuration is complete, save the file to/var/www/ubuntu/, command for KS.CFG, to provide services to lay the foundation
Of course, you can also directly write Kikcstart files, is the same
2. Configure DHCP Service
root@node1:~# vim/etc/dhcp/dhcpd.conf
Subnet 1.0.0.0 netmask 255.0.0.0 {
range 1.1.1.210 1.1.1.253;
option routers 1.1.1.254;
Option Domain-name-servers 8.8.8.8;
Default-lease-time;
Max-lease-time 7200;
Next-server 1.1.1.1;
FileName "pxelinux.0"; Note The filename, here is the number 0
}
Be sure to pay attention to the file name specified above, and if you write incorrectly, the following error will occur
Start the DHCPD service with the following command
# DHCPD Start the DHCP service, and if there is a script, you can also use the script to start/etc/init.d/dhcp3-server start
Logs can be seen through/var/log/syslog
June 00:48:34 Node1 Dhcpd:dhcpoffer on 1.1.1.210 to 00:0c:29:31:95:8f (NODE20) via eth0 June
00:48:34 Node1 dhcpd : DHCPRequest for 1.1.1.210 (1.1.1.1) from 00:0c:29:31:95:8f (NODE20) via eth0-00:48:34 Node1-Dhcpd:dhcpack on
1.1.1.210 to 00:0c:29:31:95:8f (NODE20) via eth0 June 00:50:03 Node1 dhcpd:dhcprequest for
1.1.1.210 from 00:0c:29 : 31:95:8f (NODE20) via eth0