Skip to content

Instantly share code, notes, and snippets.

@xxjapp
Forked from fernandoaleman/Linux Static IP
Created June 1, 2017 16:09
Show Gist options
  • Save xxjapp/f80df1718b0c3f2047871fab900cf3f3 to your computer and use it in GitHub Desktop.
Save xxjapp/f80df1718b0c3f2047871fab900cf3f3 to your computer and use it in GitHub Desktop.
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.1.44
NETMASK=255.255.255.0
## Configure Default Gateway
#
# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos6
GATEWAY=192.168.1.1
## 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
@xxjapp
Copy link
Author

xxjapp commented Jul 26, 2017

Configure hosts

vi /etc/hosts

127.0.0.1       localhost
192.168.1.168   node1 wqcs6
192.168.1.168   namenode

@xxjapp
Copy link
Author

xxjapp commented Jul 26, 2017

ln -sf /home/hadoop/hbase/logs/hbase-hadoop-master-wqcs6.log master.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment