Setting up IP in CentOS

Editing the file:

[[email protected] ~]# nano / etc / sysconfig / network-scripts / ifcfg-eth0

Content:

DEVICE = eth0BOOTPROTO = staticHWADDR = 00: 01: 02: 03: 04: 05ONBOOT = yesDHCP_HOSTNAME = hostname.my.domainIPADDR = Your.IP.addressNETMASK = 255.255.255.0GATEWAY = IP.address.Gateway TYPE = Ethernet

We restart the service

[[email protected] ~]# service network restart

Sidebar