CentOS執行ping命令報錯 name or service not know
在虛擬機器上安裝的CentOS,但是當執行ping命令的時候,提示name or service not known
解決方法如下:
1. 新增DNS伺服器
vi /etc/resolv.conf
在檔案中新增如下兩行(可以自己選擇DNS伺服器,這裡選的是114的,包括谷歌的8.8.8.8和騰訊的119.29.29.29都可以):
nameserver 114.114.114.114
nameserver 114.114.114.115
兩行分別是首選DNS伺服器和備選DNS伺服器。
:wq
儲存退出,直接就可以使用。
如果還不好使,接著向下看。
2. 設定一個配置檔案:
進入到/etc/sysconfig/network-scprits/
開啟ifcfg-ens33
檔案(這個檔名稱不同的客戶端可能會不同,我的是ens33,也有的是ens0或者是加上其他數字)
vi /etc/sysconfig/network-scprits/ifcfg-ens33
在檔案中,找到 ONBOOT=NO 改成 ONBOOT=yes
:wq
儲存退出
重啟網路:
service network restart
輸入執行
ping www.baidu.com
完美執行!!!
相關推薦
CentOS執行ping命令報錯 name or service not know
在虛擬機器上安裝的CentOS,但是當執行ping命令的時候,提示name or service not known 解決方法如下: 1. 新增DNS伺服器 vi /etc/resolv.conf 在檔案中新增如下兩行(可以自己選擇DNS
CentOS ping www.baidu.com 報錯 name or service not know
其他 成功 scp 報錯 4.4 添加 .com 資料 dns服務器 今天嘗試安裝了centos系統 玩一玩 剛剛裝好的操作系統 ping www.baidu.com的時候 報出 name or service not known 查了好多資料,都沒有很好的解決
Centos7+ ping www.baidu.com 報錯 name or service not know
修改配置 #檢視閘道器 [[email protected] ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Us
centos7.X ping www.baidu.com 報錯 name or service not known
今天在配置靜態ip 時,不論如何都連不到外網。。。 報 name or service not known 在 /etc/sysconfig/network-scripts/ifcfg-ens33 檔
linux ping報錯Name or service not known
設定靜態ip以後忘記設定dns,ping的時候報錯:Name or service not known 新增dns即可 vi /etc/resolv.conf nameserver 8.8.8.8
linux下啟動tomcat報錯 "Name or service not known"錯誤解決
錯誤資訊 java.net.UnknownHostException: dev02.gzhl.interconnect: dev02.gzhl.interconnect: Name or service not known 將war包打入Tomcat,啟動的時候遇到錯誤,
centos7 ping: www.baidu.com: Name or service not known
[[email protected] ~]# ping www.baidu.com ping: www.baidu.com: Name or service not known [[email protected] ~]# 1、網路配置檢視
啟動hadoop時報錯ssh: Could not resolve hostname with: Name or service not know
只需把export HADOOP_OPTS=“ H A D
centos7 設定唯一IP Name or service not know
centos7 ping: www.baidu.com: Name or service not known [[email protected] ~]# ping www.baidu.com ping: www.baidu.com: Name or service not known
centos7 設定唯一IP Name or service not know
[[email protected] ~]# ping www.baidu.com ping: www.baidu.com: Name or service not known [[email protected] ~]# 1、網路配置檢視
Linux報錯ping: https://www.baidu.com: Name or service not known
[[email protected] softwares]# ping https://www.baidu.comping: https://www.baidu.com: Name or service not known 沒有預設的閘道器,需要新增 [[emai
安裝atlas後執行hive命令報錯
repeat log color bug mage client img sof atl 在集群中安裝atlas,在安裝atlas的節點上執行hive -e "show databases;" 正常,但是在集群中其他節點上執行hive -e "show database
安裝了webpack和webpack-cli,但是執行webpack命令報錯
安裝的webpack版本是4.9.1,webpack-cli版本號是2.1.4。執行webpack命令提示: One CLI for webpack must be installed. These are recommended choices, delivered as separ
測試前奏 之 dos字元頁面執行 monkeyrunner 命令報錯
藉著中午休息的時間,記錄下在使用monkeyruuner命令的時候的出錯問題。 電腦系統 執行視窗 執行命令 win10企業版 管理員身份dos字元視窗 monke
執行mysql_secure_installation命令報錯. mysql.cnf. 10513: 只讀檔案系統 、. mysql. cnf. 10513:沒有那個檔案或目錄
# mysql_secure_installation 執行mysql_secure_installation(mysql安全策略設定)報錯 報錯資訊如下: /usr/bin/mysql_ secure_ installation:行203: . mysq
maven執行install命令報錯
學習他的http://blog.csdn.net/sd4015700/article/details/39992929 如果報這個錯: Failed to execute goal org.apache.maven.plugins:maven-install-plugin
dubbo啟動報錯 java.net.UnknownHostException: bogon: bogon: Name or service not known
客戶端啟動報UnknownHostException異常: Caused by: java.lang.RuntimeException: get localhost fail at com.alibaba.rocketmq.common.MixAll.lo
安裝redis-執行make命令報錯解決方法
問題原因:未安裝GCC cd hiredis && make static make[3]: 進入目錄“/opt/redis-3.0.4/deps/hiredis” gcc -st
idea執行maven命令報錯:Check $M2_HOME environment variable and mvn script match.
設一個環境變數 M2_HOME 指向你的maven安裝目錄 M2_HOME=D:\xxxx\xxxxx\apache-maven-3.3.1file --> settings中搜maven --> runner --> vm Options新增-D
shell指令碼mac平臺執行sed命令報錯
mac執行sed命令報錯 $ touch testing.txt $ echo "this is mkyong.com" > testing.txt $ cat testing.txt this