KICKSTART unattended installation and kickstart Unattended Installation

Source: Internet
Author: User

KICKSTART unattended installation and kickstart Unattended Installation
Kickstart deployment

 

1.1 kickstart)

 

1.1.2 specific kickstart process (figure)

1.2 kickstart unattended deployment 1.2.1 System Environment
System: CentOS 7.4ip: Internet: 10.0.0.202 Intranet: 172.16.1.202
1.2.2 install and configure dhcp

# Installing dhcp

Yum-y install dhcp

# Compile a configuration file

Cat>/etc/dhcp/dhcpd. conf <EOF

Subnet 172.16.1.0 netmask 255.255.255.0 {

Range 172.16.1.100 172.16.1.199;

Option subnet-mask limit 255.0;

Default-lease-time 21600;

Max-lease-time 43200;

Next-server 172.16.1.201;

Filename "/pxelinux.0 ";

}

EOF

# Start the service

Systemctl start dhcpd

 

1.2.3 install and configure tftp
# Installation and startup
Yum-y install tftp-serversystemctl start tftp. socket # Put pxelinux.0 to/var/lib/tftpboot/yum-y install syslinuxcp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

 

1.2.4 install and configure http Services

# Install httpd

Yum-y install httpd

Systemctl start httpd. service

# Mount the image to the site directory

Mkdir-p/var/www/html/CentOS7

Mount/dev/cdrom/var/www/html/CentOS7

 

# Move the file to/var/lib/tftpboot/

Cp-a/var/www/html/CentOS7/isolinux/*/var/lib/tftpboot/

Mkdir-p/var/lib/tftpboot/pxelinux. cfg

Cp/var/www/html/CentOS7/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/default

1.2.5 compile the default file 
Cat>/var/lib/tftpboot/pxelinux. cfg/default <EOFDefault ksprompt 0 label ks kernel vmlinuz # This address is the path to the CentOS7-ks.cfg append initrd = initrd. img ks = http: // 172.16.1.201/ks_config/CentOS7-ks.cfg. net. ifnames = 0 biosdevname = 0 ksdevice = eth1EOF

 

1.2.6 compile the ks. cfg file

In general, we need a lot of interactive operations with the server during the installation of the operating system. In order to reduce this interaction process, kickstart was born. To use kickstart, you only need to define a Kickstart automatic response configuration file ks in advance. cfg (usually stored on the Installation server), and let the installation program know the location of the configuration file. During the installation process, the installation program can read the installation configuration from the file by itself, in this way, human-computer interaction is avoided multiple times during the installation process, so as to achieve unattended automatic installation.

vim   http://172.16.1.201/ks_config/CentOS7-ks.cfg
Install # (inform the installer that this is a completely new installation, rather than upgrading upgrade .) Url -- url = http: // 172.16.1.201/CentOS7/# (image address) textlang en_US.UTF-8 # (character set) keyboard us # (SET system keyboard type) zerombr # (clear mbr boot information, system Boot configurations) bootloader -- location = mbr -- driveorder = sda -- append = "crashkernel = auto rhgb quiet" network -- bootproto = static -- device = eth0 -- gateway = 10.0.0.254 -- ip = 10.0.0.204 -- nameserver = 223.5.5 -- netmask = 255.255.0 -- activatenetwork -- bootproto = static -- device = eth1 -- ip = 172.16.1.204 -- netmask = 255.255.255.0 -- activatenetwork -- hostname = mask # network -- bootproto = dhcp -- device = eth1 -- onboot = yes -- noipv6 -- hostname = ciphertext -- utc Asia/Shanghaiauthconfig -- enableshadow -- passalgo = sha512rootpw -- iscrypted $6 $ encrypt/decrypt/clearpart -- all -- initlabelpart/boot -- fstype xfs -- size 1024 part swap -- size 1024 part/-- fstype xfs -- size 1 -- growfirstboot -- disableselinux -- disabledfirewall -- disabledlogging -- level = inforeboot % packages @ ^ minimal @ compat-libraries @ debugging @ developmenttreenmapsysstatlrzszdos2unixtelnetwgetvimbash-completion % end % postsystemctl disable postfix. service % end
1.3 installation demonstration

1.3.1. VMware creates a blank Virtual Machine (automatic detection and CentOS7 memory at least 2 GB)

1.3.2 click Start Virtual Machine. Now you can have tea and wait.

 

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.