在Linux中配置DNS的正确方式

时间:2022-09-10 11:11:07

链接:http://ccl.cse.nd.edu/operations/condor/hostname.shtml

Common Hostname Problem on Linux

Newly installed Linux machines often have a common configuration problem that breaks several distributed systems, including Condor. Many programs need to determine their own IP address so that they can tell other machines how to contact them. This doesn't work with the default /etc/hosts on many Linux machines, which looks like this:

Incorrect /etc/hosts:

127.0.0.1 machinename localhost localhost.localdomain

When a program attempts to determine it's own IP address, it will think it to be the loopback address 127.0.0.1. When it communicates that address to other machines, everyone gets confused. There are two solutions to this problem. You can either put the proper IP address in /etc/hosts, or you can leave it out entirely, and let DNS figure it out.

Correct /etc/hosts Option A:

127.0.0.1 localhost localhost.localdomain
1.2.3.4 machinename

Correct /etc/hosts Option B:

127.0.0.1 localhost localhost.localdomain

After making this change, either reboot the machine or run condor_restart -master to reset Condor.

在Linux中配置DNS的正确方式的更多相关文章

  1. Linux中与DNS相关的内容

    Linux中与DNS有关的三个东西: 1. 主机名 2. DNS服务器 3. Host文件 Linux中和DNS有关的三个文件: 1. /etc/hostname 2. /etc/resolv.con ...

  2. linux 中配置假域名来测试

    1.linux中配置假域名 找到hosts文件进行编辑 命令:vim /etc/hosts 配置: #centos(本机IP)192.168.1.179 www.imooc.com(假域名,自己设置) ...

  3. Linux中关于dns配置的小记

    一. 如上图 我当时的网卡配置文件里是静态模式,然后DNS1=114.114.114.114. 就是纳闷,这是为什么 随后,我又是将网卡配置文件,修改为DNS1=114.114.114.113. 重启 ...

  4. Linux 中查看 DNS 与 配置

    DNS(Domain Name System,域名系统),因特网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串. 查看dns 可 ...

  5. 在EntityFramework6中管理DbContext的正确方式——2DbContext的默认行为(外文翻译)

    (译者注:使用EF开发应用程序的一个难点就在于对其DbContext的生命周期管理,你的管理策略是否能很好的支持上层服务 使用独立事务,使用嵌套事务,并行执行,异步执行等需求? Mehdi El Gu ...

  6. LINUX中的DNS服务---高速缓存DNS

    一.什么是DNS     Domain Name System,域名系统.     万维网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网.他主要负责把域名和IP的相互转换 ...

  7. linux中配置yum源

    1.配置163或者阿里云yum源: 阿里云yum源地址:https://mirrors.aliyun.com/centos/6.9/os/x86_64/Packages/ 阿里云给出的解决办法:htt ...

  8. 如何在 Linux 中配置基于密钥认证的 SSH

    什么是基于 SSH 密钥的认证? 众所周知,Secure Shell,又称 SSH,是允许你通过无安全网络(例如 Internet)和远程系统之间安全访问/通信的加密网络协议.无论何时使用 SSH 在 ...

  9. 在Linux中配置jdk,Tomcat,MySQL

    解压缩: tar 命令 : 使用方式 tar [参数] source [target] source - 压缩文件 target - 解压缩后的目标位置, 默认解压到当前目录 常用写法 : 解压缩 : ...

随机推荐

  1. IOS 判断耳机插入/拔出

    一. 方式 1.注册监听 //注册监听耳机设备的插入/拔出 AudioSessionAddPropertyListener (kAudioSessionProperty_AudioRouteChang ...

  2. java操作AJAX

    1,get方式的AJAX function sendAjaxReq() { //1,创建ajax引擎 XMLHttpRequest对象 var req = new XMLHttpRequest() | ...

  3. Android Studio 单刷《第一行代码》系列 07 —— Broadcast 广播

    前情提要(Previously) 本系列将使用 Android Studio 将<第一行代码>(书中讲解案例使用Eclipse)刷一遍,旨在为想入坑 Android 开发,并选择 Andr ...

  4. Hadoop MapReduce Next Generation - Setting up a Single Node Cluster

    Hadoop MapReduce Next Generation - Setting up a Single Node Cluster. Purpose This document describes ...

  5. Wireshark网络端点和会话

    如果想让网络进行正常通信,你必须至少拥有两台设备进行数据流交互.端点(endpoint)就是指网络上能够发送和接受数据的一台设备.举例来说,在TCP/IP的通信中就有两个断电:接收和发送数据系统的IP ...

  6. Heritrix1&period;14&period;4在Eclipse的配置和使用

    转载 1.首先在 Eclipse 中新建 Java 工程 ,工程名自取,以MyHeritrix为例.利用下载的源代码包根据以下步骤来配置这个工程. 2.导入类库 Heritrix 所用到的工具类库都在 ...

  7. android小程序之幸运菜谱

    android小程序之幸运菜谱 前言:刚刚结束短短5天的android公开课程,收获不少,写下来记录一下吧!(因为学校校企公开课的缘故才偶然接触的android,所以只学了这几天,不喜勿喷) 一开始得 ...

  8. Android 内核常见目录的作用

    / :根目录 /bin目录 :命令保存目录,普通用户就可以读取的命令. /boot目录 :启动目录,启动相关文件 /dev :设备文件保存目录 /etc :配置文件保存目录 /home :普通用户的家 ...

  9. 动态编程(Dynamic Programming)

    本文素材来自视频,请自备*观看:What Is Dynamic Programming and How To Use It Dynamic Programming:动态编程分为如下几步: 将复杂问题 ...

  10. Codeforces980 D&period; Perfect Groups

    传送门:>Here< 题目大意:先抛出了一个问题——“已知一个序列,将此序列中的元素划分成几组(不需要连续)使得每一组中的任意两个数的乘积都是完全平方数.特殊的,一个数可以为一组.先要求最 ...