Configure PXE + Kickstart + TFTP + DHCP in Ubuntu to quickly deploy the Linux operating system

Source: Internet
Author: User
Here the Server environment is used UbuntuServer12.041, install the required software package # apt-getinstallsystem-config-kickstartdhcp3-servertftpd-hpatftp-hpadebmrror installation configuration VNC, and open an account remote connection up, VNC configuration omitted # system-config-kickstart pop-up

The Server environment used here is

Ubuntu Server 12.04

1. Install the required software package

# Apt-get install system-config-kickstart dhcp3-server tftpd-hpa tftp-hpa debmrror

Install and configure VNC, and connect to the Remote Account. The VNC configuration is omitted.

# System-config-kickstart

The above graphic interface configuration window is displayed. After the configuration is complete, save the file to/var/www/ubuntu/and run the command ks. cfg to lay the foundation for future service provision.

Of course, you can also directly write the Kikcstart file by yourself.

2. Configure the DHCP service

  1. Root @ node1 :~ # Vim/etc/dhcp/dhcpd. conf
  2. Subnet 1.0.0.0 netmask 255.0.0.0 {
  3. Range 1.1.1.210 1.1.1.253;
  4. Option routers 1.1.1.254;
  5. Option domain-name-servers 8.8.8.8;
  6. Default-lease-time 600;
  7. Max-lease-time 7200;
  8. Next-server 1.1.1.1;
  9. Filename "pxelinux.0"; // note the file name. The value is 0.
  10. }

Be sure to pay attention to the file name specified above. If an error is written, the following error will occur:

Run the following command to start the dhcpd service:

# Dhcpd to start the dhcp service, if there is a script, you can also use the script to start/etc/init. d/dhcp3-server start

You can view logs through/var/log/syslog.

  1. Jul 18 00:48:34 node1 dhcpd: DHCPOFFER on 1.1.1.210 to 00: 0c: 29: 31: 95: 8f (node20) via eth0
  2. Jul 18 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
  3. Jul 18 00:48:34 node1 dhcpd: DHCPACK on 1.1.1.210 to 00: 0c: 29: 31: 95: 8f (node20) via eth0
  4. Jul 18 00:50:03 node1 dhcpd: DHCPREQUEST for 1.1.1.210 from 00: 0c: 29: 31: 95: 8f (node20) via eth0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.