zyuzuguldu
1/26/2015 - 12:50 PM

Linux Network Configurations.sh

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

ONBOOT=yes
BOOTPROTO=static
NAME="System eth0"
IPADDR=10.1.35.132
NETMASK=255.255.255.0


## Configure Default Gateway
#
# vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=hdp.demo
GATEWAY=192.168.1.1
NETWORKING_IPV6=yes


## Restart Network Interface
#

/etc/init.d/network restart

## Configure DNS Server
#
# vi /etc/resolv.conf

nameserver 8.8.8.8      # Replace with your nameserver ip
nameserver 192.168.1.1  # Replace with your nameserver ip

## Configure hosts for The fully qualified domain name (FQDN)
#
# vi /etc/hosts
10.1.35.132 hdp.demo