Last active
May 16, 2016 13:18
-
-
Save uyorum/cf5e8f60b1114c915ad925362e921c6e to your computer and use it in GitHub Desktop.
Kickstart for CentOS7 (Replace "rootpw" line)
This file contains 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 CentOS7 | |
# Use network installation | |
install | |
url --url=http://ftp.riken.jp/Linux/centos/7/os/x86_64 | |
text | |
firstboot --enable | |
ignoredisk --only-use=sda | |
keyboard --vckeymap=jp --xlayouts='jp' | |
lang en_US.UTF-8 | |
# Network configuration | |
network --bootproto=dhcp --ipv6=auto --activate | |
network --hostname=localhost.localdomain | |
# System configuration | |
rootpw --iscrypted `mkpasswd -m sha-512 -S saltsalt -s <<< PASSWORD` | |
auth --enableshadow --passalgo=sha512 | |
timezone Asia/Tokyo --isUtc --nontp | |
selinux --disabled | |
firewall --disabled | |
# Partition | |
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda | |
zerombr | |
clearpart --all | |
part /boot --fstype=xfs --size=200 --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=xfs --vgname=centos --size=1 --grow --name=root | |
reboot | |
%packages --nobase --ignoremissing | |
@core | |
wget | |
openssh-clients | |
open-vm-tools | |
%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 | |
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