Post installation

CentOS minimal install does not come with pre-configure network option, here is a sample after installation.

DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:0c:29:c5:d1:b0"
NM_CONTROLLED="yes"
ONBOOT="no"
TYPE="Ethernet"

There are two methods

1) Manually edit network configuration file: vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0c:29:c5:d1:b0"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=192.168.100.22
NETMASK=255.255.255.0

Configure default gateway

vi /etc/sysconfig/network

GATEWAY=192.168.100.1

Configure DNS server

vi /etc/resolv.conf

nameserver 192.168.100.1

Restart network service

/etc/init.d/network restart

2) Use system-config-network-tui command

vi /etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT=yes

/etc/init.d/network restart

  • Install the required packages: yum install setuptool system-config-network-tui
  • Set up static IP address using the command: setup or system-config-network-tui

Sample after configuration

DEVICE=eth0
HWADDR=00:0c:29:c5:d1:b0
TYPE=Ethernet
UUID=3309f090-b642-4997-9c22-c89fc2cc02aa
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.100.22
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
DNS1=192.168.100.1
USERCTL=no
PEERDNS=no
IPV6INIT=no
  • Edit host file: vi /etc/hosts
  • Update the system: yum update
  • For virtual machines install vmware-tools:
mount VMware Tools Installer CDROM
mount /mnt/cdrom /media
cp /media/VMwareTools-10.1.0-4449150.tar.gz /root
cd /root
tar zxvf VMwareTools-10.1.0-4449150.tar.gz
cd vmware-tools-distrib
./vmware-install.pl --default
  • Install sysstat: yum install sysstat

Change the interval to 1 minute

vi /etc/cron.d/sysstat

*/1 * * * * root /usr/lib64/sa/sa1 1 1
  • Start IPtables firewall

chkconfig iptables on && service iptables start

For RHEL > 6.6 version of minimal installation run the these two additional steps

yum install system-config-firewall-base

lokkit --default=server

  • Disabling IPv6
  1. Disable the module

vi /etc/modprobe.d/ipv6.conf

options ipv6 disable=1
  1. Disable iptables for IPv6

chkconfig ip6tables off

  1. Remove the entry from /etc/hosts

sed -i 's/^[[:space:]]*::/#::/' /etc/hosts

  1. Disable NFS for IPv6 - change the "v" in the third column to "-"(hyphen/dash)

vi /etc/netconfig

  • Disable Selinux: vi /etc/sysconfig/selinux
SELINUX=disabled