Last active
May 16, 2016 13:19
-
-
Save uyorum/2915df772da4995958ce826217b1a253 to your computer and use it in GitHub Desktop.
Kickstart for CentOS6 (Replace "rootpw" line)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kickstart file to install CentOS6 | |
install | |
url --url=http://ftp.riken.jp/Linux/centos/6/os/x86_64 | |
text | |
lang en_US.UTF-8 | |
keyboard jp106 | |
# Network configuration | |
network --onboot yes --device eth0 --bootproto dhcp --noipv6 | |
network --hostname=localhost.localdomain | |
# System configuration | |
rootpw --iscrypted `mkpasswd -m sha-512 -S saltsalt -s <<< PASSWORD` | |
firewall --disabled | |
authconfig --enableshadow --passalgo=sha512 | |
selinux --disabled | |
timezone --utc Asia/Tokyo | |
# Partition | |
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet" | |
zerombr | |
clearpart --all | |
part /boot --fstype=ext4 --size=100 --ondisk=sda --asprimary | |
part pv.1 --size=1 --grow --ondisk=sda | |
volgroup centos pv.1 | |
logvol swap --vgname=centos --size=2048 --name=swap | |
logvol / --fstype=ext4 --vgname=centos --size=1 --grow --name=root | |
reboot | |
%packages --nobase --ignoremissing | |
@core | |
wget | |
openssh-clients | |
%end | |
%post | |
mkdir /root/.ssh | |
wget https://github.com/uyorum.keys -O /root/.ssh/authorized_keys | |
chmod 0700 /root/.ssh | |
chmod 0600 /root/.ssh/authorized_keys | |
rpm -i https://packages.vmware.com/tools/esx/latest/repos/vmware-tools-repo-RHEL6-10.0.6-1.el6.x86_64.rpm | |
yum install -y vmware-tools-esx-nox | |
yum clean all | |
rm -f /tmp/* | |
rm -f /root/* | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment