One way to install CentOS 7.2 using the Kickstart file

Source: Internet
Author: User

Use a CentOS 6/7 to do DHCP and HTTP servers

Install DNSMASQ, httpd, enable DHCP and HTTP services


Yum-y Install httpd DNSMASQ


Vi/etc/dnsmasq.conf

145 line: dhcp-range=x.x.x.x x.x.x.x, 12h


Start httpd and DNSMASQ services (temporarily disable iptables)

Ss-lntu viewing ports

HTTPD:TCP 80

DNSMASQ:TCP/UDP, UDP 67


Mkdir/var/www/http/ks

Place the Ks.cfg file in this directory with the following contents:

#version =devel
# System Authorization Information
# Install OS instead of upgrade
Install

# Use CDROM installation media
CDRom

# Use text mode install
Text

# Run The Setup Agent on first boot
Firstboot--enable
#ignoredisk--ONLY-USE=SDA

# Reboot after installation
Reboot

# Keyboard Layouts
Keyboard--vckeymap=us--xlayouts= ' US '

# System Language
Lang en_US. UTF-8

# SELinux Configuration
SELinux--disabled

# Firewall Configuration
Firewall--enabled--ssh

# Network Information
Network--bootproto=static--device=eth0--gateway=192.168.x.x--ip=192.168.x.x--nameserver=192.168.x.x--netmask= 255.255.255.0--noipv6--activate
Network--hostname=test

# System Authorization Information
Auth--enableshadow--passalgo=sha512
# Root Password
# on CentOS 6, using Grub-crypt--sha-512 to generate ROOTPW hash value
ROOTPW--iscrypted $6$ljdvgn7f4jf5cwhd$yubz557mrrucaqpsspunrtg1tekkplwrc6n6c8v/vlo/ycw.6g0vq6c/ x1mfnla73bmlaxwg9bctl3u5fjwrd/

# System Services
Services--disabled= "Chronyd"

# System TimeZone
TimeZone Asia/shanghai--ISUTC--NONTP

# System Bootloader Configuration
#bootloader--location=mbr--BOOT-DRIVE=SDA
Bootloader--LOCATION=MBR
Autopart--TYPE=LVM

# Clear the Master Boot Record
Zerombr

# Partition Clearing Information
Clearpart--all--initlabel

%packages
@^minimal
@core
Wget
Telnet
Net-tools

%end

%post
Sed-i ' S,quiet,quiet net.ifnames=0,g '/etc/default/grub
Grub2-mkconfig-o/boot/grub2/grub.cfg >/dev/null 2>&1
Sed-i ' S,utc,local,g '/etc/adjtime

Systemctl Disable Postfix

%end

%addon com_redhat_kdump--disable--reserve-mb= ' auto '

%end



Install CD to boot, press TAB at install CentOS 7 to insert the following parameters:

Net.ifnames=0 Linux Ks=http://webserver-ip/ks/ks.cfg

This article is from the "ilovecat (personal note)" blog, so be sure to keep this source http://hj192837.blog.51cto.com/655995/1790047

One way to install CentOS 7.2 using the Kickstart file

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.