KICSTART+PXE build an automated installation Linux tidied up a bit

Source: Internet
Author: User

Always want to take the way Yun notes to tidy up all of their own pro-test, first to this article:

Two-hour installation of 100 Linux system in fact, Winddows can do this just like the method component different principle of the next time in the package directly with Docker packaged into Imager git into the warehouse to go after it is not installed trouble!

Required Component Service Kickstart+pxe NFS+DHCP+TFTP+PXE

Key checks: (1) After all component configurations are complete, you must determine if a component service is started! Nfs+dhcp+tftp

The final step in the preparation of the Ks.cfg build Automation script must be installed Xmanager for Xshell start GUI components such as: KVM GUI management interface also need Xmanager

1: Install DHCP service

Yum Install Dhcp-y

Copy the configuration file and rename it

Cp/usr/share/doc/dhcp*/dhcpd.conf.sample/etc/dhcp/dhcpd.conf

Configuration: vim/etc/dhcp/dhcpd.conf The following is the configuration file contents

Option Domain-name-servers 202.106.0.20,202.106.46.151; Dns
Default-lease-time 600;
Max-lease-time 7200;
Ddns-update-style Interim; This has to be
authoritative;
Subnet 192.168.0.0 netmask 255.255.255.0 {//Declaration network Segment
Range 192.168.0.220 192.168.0.230; assigning address ranges
Option routers 192.168.0.1; Client Gateway
Option Subnet-mask 255.255.255.0; Subnet mask
Next-server 192.168.0.210; Specify the TFTP server address
FileName "/pxelinux.0"; Specifies the startup file (relative to the. /tftpboot path)
}

Key checks: (1)

The Dhcp-service server host must be statically configured to obtain an IP in the virtual subnet (DHCP--IP distribution protocol)

2, installation, installation configuration Tftp-server service.

Installation: Yum-y install Tftp-server (tftp managed by xinetd)

Configuration: Vim/etc/xinetd.d/tftp


Service TFTP
{
Socket_type = Dgram
protocol = UDP
Wait = yes
user = root
Server =/USR/SBIN/IN.TFTPD
Server_args =-U nobody-s/var/lib/tftpboot//Plus-u Nobody all people can use
Disable = no//original Yes changed to No for enabled meaning
Per_source = 11
CPS = 100 2
Flags = IPV4
}

Start TFTP

chmod 777/tftpboot Modify permissions for/tftpboot folder

Start Service xinetd Restart

To see if the TFTP service is turned on:
netstat-a | grep tftp
The result is UDP 0 0 *:tftp *:* indicates that the service is enabled and the TFTP configuration is successful


3, install Syslinux (in order to generate pxelinux.0 this file)

Installation: Yum-y Install Syslinux
Files in/usr/share/syslinux/pxelinux.0

4. Configuration

Copy the pxelinux.0 to the TFTP shared directory

cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

Mount the disc and copy all files in the Isolinux directory to the TFTP shared directory

Mount/dev/cdrom/mnt

cp/mnt/isolinux/*/var/lib/tftpboot/$$ cd/var/lib/tftpboot/

Create the Pxelinux.cfg directory and move the isolinux.cfg to the directory under Rename to default

mkdir pxelinux.cfg && mv/mnt/isolinux/isolinux.cfg pxelinux.cfg/default

5. Configure NFS Service (default already installed) there's a portmap on the Internet. This is no longer necessary, instead of Rpcbind

Yum install-y NFS

Vim/etc/exports//default is empty file

/mnt 192.168.0.0/24 (ro,sync)//ro read-only sharing, sync is shared in memory

Start NFS

Service NFS Start

-----------------------------------------------------------

6 using GUI to build the installation step script genetic ks.cfg install automation script

#安装

Yum-y Install System-config-kickstart

#启动

System-config-kickstart


-----------------------------------------------------------

1: Ride DHCP

2: Catch tftp

3: Ride NFS


7 Install, configure Kickstart for unattended installation.

First of all to have desktop environment support, because my system is minimal installed, so no desktop, we have to install the desktop (GNOME). The Desktop (GNOME) is supported by the X-window environment, and all the X-window are installed.
Yum Grouplist | Grep-i "X Window System" Yum grouplist | Grep-i Desktop

Although these two packages are displayed, they can be installed or not, and the Yum update should be performed first.
Installation: yum-y groupinstall "X window System"//Strict case sensitivity
Yum-y groupinstall "Desktop"//Strict case-sensitive
Yum-y Groupinstall "Chinese support"//install Chinese
Ok! We switch to the graphical interface to perform the next steps. Init 5
Installation: Yum-y Install System-config-kickstart
Start: System-config-kickstart//Enter Tool interface configuration


Click < file > Save to < file system > select Path/nfsinstall

Mkdir/nfsinstall

CP Ks.cfg/nfsinstall chmod 777 Ks.cfg

Vim/etc/exports

/nfsinstall 192.168.0.0/24 (RO,SRNC)//share/nfsinstall this directory

Edit the default file

Vim/var/lib/tftpboot/pxelinux.cfg/default


Join KS=NFS:192.168.0.210:/NFSINSTALL/KS.CFG

KICSTART+PXE build an automated installation Linux tidied up a bit

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.