Linux note 2-1 automatic installation system

Source: Internet
Author: User
Tags change settings

1. Automatic Installation system *******

# # 1. Kickstart Script # #
Kickstart script is the automatic answer system in the installation process all the problems
This file enables automatic installation of the system
After the system is installed, it will be generated in the root home directory of the system.
Anaconda-ks.cfg This file is the kickstart script generated by this system as a template

# # 2.kickstart Script production # # in the virtual machine
It's hard to write kickstart manually.
The Systm-config-kickstart tool in the system can be made graphically kickstart

The production process is as follows:

Configure the Environment:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/89/7A/wKiom1gUi2OjM0SxAADF8BO8TT4375.png "title=" capture. PNG "alt=" Wkiom1gui2ojm0sxaadf8bo8tt4375.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/89/7A/wKiom1gUi2TjOFdUAABSBNj5gYw360.png "style=" float: none; "Title=" Captures 1. PNG "alt=" Wkiom1gui2tjofduaabsbnj5gyw360.png "/>

Install graphics tools: Yum install system-config-kickstart-y 650) this.width=650; "Src=" http://s5.51cto.com/wyfs02/M02/ 89/77/wkiol1gui2xrh41saab1olyck-m919.png "title=" Capture 2. PNG "style=" Float:none; "alt=" Wkiol1gui2xrh41saab1olyck-m919.png "/>


Open Graphics KS Authoring tool: System-config-kickstart

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/77/wKioL1gUi2aDUoslAAAm_-vIJZw509.png "style=" float: none; "Title=" Captures 3. PNG "alt=" Wkiol1gui2aduoslaaam_-vijzw509.png "/>

Start Making:

Basic Configuration

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/7A/wKiom1gUjT3jJhM-AAD3a93Uz5o974.png "title=" capture. PNG "alt=" Wkiom1gujt3jjhm-aad3a93uz5o974.png "/>

Installation method

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/7A/wKiom1gUjQPRtC-KAAC7JvZhU1g093.png "style=" float: none; "title=" 1.PNG "alt=" Wkiom1gujqprtc-kaac7jvzhu1g093.png "/>

Boot loader selection

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/7A/wKiom1gUjQXT2s2MAADLc2qanqA834.png "style=" float: none; "title=" 2.PNG "alt=" Wkiom1gujqxt2s2maadlc2qanqa834.png "/>

Partition

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/78/wKioL1gUjQbwKoc3AADVjEMeC58485.png "style=" float: none; "title=" 3.PNG "alt=" Wkiol1gujqbwkoc3aadvjemec58485.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/7A/wKiom1gUjQfS4weuAACWufrR7YY183.png "style=" float: none; "title=" 4.PNG "alt=" Wkiom1gujqfs4weuaacwufrr7yy183.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/89/78/wKioL1gUjQjwZOpBAACVEU_7Y-w592.png "style=" float: none; "title=" 5.PNG "alt=" Wkiol1gujqjwzopbaacveu_7y-w592.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/78/wKioL1gUjQmTKUVuAACSP-1Ew2w431.png "style=" float: none; "title=" 6.PNG "alt=" Wkiol1gujqmtkuvuaacsp-1ew2w431.png "/>

Network configuration

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/7A/wKiom1gUjQrCFMf_AADCizzIqBY050.png "style=" float: none; "title=" 7.PNG "alt=" Wkiom1gujqrcfmf_aadcizziqby050.png "/>

Firewall configuration

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/78/wKioL1gUjQuzcjExAACdJ02eJfM333.png "style=" float: none; "title=" 8.PNG "alt=" Wkiol1gujquzcjexaacdj02ejfm333.png "/>

Other options that do not change, follow the default

Save

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/7A/wKiom1gUjQyjU7x8AADLRs-6UZI724.png "style=" float: none; "title=" 9.PNG "alt=" Wkiom1gujqyju7x8aadlrs-6uzi724.png "/>

Vim Open File

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/78/wKioL1gUjQ7zmOIsAAAnF432Zpk473.png "style=" float: none; "title=" 11.PNG "alt=" Wkiol1gujq7zmoisaaanf432zpk473.png "/>

File last Add install package

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/7A/wKiom1gUjQ2AMymoAACr0RlilCA942.png "style=" float: none; "title=" 10.PNG "alt=" Wkiom1gujq2amymoaacr0rlilca942.png "/>

So our KS file is ready to be made.


Detection KS Syntax:ksvalidator ks.cfg 650) this.width=650; src= http://s3.51cto.com/wyfs02/M02/89/78/ Wkiol1gujq6tq0v2aaaukzoeuqa947.png "title=" 12.PNG "style=" Float:none; "alt=" wkiol1gujq6tq0v2aaaukzoeuqa947.png "/ >

# 3.kickstart File Share # # in the virtual machine

Installing Httpd:yum Install Httpd-y

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/78/wKioL1gUj9mxRXx4AAA437LW_Bs804.png "style=" float: none; "title=" 1.PNG "alt=" Wkiol1guj9mxrxx4aaa437lw_bs804.png "/>
Setup service: Systemctl stop Firewalld.service
Systemctl Disable Firewalld.service
Systemctl Start httpd
systemctl Enable httpd

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/7A/wKiom1gUj96zDze0AABlwBYSgsM285.png "style=" float: none; "title=" 2.PNG "alt=" Wkiom1guj96zdze0aablwbysgsm285.png "/>
Move the KS file to/var/www/html so that other hosts can access this file

CP ks.cfg/var/www/html
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/7A/wKiom1gUj9-BMCW_AAAd23Ibtqc856.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1guj9-bmcw_aaad23ibtqc856.png "/>

# 4. Test KS File # # in the real machine

Installing virtual machines from the network
A. Graphics detection

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/7A/wKiom1gUkIbSK_MSAABeWFrK3zc511.png "style=" float: none; "title=" 1.PNG "alt=" Wkiom1gukibsk_msaabewfrk3zc511.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/89/7A/wKiom1gUkIehEnJkAABby9nKBAA592.png "style=" float: none; "title=" 2.PNG "alt=" Wkiom1gukiehenjkaabby9nkbaa592.png "/>

We can see our kstest mainframe in virtual device management.

Other options follow the default

B. Command detection

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/7A/wKiom1gUkQiTANDXAABHRjr_xWk534.png "style=" float: none; "title=" 1.PNG "alt=" Wkiom1gukqitandxaabhrjr_xwk534.png "/>


C. Script Detection

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/78/wKioL1gUkRyTFmZxAAAxJ39ZdTs353.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1gukrytfmzxaaaxj39zdts353.png "/>


# # Attach. PXE Network installation Service # #
1. Corresponding Software Installation virtual machines
Installation Services: Yum install DHCP tftp-server syslinux httpd-y

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/7A/wKiom1gUkqbTX-rlAAAakE_95WA505.png "style=" float: none; "title=" 2.PNG "alt=" Wkiom1gukqbtx-rlaaaake_95wa505.png "/>

Shutting down the firewall

Systemctl Stop Firewalld.service

Prohibit firewall
Syystemctl Disable Firewalld.service

Vim opens the Super service configuration file
VIM/ETC/XINETD.D/TFTP650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/89/7A/ Wkiom1gukqja3vy9aaa5g3cn800285.png "title=" 3.PNG "style=" Float:none; "alt=" wkiom1gukqja3vy9aaa5g3cn800285.png "/ >

Change settings
[disable = yes] ===> [disable = no]

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/78/wKioL1gUkqnjthhmAABK6y73F7Q455.png "style=" float: none; "title=" 4.PNG "alt=" Wkiol1gukqnjthhmaabk6y73f7q455.png "/>

set service
Systemctl Restart httpd
systemctl start httpd
systemctl enable httpd
650) this.width=650; "Src=" http://s1.51cto.com/wyfs02/M00/89/7A/ Wkiom1gukqrdscloaaa-2pv9ybs559.png "title=" 5.PNG "style=" Float:none; "alt=" wkiom1gukqrdscloaaa-2pv9ybs559.png "/ >

2. Must download and copy files virtual machines
cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

Copy all isolinux/* from the installation image to/var/lib/tftpboot

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/78/wKioL1gUlpfynpsjAAA48HHSJHA438.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1gulpfynpsjaaa48hhsjha438.png "/>

Mkdir/var/lib/tftpboot/pxelinux.cfg

Cp/var/lib/tftpboot/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/7B/wKiom1gUlxGDWcLbAABDnoN4Lik390.png "title=" 2.PNG " alt= "Wkiom1gulxgdwclbaabdnon4lik390.png"/>

configuration of the 3.DHCPD service Virtual Machines

Copy dhcpd configuration template to/etc/dhcp/dhcpd.conf

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/89/78/wKioL1gUl9rQ_NztAAAnrFd2z8k748.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1gul9rq_nztaaanrfd2z8k748.png "/>

Configuration file, and then restart the DHCPD service

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/78/wKioL1gUl9zgjNt5AABe0gJ2-hY495.png "title=" 5.PNG " Style= "Float:none;" alt= "Wkiol1gul9zgjnt5aabe0gj2-hy495.png"/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/7B/wKiom1gUl9uRzmgcAABEJAHym1Q389.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1gul9urzmgcaabejahym1q389.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/7B/wKiom1gUl9vBu_nCAABIrz9c7QI580.png "style=" float: none; "title=" 4.PNG "alt=" Wkiom1gul9vbu_ncaabirz9c7qi580.png "/>


4. Testing in the real machine

Installing virtual machines from a network boot in a real machine

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/78/wKioL1gUmO6D22RnAADGbcnaVU8914.png "style=" float: none; "Title=" 1PNG. PNG "alt=" Wkiol1gumo6d22rnaadgbcnavu8914.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/7B/wKiom1gUmO6zxVSkAABQ7Mjrq1Y060.png "style=" float: none; "title=" 2.PNG "alt=" Wkiom1gumo6zxvskaabq7mjrq1y060.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/78/wKioL1gUmO_jzqpDAAB_tIX20vE497.png "style=" float: none; "title=" 3.PNG "alt=" Wkiol1gumo_jzqpdaab_tix20ve497.png "/>


Appendix: Kickstart File Parameters

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/7B/wKiom1gUmkShaXCvAAuXAshmaLo507.png "title=" 1.PNG " alt= "Wkiom1gumkshaxcvaauxashmalo507.png"/>



Linux note 2-1 automatic installation system

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.