Chinaunix首页 | 论坛 | 博客
  • 博客访问: 14222
  • 博文数量: 11
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 95
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-04 14:07
个人简介

二流子linux 运维

文章分类

全部博文(11)

文章存档

2016年(11)

我的朋友

分类: LINUX

2016-03-29 13:29:55

ip地址配置文件 vi /etc/sysconfig/network-scripts/ifcfg-eth0

内容

DEVICE="eth0"

BOOTPROTO="static"

HWADDR="00:0C:29:96:08:F0"

IPADDR=192.168.1.151

NETMASK=255.255.255.0

GATEWAY=192.168.1.1

NM_CONTROLLED="yes"

ONBOOT="yes"

TYPE="Ethernet"

UUID="b2479135-8f5d-4633-b898-6155c4ef2650"

重启服务器 /etc/init.d/network restart



dns配置文件 vi /etc/resolv.conf


# Generated by NetworkManager



# No nameservers found; try putting DNS servers into your

# ifcfg files in /etc/sysconfig/network-scripts like so:

#

# DNS1=xxx.xxx.xxx.xxx

# DNS2=xxx.xxx.xxx.xxx

# DOMAIN=lab.foo.com bar.foo.com

nameserver 8.8.8.8


直接生效

阅读(257) | 评论(0) | 转发(0) |
0

上一篇:lnmp安装脚本

下一篇:vm tools linux安装

给主人留下些什么吧!~~