CentOS6.5(带图形安装)在使用过程中遇到的一些网络问题迷惑
比如,经常会遇到这样的问题**************************
[root@SourceCompiler local]# pwd
/usr/local
[root@SourceCompiler local]# ping www.baidu.com
ping: unknown host www.baidu.com
[root@SourceCompiler local]#
习惯做法是,
[root@SourceCompiler local]# 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
一般,我们会这样的,但是发现带图形界面安装的CentOS6.5,会在每次开机,会自动清除掉/etc/resolv.conf,所追加的内容,为此。
CentOS 6.5静态IP的设置(NAT和桥接都适用)
解决办法:
[root@SourceCompiler local]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DNS1=192.168.80.2 //这个第一,很重要!!!自己的网关
DNS2=8.8.8.8
DNS3=114.114.114.114
DNS4=223.5.5.5
如下图

重启网卡,service network restart
ok。
[root@SourceCompiler local]# service network restart
Shutting down interface eth0: Device state: 3 (disconnected)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
[ OK ]
[root@SourceCompiler local]# ping www.baidu.com
PING www.a.shifen.com (111.13.100.92) 56(84) bytes of data.
64 bytes from 111.13.100.92: icmp_seq=1 ttl=128 time=55.1 ms
64 bytes from 111.13.100.92: icmp_seq=2 ttl=128 time=55.1 ms
64 bytes from 111.13.100.92: icmp_seq=3 ttl=128 time=55.3 ms
^C
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2698ms
rtt min/avg/max/mdev = 55.159/55.240/55.388/0.104 ms
[root@SourceCompiler local]#
CentOS6.5(带图形安装)在使用过程中遇到的一些网络问题迷惑的更多相关文章
- Ubuntu11.10 带图形安装步骤详解
不多说,直接上干货! 成功! 关于Ubuntu的网络设置.静态IP设置,见 Ubuntukylin-14.04-desktop( 不带分区)安装步骤详解 Ubuntukylin-14.04-desk ...
- Linux系统CentOS6.2版本下安装JDK7详细过程
Linux系统CentOS6.2版本下安装JDK7详细过程 分类: Linux 2014-08-25 09:17 1933人阅读 评论(0) 收藏 举报 前言: java 是一种可以撰写 ...
- (转)CloudStack 安装及使用过程中常见问题汇总
CloudStack 安装及使用过程中常见问题汇总 在做工程项目中对CloudStack 安装及使用过程中常见的几个问题及如何解决做一个总结. 1.Windows XP虚拟 ...
- centos7安装Python3的过程中会和Python2.7版本冲突导致yum版本比对应,致使yum不能使用的问题。
centos7安装Python3的过程中会和Python2.7版本冲突导致yum版本比对应,致使yum不能使用的问题. 原因:yum调用Python,启动程/usr/bin/yum就是一个python ...
- Office2007在安装、卸载过程中出错的解决办法
Micorsoft office professional plus 2007在安装过程中出错,错误1706 如果在安装OFFICE 2007的 时候,遇到“Microsoft Office 2007 ...
- 安装CouchbaseClient的过程中提示 Error 1935.An error occurred during the installation of assembly;Error:-1603 fatal error during installation
安装过程中提示报错 点击确定后 安装程序会接着回滚,又提示报错如下 Error 1935的解决方法是下载一个微软的补丁. http://support.microsoft.com/de ...
- Oracle 安装安全补丁过程中出现的问题
为Oracle安装安全补丁,首先在官网上下载相应版本的补丁. 根据官方文档的说明安装,但是在安装的过程中会出项各种各样的错误,这里仅仅把我遇到的记录下来,给大家提供参考. 首先按照官方文档安装. 在这 ...
- 安装python caffe过程中遇到的一些问题以及对应的解决方案
关于系统环境: Ubuntu 16.04 LTS cuda 8.0 cudnn 6.5 Anaconda3 编译pycaffe之前需要配置文件Makefile.config ## Refer to h ...
- 我在MySQL免安装版使用过程中遇到的问题记录
我的MySQL版本为:mysql-5.7.16-winx64 安装时间为:2016年5月10号 由于是免安装版,下载好压缩文件之后解压到特定目录下,再打开命令行运行几行命令即可. 在一次操作中,发现无 ...
随机推荐
- 浅析JavaScript引用类型之--Object、Array
1.Object类型 对象是某个特定引用类型的实例,新对象有两种创建方式: i.使用new操作符调用构造函数来创建. var person = new Object(); person.name = ...
- 结构体 lock_t;
typedef struct lock_struct lock_t; //利用typedef定义一个变量的类型 /** Lock struct */ struct lock_struct { trx_ ...
- source idea of Unit
After the construction of Global environment setting code, there is a convenient way for us in the f ...
- iOS XMPP Framework 中文概述
本篇文章翻译XMPP Framework中的Overview of the XMPP Framework部分 介绍 The framework is divided into 2 parts: 1. ...
- js解决快速回车重复订单提交(客户端方式)
Html代码: <form action="order_add_data.php" method="post" name="order_adds ...
- ubuntu下安装Matlab
(注:本文部分内容转自互联网) 一. 安装程序Step 1:下载matlab的安装文件至主目录下,讲matlab文件重命名为Mathworks.Matlab.R2012a.Unix.isoStep 2 ...
- css overflow:hidden无效解决办法
解决方案:只需要在设定overflow:hidden层加入定位即可 position:relative;left:0px;top:0px
- distinguish and differentiate
According to Cambridge Dictionary distinguish:to recognize or understand the difference between two ...
- poj 3270(置换群)
题意:给定n头母牛的脾气大小,然后让你通过交换任意两头母牛的位置使得最后的母牛序列的脾气值从小到大,交换两头母牛的代价是两个脾气之和,使得代价最小. 分析:以前做过一道题,只有一个地方和这道题不同,但 ...
- EhCache 分布式缓存/缓存集群
开发环境: System:Windows JavaEE Server:tomcat5.0.2.8.tomcat6 JavaSDK: jdk6+ IDE:eclipse.MyEclipse 6.6 开发 ...