Build a Linux Kickstart Server

Source: Internet
Author: User


Build a Linux Kickstart Server

I. Introduction to Kickstart Technology
Kickstart is a technology that enables clients to automatically install without interaction after being guided by the pxe Nic.
Ii. Working Principle of Kickstart Installation
The client Nic supports PXE;
Www.2cto.com
The KickStart server must have the following services:
• The DHCP server is used to assign an ip address to the NIC of the client, and the location of the configuration file of tftp is indicated through dhcp;
• The TFTP server is used to send the boot program;
• Ks. cfg configuration file generated by KickStart
• A server that stores system installation files, such as NFS, HTTP, or FTP servers.
• Host to be installed with a PXE support Nic;
Note: NFS, DHCP, HTTP, and TFTP are all on the same server. The IP address is 192.168.123.75, and the network mask is 255.255.255.0.
Www.2cto.com
3. Configure the Kickstart Server
3.1 Network Environment Introduction
Kickstart Server IP Address
# Ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 14: 22: 1B: 84: 7C
Inet addr: 192.168.123.75 Bcast: 192.168.123.255 Mask: 255.255.255.0
Inet6 addr: fe80: 214: 22ff: fe1b: 847c/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 846405 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 56656 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 881954367 (841.0 MiB) TX bytes: 9781331 (9.3 MiB)
3.2 configure the NFS server to mount the CentOS iso Image
Create an iso directory structure
# Mkdir-p/backup/centosiso
Copy the iso file to the/backup/centosiso directory.
Configure the nfs exports file:
# Vi/etc/exports
/Backup/centosiso * (ro, sync)
Start the nfs Network Service:
# Chkconfig portmap on
# Chkconfig nfs on
# Service portmap start
Starting portmap: [OK]
# Service nfs start
Starting NFS services: [OK]
Starting NFS quotas: [OK]
Starting NFS daemon: [OK]
Starting NFS mountd: [OK]
3.3 configure the DHCP server to assign ip addresses to clients
Modify the configuration file dhcpd. conf as follows:
Ddns-update-style interim;
Allow booting;
Allow bootp;
Next-server 192.168.123.75;
Filename "pxelinux.0 ";

Subnet 192.168.123.0 netmask 255.255.255.0 {
Option routers 192.168.123.250;
Option subnet-mask limit 255.0;
Option domain-name-servers 192.168.123.100;
Option time-offset-18000; # Eastern Standard Time
Range dynamic-bootp 192.168.123.105 192.168.123.110;
Default-lease-time 21600; max-lease-time 43200;
}
Start the dhcpd Network Service:
# Chkconfig dhcpd on
# Service dhcpd start
Starting dhcpd: [OK]
3.4 create the configuration file ks. cfg for Kickstart
Kickstart configuration files are not provided by default in the system, but we can generate
First, install the system-config-kickstart installation package. You can use this command to create a kickstart file template.
# Yum install system-config-kickstart *
You can use system-config-kickstart on the GUI to configure your own customized kickstart file. [recommended]
In text mode, use # system-config-kickstart -- generate ks. cfg to generate a file named ks. cfg, which is the default kickstart file. Manual adjustment is required.
The steps for creating a graphical configuration are as follows:
1. Basic Configuration

2. Select ftp for installation. Do not enter any account. We use anonymous installation.

3. Boot installer options, which do not need to be changed

4. partition information, create three partitions

5. Nic configuration, either static or dhcp
6. Verify
7. Firewall
8. Display Configuration

9. Select a software package

You can use the default option for other options. Click "File" in the window to save the/root/ks. cfg File.
3.5. HTTP Server Configuration
# Cp/root/ks. cfg/var/www/html/
# Chmod 644/var/www/html/ks. cfg
# Chkconfig -- level 35 httpd on
Start the httpd server
/Etc/init. d/httpd start
Starting httpd: [OK]
3.6. TFTP Server Configuration
Install the tftp installation package
# Yum install tftp
Installed in the/tftpboot directory by default
# Cp/mnt/iso/isolinux. cfg/tftpboot/linux-install/pxelinux. cfg/default
# Vi default
Default centos6.3
Prompt 1
Timeout 15

Display boot. msg

Menu background splash.jpg
Menu title Welcome to CentOS 6.3!
Menu color border 0 # ffffffff #00000000
Menu color sel 7 # ffffffff # ff000000
Menu color title 0 # ffffffff #00000000
Menu color tabmsg 0 # ffffffff #00000000
Menu color unsel 0 # ffffffff #00000000
Menu color hotsel 0 # ff000000 # ffffffff
Menu color hotkey 7 # ffffffff # ff000000
Menu color scrollbar 0 # ffffffff #00000000

Label centos6.3
Menu label ^ Install or upgrade an existing system
Menu default
Kernel vmlinuz
Append initrd = initrd. img ks = http: // 192.168.123.75/ks. cfg
Start the tftp service
#/Etc/init. d/xinetd restart
Stopping xinetd: [OK]
Starting xinetd: [OK]
Iv. Client Configuration
Set the NIC device as the first boot device and enable the PXE function. After the machine can start from the network card and obtain the IP address, the system performs automatic installation. After the automatic installation is complete, disable the PXE function of the NIC and set the local hard disk as the first boot device.

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.