Kickstart installing the CentOS 7 system in bulk

Source: Internet
Author: User

Environment Preparation: 10.0.0.7

=============pxe+kickstart

1.KS file ok

2.DHCP Server OK

3.TFTP Server OK file

4.HTTP Server (NFS, FTP) ok

5. Network card startup OK

6.YUM Warehouse Installation Source OK

Mount the disc image first: centos-7-x86_64-dvd-1503-01

[Email protected] ~]# mount/dev/cdrom/mnt

[email protected] ~]# Yum install-y httpd Createrepo

[Email protected] ~]# mkdir/var/www/html/centos-7.1-x86_64

[Email protected] ~]# cp-a/mnt/*/var/www/html/centos-7.1-x86_64/

[Email protected] ~]# createrepo-pdo/var/www/html/centos-7.1-x86_64//var/www/html/centos-7.1-x86_64/

[Email protected] ~]# createrepo-g ' ls/var/www/html/centos-7.1-x86_64/repodata/*-comps.xml '/var/www/html/ centos-7.1-x86_64/


[[email protected] ~]# yum install-y tftp-server DHCP xinetd

[Email protected] ~]# vim/etc/xinetd.d/tftp

Disable = no


[Email protected] ~]# CD/USR/SHARE/DOC/DHCP-4.1.1/

[email protected] dhcp-4.1.1]# CP dhcpd.conf.sample/etc/dhcp/dhcpd.conf

Subnet 10.0.0.0 netmask 255.255.255.0 {

Range DYNAMIC-BOOTP 10.0.0.100 10.0.0.200;

Option Subnet-mask 255.255.255.0;

Next-server 10.0.0.7;

FileName "pxelinux.0";

}


[[email protected] dhcp-4.1.1]#/ETC/INIT.D/DHCPD start

Starting dhcpd: [OK]

[[email protected] dhcp-4.1.1]#/etc/init.d/httpd start

Starting httpd:

[[email protected] dhcp-4.1.1]#/etc/init.d/xinetd start


Place the Kickstart file

[Email protected] ~]# Curl--head http://10.0.0.7/CentOS-7.1-x86_64/CentOS-7.1-x86_64.cfg


[email protected] ~]# Yum install-y syslinux

[Email protected] ~]# cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

[Email protected] ~]# cp/mnt/isolinux/*/var/lib/tftpboot/

[Email protected] ~]# mkdir/var/lib/tftpboot/pxelinux.cfg

[Email protected] centos-7.1-x86_64]# vim centos-7.1-x86_64.cfg

URL--url=http://10.0.0.7/centos-7.1-x86_64

[Email protected] ~]# cd/var/lib/tftpboot/pxelinux.cfg/

[[email protected] pxelinux.cfg]# cp/mnt/isolinux/isolinux.cfg default

[[email protected] pxelinux.cfg]# cat Default

Default Vesamenu.c32

Timeout 600


Display Boot.msg


# Clear The screen when exiting the menu, instead of leaving the menu displayed.

# for Vesamenu, this means the graphical background is still displayed without

# The menu itself for as long as the remains in graphics mode.

Menu Clear

Menu Background Splash.png

Menu Title CentOS 7

Menu Vshift 8

Menu Rows 18

Menu Margin 8

#menu Hidden

Menu Helpmsgrow 15

Menu Tabmsgrow 13


# Border Area

Menu Color Border * #00000000 #00000000 None


# Selected Item

Menu Color sel 0 #ffffffff #00000000 None


# Title Bar

Menu Color title 0 #ff7ba3d0 #00000000 None


# Press [TAB] Message

Menu Color tabmsg 0 #ff3a6496 #00000000 None


# unselected menu item

Menu Color Unsel 0 #84b8ffff #00000000 None


# Selected Hotkey

Menu Color Hotsel 0 #84b8ffff #00000000 None


# unselected Hotkey

Menu Color Hotkey 0 #ffffffff #00000000 None


# Help Text

Menu Color Help 0 #ffffffff #00000000 None


# A ScrollBar of some type? Not sure.

Menu Color scrollbar 0 #ffffffff #ff355594 None


# Timeout MSG

Menu Color Timeout 0 #ffffffff #00000000 None

Menu Color timeout_msg 0 #ffffffff #00000000 None


# Command Prompt Text

Menu Color Cmdmark 0 #84b8ffff #00000000 None

Menu Color CmdLine 0 #ffffffff #00000000 None


# do not display the actual menu unless the user presses a key. All this is displayed a timeout message.


Menu Tabmsg Press Tab for full configuration options on menu items.


Menu Separator # Insert an empty line

Menu Separator # Insert an empty line


Label KS

Menu Label ^auto Install CentOS 7

Kernel Vmlinuz

Append initrd=initrd.img ks=http://10.0.0.7/centos-7.1-x86_64/centos-7.1-x86_64.cfg


Label Linux

Menu Label ^install CentOS 7

Kernel Vmlinuz

Append initrd=initrd.img inst.stage2=hd:label=centos\x207\x20x86_64 quiet


Label check

Menu Label Test this ^media & install CentOS 7

Menu default

Kernel Vmlinuz

Append initrd=initrd.img inst.stage2=hd:label=centos\x207\x20x86_64 Rd.live.check quiet


Menu Separator # Insert an empty line


# Utilities Submenu

Menu Begin ^troubleshooting

Menu Title Troubleshooting


Label VESA

Menu Indent Count 5

Menu Label Install CentOS 7 in ^basic graphics mode

Text Help

Try This option out if you're having trouble installing

CentOS 7.

Endtext

Kernel Vmlinuz

Append initrd=initrd.img inst.stage2=hd:label=centos\x207\x20x86_64 xdriver=vesa nomodeset quiet


Label Rescue

Menu Indent Count 5

Menu Label ^rescue a CentOS system

Text Help

If the system won't boot, this lets you access files

and edit config files to try to get it booting again.

Endtext

Kernel Vmlinuz

Append initrd=initrd.img inst.stage2=hd:label=centos\x207\x20x86_64 Rescue quiet


Label Memtest

Menu Label Run a ^memory test

Text Help

If your system is has issues, a problem with your

System ' s memory May is the cause. Use this utility to

See if the memory is working correctly.

Endtext

Kernel memtest


Menu Separator # Insert an empty line


Label Local

Menu label Boot from ^local Drive

Localboot 0xFFFF


Menu Separator # Insert an empty line

Menu Separator # Insert an empty line


Label Returntomain

Menu Label Return to ^main menu

Menu exit


Menu End

Root Unixhot


This article is from the "Linux" blog, so be sure to keep this source http://chenjisong.blog.51cto.com/7858025/1718101

Kickstart installing the CentOS 7 system in bulk

Related Article

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.