CentOS 7: Kickstart Script

Basic CentOS 7 Kickstart installation script for setting up servers automatically.

To use, create a bootable disc containing the script below in the /isolinux directory and type linux ks=cdrom:/ks.cfg at the boot: prompt.

#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512

# Use CDROM installation media
# cdrom
# Use network installation
repo --name=base --baseurl=http://mirror.oss.ou.edu/centos/7.1.1503/isos/x86_64/
url --url="http://mirror.oss.ou.edu/centos/7.1.1503/isos/x86_64/"
# Run the Setup Agent on first boot
firstboot --enable
# Accept Eula
eula --agreed
# Reboot afer installing
reboot
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=enp0s3 --onboot=on--ipv6=auto
network  --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $YOUR_ROOT_PASSWORD_HASH_HERE
# System timezone
timezone America/Chicago --isUtc --ntpservers=0.centos.pool.ntp.org,1.centos.pool.ntp.org,2.centos.pool.ntp.org,3.centos.pool.ntp.org
user --name=USERNAME --password=$USER_PASSWORD_HASH_HERE --iscrypted --gecos="USERNAME"
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel

%packages
@core
kexec-tools
net-tools
wget

%end

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

%end

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *