Minimum CentOS / Fedora / RedHat installation
I have no doubt that the noble donors - Linux administrators - strive to minimize the set of packages installed on the server. It is more economical, safer and gives the administrator a sense of complete control and understanding of the processes.
Therefore, a typical scenario of the initial installation of the operating system looks like choosing the minimum option, and then filling it with the necessary packages.
However, the minimum option offered by the CentOS installer is not entirely minimal. There is a way to reduce the size of the initial installation of the system in a standard documented way.
Using the CentOS operating system in work, sooner or later you discover the automation of its installation using the Kickstart mechanism. I have not installed CentOS as a standard installer for a long time. During the work, a sufficient arsenal of configuration kickstart files has accumulated, allowing you to automatically deploy systems, including on LVM, crypto partitions, with a minimum GUI, etc.
And now, in one of the releases of the 7th version, RedHat added an amazing option to Kickstart, which allows to further minimize the image of the installed system:
The following is an example of a kickstart minimal installation file. The brave can exclude yum from it. Get ready for surprises:
I want to note that CentOS / RedHat is more loyal to Fedora in the interpretation of the option. The latter will so blanket the system that it will require re-installation with the addition of vital utilities.
As a bonus, I’ll give you a “spell” for installing a minimal graphical environment in CentOS / RedHat (version 7):
Both the minimal image of the operating system and the minimal graphical environment have been tested by me and work on real systems.
Therefore, a typical scenario of the initial installation of the operating system looks like choosing the minimum option, and then filling it with the necessary packages.
However, the minimum option offered by the CentOS installer is not entirely minimal. There is a way to reduce the size of the initial installation of the system in a standard documented way.
Using the CentOS operating system in work, sooner or later you discover the automation of its installation using the Kickstart mechanism. I have not installed CentOS as a standard installer for a long time. During the work, a sufficient arsenal of configuration kickstart files has accumulated, allowing you to automatically deploy systems, including on LVM, crypto partitions, with a minimum GUI, etc.
And now, in one of the releases of the 7th version, RedHat added an amazing option to Kickstart, which allows to further minimize the image of the installed system:
--nocoreRedHat honestly warns about the possible consequences of using this option, however, years of use by me in a real environment confirms its stability and applicability.
Disables installation of the Core package group which is otherwise always installed by default. Disabling the Core package group should be only used for creating lightweight containers; installing a desktop or server system with --nocore will result in an unusable system.
The following is an example of a kickstart minimal installation file. The brave can exclude yum from it. Get ready for surprises:
install
text
url --url="http://server/centos/7/os/x86_64/"
eula --agreed
firstboot --disable
keyboard --vckeymap=us --xlayouts='us'
lang en_US.UTF-8
timezone Africa/Abidjan
auth --enableshadow --passalgo=sha512
rootpw --plaintext ***
ignoredisk --only-use=sda
zerombr
bootloader --location=mbr
clearpart --all --initlabel
part /boot/efi --fstype="efi" --size=100 --fsoptions="umask=0077,shortname=winnt"
part / --fstype="ext4" --size=1 --grow
network --bootproto=dhcp --hostname=localhost --onboot=on --activate
#reboot
poweroff
%packages --nocore --nobase --excludedocs
yum
%end
%addon com_redhat_kdump --disable
%end
I want to note that CentOS / RedHat is more loyal to Fedora in the interpretation of the option. The latter will so blanket the system that it will require re-installation with the addition of vital utilities.
As a bonus, I’ll give you a “spell” for installing a minimal graphical environment in CentOS / RedHat (version 7):
yum -y groupinstall x11
yum -y install gnome-classic-session
systemctl set-default graphical.target
Both the minimal image of the operating system and the minimal graphical environment have been tested by me and work on real systems.