What is a fully qualified domain name (FQDN)?
fully qualified domain name (FQDN) is the complete domain name for a specific computer, or host, on the Internet. The FQDN consists of two parts: the hostname and the domain name. For example, an FQDN for a hypothetical mail server might be mymail.somecollege.edu
. The hostname is mymail
, and the host is located within the domain somecollege.edu
.
In this example, .edu
is the top-level domain (TLD). This is similar to the root directory on a typical workstation, where all other directories (or folders) originate. (Within the .edu
TLD, Indiana University Bloomington has been assigned the indiana.edu
domain, and has authority to create subdomains within it.)
The same applies to web addresses. For example, www.indiana.edu
is the FQDN on the web for IU. In this case,www
is the name of the host in the indiana.edu
domain.
When connecting to a host (using an SSH client, for example), you must specify the FQDN. The DNS server then resolves the hostname to its IP address by looking at its DNS table. The host is contacted and you receive a login prompt.
If you are using only the hostname (without the domain information) to connect to a server, the application you're using may not be able to resolve the hostname. This can happen if either the DNS suffix search order in your computer's TCP/IP properties is incorrect, or the DNS table is corrupted. In these cases, entering the host's FQDN will allow DNS to locate the server. Also, if you are trying to connect to a remote host that is not local to your Internet service provider (ISP), you will probably have to use the FQDN. For example, it's unlikely that a DNS server at IU would have a listing for remote hosts at another university or an unrelated ISP.
FQDN是Fully Qualified Domain Name的缩写, 含义是完整的域名. 例如, 一台机器主机名(hostname)是www, 域后缀(domain)是example.com, 那么该主机的FQDN应该是www.example.com.
题外话, 其实FQDN最后是以"."来结尾的, 但是大部分的应用和服务器都允许忽略最后这个点.
Linux允许用户通过hostname命令查看并设置主机名. 用户也可以通过hostname -f命令得到该主机的FQDN. 但是, 却没有直接设置FQDN的命令.
实际上, 设置Linux的FQDN可以通过两种方法实现.
第一种, /etc/hostname + /etc/hosts文件组合
首先在/etc/hostname文件中设置主机名, 假设是
www
然后在/etc/hosts文件中增加一行主机记录, 第一个字段是该主机的IP地址, 第二个字段是你希望设置的FQDN, 最后是刚刚设置的主机名, 如下
A.B.C.D www.example.com www
设置好之后, 通过hostname -F /etc/hostname更新主机名. 这时, 通过hostname -f看到的FQDN就应该是: www.example.com
第二种, /etc/hostname + /etc/resolv.conf组合
如果Linux不能在/etc/hosts文件中找到hostname对应的记录, 就会试图从resolv.conf文件中得到主机的域名后缀(domain name). 例如, 这样的/etc/resolv.conf文件
domain example.com
search example.com
nameserver W.X.Y.Z
根据配置文件中的domain后缀example.com, 加上主机名www, Linux会试图自动拼接成一个候选FQDN:www.example.com. 但这个候选FQDN还需要进一步验证.
Linux通过DNS服务器W.X.Y.Z解析候选FQDN, 如果解析失败, 生成FQDN过程就失败了. 如果解析成功, 则会返回www.example.com这个域名的正式名称. 也就是说, 如果在DNS服务器的记录中, www.example.com这个域名是指向server.example.com的CNAME记录的话, 而server.example.com才是A记录. 返回的FQDN就是server.example.com, 而不是www.example.com.
以上就是Linux下设置FQDN的方法.
FQDN:(Fully Qualified Domain Name)完全合格域名/全称域名,是指主机名加上全路径,全路径中列出了序列中所有域成员。全域名可以从逻辑上准确地表示出主机在什么地方,也可以说全域名是主机名的一种完全表示形式。从全域名中包含的信息可以看出主机在域名树中的位置。DNS解析流程:首先查找本机HOSTS表,有的直接使用表中定义,没有查找网络连接中设置的DNS 服务器由他来解析。
例如,acmecompany公司的Web服务器的全域名可以是 acmecompany.,而若sales主机是在销售部子域,则它的全域名可以是sales.acmecompany。当给出的名字像acmecompany而不是acmecompany.时,他们通常是指主机名,而名字后边带有点号(“.”是指根域名服务器)的则认为是全域名。这种区别在理解和控制解析过程时是非常重要的。点号实际上指出了域名树的根。
全域名在实际中是非常有用的。电子邮件就使用全域名作为收信人的电子邮件地址,如janicejones@ acmecompany. com,其中收信人为janicejones,跟在收信人名字后面是符号@,@后面是邮件服务器的全域名,或者说是邮件服务器所在企业的域名,最后是顶层域名.com。. com意味着acmecompany是一个商业机构。
与URL的区别在于协议头”Http://”。
What is a fully qualified domain name (FQDN)?的更多相关文章
- 解决Apache启动错误:httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
启动apache遇到提示: [root@bqh-119 conf]# ../bin/apachectl -thttpd: apr_sockaddr_info_get() failed for bqh- ...
- 源码安装Apache,报错:Cannot use an external APR with the bundled APR-util和httpd: Could not reliably determine the server's fully qualified domain name, using
一.解决APR和APR-util错误: 1.1.安装APR: [root@ganglia httpd-2.2.23]# cd srclib/apr [root@ganglia apr]# ./conf ...
- 重启Apache报错apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting的解决方法
启动apache提示 : apache2: Could not reliably determine the server's fully qualified domain name, using 1 ...
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName的解决
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ...
- apache2: Could not reliably determine the server's fully qualified domain name
错误信息:apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 ...
- Could not reliably determine the server's fully qualified domain name
启动apache报错: [root@namenode1 ]# service httpd start Starting httpd: httpd: Could not reliably determi ...
- Starting httpd:Could not reliably determine the server's fully qualified domain name
#service httpd start #Starting httpd: httpd: Could not reliably determine the server's fully qualifi ...
- apache启动问题: Could not reliably determine the server's fully qualified domain name
[root@rusky]# service httpd startStarting httpd: httpd: apr_sockaddr_info_get() failed for ruskyhttp ...
- httpd: Could not reliably determine the server's fully qualified domain name
作者:Younger Liu, 本作品采用知识共享署名-非商业性使用-相同方式共享 3.0 未本地化版本许可协议进行许可. 问题描述: AH00558: httpd: Could not reliab ...
随机推荐
- 大图轮播js
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> ...
- Java 冒泡排序与快速排序的实现
冒泡排序 基本特点 (1)基于交换思想的排序算法 (2)从一端开始,逐个比较相邻的两个元素,发现倒序即交换. (3)一次遍历,一定能将其中最大(小)的元素交换到其最终位置上 排序过程模 ...
- [洛谷P4588][TJOI2018]数学计算
题目大意:有一个数$x$和取模的数$mod$,初始为$1$,有两个操作: $m:x=x\times m$并输出$x\% mod$ $pos:x=x/第pos次操作乘的数$(保证合法),并输出$x\%m ...
- ubuntu启动报错 Errors were found while checking the disk-drive for /
开机报这个错误,主要原因是硬盘检测不通过导致的,下面介绍两种方法规避该问题: 修改grub 这个方法网上比较多,直接贴过来: 进入Ubuntu启动菜单时,光标选中 *Ubuntu 后,按键盘上的 e ...
- Codeforces Round #357 (Div. 2) A
A. A Good Contest time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- GDI+ 双缓存 和 刷新桌面(F5)
GDI+双缓存 POINT currentPoint; GetCursorPos(¤tPoint); HWND hWnd = ::GetDesktopWindow(); int n ...
- WinSetupFromUSB制作多系统U盘引导启动
重装系统有各种方式,比较常见的有做系统引导U盘.刻录PE.硬盘一键安装等.但是有很多缺点,国内大部分用的Ghost系统,内含各种捆绑软件,系统极其不安全.稳定,另外制作U盘启动也只能做一个系统的安装盘 ...
- python面试经典315
期待的是可以检验自己学习的成功:苦逼的是怎么又有东西没记住,但我们依然每天坚持一遍.一遍又一遍指导记住为止. 第一部分 Python基础篇(80题) 为什么学习Python? 通过什么途径学习的Pyt ...
- 【ZOJ4062】Plants vs. Zombies(二分)
题意:有n个植物排成一排,标号为1-n,每株植物有自己的生长速度ai,每对植物浇一次水,该株植物就长高ai, 现在机器人从第0个格子出发,每次走一步,不能停留,每一步浇一次水,总共可以走m步,问最矮的 ...
- js j将数字每三位用逗号隔开的方法
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...