In another post I described how to install CentOS 6 via a kickstart file (be sure to check out the “Kickstart Sample Configuration” section). CentOS 7 was recently released, and with that I needed to also use a kickstart configuration. However, simply using the previous kickstart configuration was not as easy as copy-and-paste (besides updating the release version in the repository configuration).
Summary of Kickstart Changes
There were a few changes that needed to be made for a base/core installation of CentOS 7:
- Include eula --agreed (read the documentation)
- Include services --enabled=NetworkManager,sshd (read the documentation)
- Update the install packages list ( %packages section)
- CentOS 7 is also a bit more strict with the kickstart file, so I had to explicitly include %end where applicable
- CentOS 7’s default file system is now xfs, in CentOS 6 it was ext4, so consider updating the automatic partitioning to use xfs
- Package groups @scalable-file-systems, @server-platform, @server-policy, and @system-admin-tools no longer exist – I haven’t located suitable replacements yet
- Things like ifconfig are no longer included by default (they are now deprecated), so if you need them be sure to include net-tools. You should be using ip by now anyway.
Kickstart Sample Configuration
And now, an updated kickstart config for CentOS 7, with consideration of the previously mentioned updates (compare it with the previous Kickstart Sample Configuration mentioned in the other post). I also chose to include some extra packages that don’t exist by default with a @core installation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
#version=RHEL7 install nfs --server=repo.hostname.tld --dir=/repo/centos/7/os/x86_64 lang en_US.UTF-8 keyboard --vckeymap=us --xlayouts='us' zerombr eula --agreed services --enabled=NetworkManager,sshd reboot # leaving network in here, but it'll be dhcp for now, make sure you have KVM access #network --onboot no --device eth0 --bootproto static --ip 172.16.0.254 --netmask 255.255.0.0 --gateway 172.16.1.1 --noipv6 --nameserver 172.16.0.2 --hostname new.hostname.tld rootpw --iscrypted DEFAULT_SALTED_ROOT_PASSWORD firewall --service=ssh auth --enableshadow --passalgo=sha512 selinux --enforcing timezone America/Phoenix --isUtc --ntpservers=0.centos.pool.ntp.org,1.centos.pool.ntp.org,2.centos.pool.ntp.org,3.centos.pool.ntp.org ### LVM bootloader --location=mbr --boot-drive=sda clearpart --all --drives=sda ignoredisk --only-use=sda part /boot --fstype="xfs" --ondisk=sda --size=256 part pv.01 --fstype="lvmpv" --ondisk=sda --grow --size=1 volgroup vg_main pv.01 logvol / --fstype="xfs" --name=lv_root --vgname=vg_main --grow --size=8192 logvol swap --fstype="swap" --name=lv_swap --vgname=vg_main --grow --size=4096 --maxsize=4096 %packages @core net-tools policycoreutils screen tree vim wget %end %post wget http://your.hostn.tld/scripts/c7/post-install.sh -O post-install.sh sh post-install.sh rm -f post-install.sh %end |
VMware Tools Change
If you’re like me and use ESXi, I’m currently on version 5.5 and 5.5u1, the installable tools for integrating with ESXi is a nice treat. However, the repository location has changed specifically for RHEL7, and so have the packages.
- The new repository location is at http://packages.vmware.com/packages/rhel7/x86_64/.
- The only package that needs to be installed is open-vm-tools.
- Note that the tools are currently only available for the x86_64 architecture, but I’m still including $basearch in the URL.
- The “packages” repo at packages.vmware.com does not include a GPG Key, but it is the same one from the older “tools” repo.
Add VMware Tools to YUM
Put the following repo configuration in /etc/yum.repos.d/vmware-tools.repo:
1 2 3 4 5 6 7 |
[vmwarec7] name=VMware Tools - $basearch baseurl=http://packages.vmware.com/packages/rhel7/$basearch/ gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub gpgcheck=1 protect=1 enabled=1 |
Then update yum and install the tools:
1 2 3 4 5 6 |
# clean yum's cache yum clean all # reload yum.repos.d yum check-update # install the package yum install open-vm-tools |