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号 由于是免安装版,下载好压缩文件之后解压到特定目录下,再打开命令行运行几行命令即可. 在一次操作中,发现无 ...
随机推荐
- svn:revert to this version 和 revert changes from this version的区别
假设我们有许多个版本,版本号分别是1-10 如果我们在7这里选择revert to this version那么7之后的8,9,10的操作都会被消除 如果在7选择revert changes from ...
- Android实现自定义字体
介绍 最近在看开源项目的时候,发现里面涉及到了自定义字体,虽然自己目前还用不到,但是动手demo笔记记录一下还是有必要的,没准哪天需要到这个功能. 原理 1.其实实现起来非常简单,主要是用到了Type ...
- 使用.9.png报错 Exception raised during rendering
Exception raised during rendering: Index: 2, Size: 2Exception details are logged in Window > Show ...
- List排序的两种简便方式
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace List ...
- HDU 2602 (简单的01背包) Bone Collector
很标准的01背包问题 //#define LOCAL #include <algorithm> #include <cstdio> #include <cstring&g ...
- Windows 8获取开发者账户
使用PowerShell获取开发者账户,可以在本地调试Metro APP C:\PS> Show-WindowsDeveloperLicenseRegistration //安装licence ...
- urlrewrite 地址重写
环境: Maven 3.0.4 Urlrewrite 2.5.2 Myeclipse 8.6.1 借此机会顺便提一下 Maven Project 的创建,会了的朋友或还不想了解 Maven 的朋友,可 ...
- 解决mysql中文乱码(总)
转自:http://hi.baidu.com/cnvienna/blog/item/2e99efdfd94fc61862279801.html MySQL会出现中文乱码的原因不外乎下列几点: .ser ...
- poj 2127 LCIS 带路径输出
这个题 用一维 为什么错了: 因为 用一维 dp 方程肯定也是一维:但是有没有想,第 i 个字符更新了 j 位置的最优结果,然后 k 字符又一次更新了 j 位置的最优值,然后 我的结果是 i ...
- jquery事件学习笔记(转载)
一.页面载入1.ready(fn)当DOM载入就绪可以查询及操纵时绑定一个要执行的函数.这是事件模块中最重要的一个函数,因为它可以极大地提高web应用程序的响应速度. 简单地说,这个方法纯粹是对向wi ...