Minimal Fedora 16
October 4, 2011 3 Comments
In an attempt to use Fedora as a minimal server installation, I started with Fedora 16 beta. Download the installation DVD and during installation when it asks for the type of system choose “Minimal”. This will not install any GUI and give you CLI (command line interface) access only.
Fedora 16 uses systemd instead of Upstart to manage services. So there are a few things you need to know.
chkconfig doe not work as it previously did. For example, doing
chkconfig --list only shows those services that have not been migrated from SysV configuration to systemd configuration.
I believe the good old
service service-name status|start|stop|restart also no longer applies. Instead, you have to use the systemd command
For more information, read up on systemd.
I have found, through some 60 minutes of experimentation, that having NetworkManager installed will make life very easy to manage network connections on the minimal Fedora server. The secret is to know which files to edit and which to leave as they are.
To install NetworkManager, run the command
sudo yum install NetworkManager. This will give you the ability to use the
nmcli command, which is the CLI for NetworkManager. However,
nmcli wasn’t very useful to manage a network interface. Instead, the good old
sudo ifdown eth0,
sudo ifup eth0, and
ip addr show commands worked well.
To enable NetworkManager and start it, you have to use systemd.
sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service
But why do we need NetworkManager (NM) if the standard commands work? I felt the need for NM because the interface would not start at boot, even if the ONBOOT=”yes” option was provided to ifcfg-eth0 file. Having NM installed and controlling the interface made the network interface start right after boot.
The files you can change when using NM are /etc/sysconfig/network and those in the directory /etc/sysconfig/network-scripts/ such as any file with the name like ifcfg-eth0. The file /etc/resolv.conf has comments in it that NM generates the file so I recommend to leave it be.
My /etc/sysconfig/network contains the following:
NETWORKING=yes HOSTNAME=localhost.localdomain GATEWAY=192.168.1.1
My /etc/sysconfig/network-scripts/ifcfg-eth0 contains the following for DHCP. I have replaced HWADDR and UUID with dummy data to protect the innocent.
HWADDR="00:00:00:00:00:00" PEERROUTES="yes" IPV6INIT="no" UUID="12345678-1234-abcd-efgh-123456789abc" DEFROUTE="yes" PEERDNS="yes" IPV4_FAILURE_FATAL="no" NM_CONTROLLED="yes" BOOTPROTO="dhcp" DEVICE="eth0" TYPE="Ethernet" ONBOOT="yes" NAME="System eth0"
My /etc/sysconfig/network-scripts/ifcfg-eth0 contains the following for static IP:
HWADDR="00:00:00:00:00:00" PEERROUTES="yes" IPV6INIT="no" UUID="12345678-1234-abcd-efgh-123456789abc" DEFROUTE="yes" PEERDNS="yes" IPV4_FAILURE_FATAL="no" NM_CONTROLLED="yes" BOOTPROTO="static" IPADDR="192.168.1.123" NETMASK="255.255.255.0" DNS1="184.108.40.206" DNS2="220.127.116.11" DEVICE="eth0" TYPE="Ethernet" ONBOOT="yes" NAME="System eth0"
I noticed that a minimal installation didn’t include Presto, which has the ability to only download deltas for updates, saving bandwidth. To install it, run the following command:
sudo yum install yum-presto
Once you have setup networking properly, half of your work is already done. Following this post, you get a taste of using systemd and NM from CLI. As I discover more things that can help others, I’ll update this post. For the other half of things, they (should) work as they usually did.