Setup Static IP Address On CentOS 6.52 min read
If you already installed CentOS 6.5 on your virtual machine. Now you can see can’t be get IP address from your dhcp server. Now you need to configure static ip address on your centos 6.5.
I have install CentOS 6.5 into my XEN server.
My installation RAM 2GB and HardDisk 50GB.
If your want to change your hostname.
[[email protected]:~]# vi /etc/hosts
Insert your choose-able host name. Open another file insert host name.
[[email protected]:~]# vi /etc/hostname
Configure static IP on centos 6.5. Make sure your machine connected on LAN eth0 or eth1. So you can setup static ip any LAN.
Open static ip config file via any editor.
[[email protected]:~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Insert below line then save config file and service restart.
DEVICE=eth0 HWADDR=C2:EE:64:E4:75:E2 TYPE=Ethernet UUID=45801e43-18d4-474b-8b4f-0c365ef520fd ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=10.20.40.80 NETMASK=255.255.0.0 GATEWAY=10.20.40.1 DNS1=220.127.116.11
Then run restart command
[[email protected]:~]# service network restart
Test your internet connection.
[[email protected]:~]# ping 18.104.22.168
You can see all ping is ok.
If you can’t enable ping then open resolv.conf file insert google public name sever.
[[email protected]:~]# vi /etc/resolv.conf
Again test ping.
- How To Install Jitsi Own Server For Video Conference On Ubuntu 20.04 - November 16, 2020
- Private Cloud Setup Step By Step Using Apache Cloud Stack - September 19, 2020
- How To Install Zabbix 5.0 On Centos 8 - September 13, 2020
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!