Search

My notebook

Month

January 2015

Set A Static IP On CentOS

1. Backup –

  • cp  /etc/sysconfig/network-scripts/ifcfg-eth0  /etc/sysconfig/network-scripts/ifcfg-eth0.bak
  • cp /etc/resolv.conf /etc/resolv.conf.backup

2. Change –

  • vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=”eth0″
BOOTPROTO=”static”
HWADDR=”xx:xx:xx:xx:xx:xx”
NM_CONTROLLED=”yes”
ONBOOT=”yes”
TYPE=”Ethernet”
IPADDR=192.168.1.2
NETMASK=255.255.255.0

IPv4

  • IP address: 192.168.0.100
  • Subnet: 255.255.255.0
  • Gateway: 192.168.0.1

IPv-6

  • IP address: 2001:db8::c0ca:1eaf
  • Netmask 64
  • Gateway 2001:db8::1ead:ed:beef

3. DNS

  • /etc/resolv.conf

search example.com
nameserver 8.8.8.8
nameserver 8.8.4.4

  • /etc/hosts

127.0.0.1 localhost
127.0.1.1 server1

  • service network restart
  • /etc/init.d/network restart

Activation Error: Code 0x8007232b

Click All Programs, click Accessories, and then right-click Command Prompt.

  1. Click Run as administrator.
  2. Enter: slmgr -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Blog at WordPress.com.

Up ↑