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号 由于是免安装版,下载好压缩文件之后解压到特定目录下,再打开命令行运行几行命令即可. 在一次操作中,发现无 ...
随机推荐
- php面试题整理
PHP经典面试题:(不断跟进补充中...) 1.用PHP打印出前一天的时间格式是2009-02-10 22:21:21(2分) echo date('Y-m-d H:i:s', strtotime(' ...
- cocos2dx 坐标系 -转
(原文出处找不到了) 无论是搞2d还是3d开发,最需要搞清楚的就是坐标系,这部分混乱的话就没啥奔头了.所以玩cocos2d,一上来就先把各种与坐标有关的东西搞清楚. 基本的两个坐标系:屏幕坐标系和GL ...
- Android uiautomator gradle build system
This will guide you through the steps to write your first uiautomator test using gradle as it build ...
- R语言AMORE包实现BP神经网络——German数据集
library(AMORE)data<-read.table('G:\\dataguru\\ML\\ML09\\基于BP网络的个人信贷信用评估\\基于BP网络的个人信贷信用评估\\german. ...
- 广义线性模型 GLM
Logistic Regression 同 Liner Regression 均属于广义线性模型,Liner Regression 假设 $y|x ; \theta$ 服从 Gaussian 分布,而 ...
- yaf框架流程二
这篇讲讲yaf的配置文件,首先上我的配置代码: [common] ;必选配置 ;application.directory String 应用的绝对目录路径 ;可选配置 ;名称 值类型 默认值 说明 ...
- 【英语】Bingo口语笔记(4) - Pick系列
take your pick. 你挑吧 pick on 找茬
- 2015-10-11 Sunday 晴 ARM学习
基础的知识看得差不多了,linux系统相关的,最主要是c语言基础知道,还有linux系统编程,网络编程socket等相关的.这些内容最最基础的看完了,接下来我在考虑看什么呢?是看ARM以及驱动编程系列 ...
- aspose.word 查找文本并加下划线
private Run SplitRun(Run run, int position) { Run beforeRun = (Run)run.Clone(true); beforeRun.Text = ...
- 跨平台移动开发工具:PhoneGap与Titanium全方位比拼
PhoneGap和Appcelerator Titanium,对于封装和配置移动应用程序而言,二者都是非常受欢迎的开源JavaScript框架.本文为Appcelerator开发者Kevin Whin ...