在虚拟机中,给CentOS设置静态IP地址

前端之家收集整理的这篇文章主要介绍了在虚拟机中,给CentOS设置静态IP地址前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

原文地址:https://lintut.com/how-to-configure-static-ip-address-on-centos-6-5-minimal/

How to configure static IP address on CentOS 6.5 minimal

By defaultCentOSminimalinstalldoes not come with pre-configure network. In this small tutorial i will explain how to set static ip address on CentOS 6.5 minimal.
First,need to edit the set up for the ethernet. Let’s start with editing this file:

  1. #vi/etc/sysconfig/network-scripts/ifcfg-eth0
  1. DEVICE=eth0
  2. HWADDR=1c:65:9d:93:fc:e1
  3. TYPE=Ethernet
  4. ONBOOT=yes
  5. BOOTPROTO=none
  6. IPV6INIT=no
  7. USERCTL=no
  8. NM_CONTROLLED=yes
  9. PEERDNS=yes
  10. IPADDR=192.168.0.101
  11. NETMASK=255.255.255.0

Now,configure default getaway:

  1. #vi/etc/sysconfig/network
  1. NETWORKING=yes
  2. HOSTNAME=centos6
  3. GATEWAY=192.168.0.1

猜你在找的CentOS相关文章