Network configurations with minimal installation of Linux

Linux Network Configuration

Network Configuration for Minimal Linux Installation

A minimal installation of a Linux distribution, such as CentOS, RHEL, or Scientific Linux, is often the best approach. Fewer packages mean reduced vulnerability to attacks and lower resource overhead. However, you will need to adjust the network settings after the installation is complete.

For DHCP Configuration

  1. Open the network configuration file:
  2. sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
  3. Add or modify the following lines according to your network configuration:
  4. BOOTPROTO="dhcp"
    ONBOOT="yes"

After making these changes, the ifcfg-eth0 file should look like this:


DEVICE="eth0"
HWADDR="08:00:27:DB:77:F4"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="dhcp"

For Static IP Configuration

  1. Open the network configuration file:
  2. sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
  3. Add or modify the following lines to match your network settings:
  4. IPADDR=10.11.16.101
    BOOTPROTO=none
    NETMASK=255.255.255.0
    GATEWAY=10.11.16.1
    DNS1=10.11.16.2
    DNS2=10.11.16.3
    USERCTL=yes

After making these changes, the ifcfg-eth0 file should look like this:


DEVICE="eth0"
HWADDR="08:00:27:DB:77:F4"
NM_CONTROLLED="yes"
ONBOOT="yes"
IPADDR=10.11.16.101
BOOTPROTO=none
NETMASK=255.255.255.0
GATEWAY=10.11.16.1
DNS1=10.11.16.2
DNS2=10.11.16.3
USERCTL=yes

Comments

Popular posts from this blog

Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

Using a Self signed Certificate to Run Apache2 under SSL

How to Efficiently Handle Sparse Files with tar