当前位置: 首页 > wzjs >正文

网站建设发布教程视频教程深圳网站设计实力乐云seo

网站建设发布教程视频教程,深圳网站设计实力乐云seo,做货代的可以在哪些网站打广告,泰安网络科技有限公司电话1、dnsmasq软件介绍 dnsmasq 是一款轻量级的网络服务软件,主要用于提供 DNS(域名系统)和 DHCP(动态主机配置协议)服务 作用 提高网络效率: 通过 DNS 缓存,减少网络延迟。减少对外部 DNS 请求的…

1、dnsmasq软件介绍

dnsmasq 是一款轻量级的网络服务软件,主要用于提供 DNS(域名系统)和 DHCP(动态主机配置协议)服务

作用

  1. 提高网络效率

    • 通过 DNS 缓存,减少网络延迟。
    • 减少对外部 DNS 请求的数量。
  2. 自动 IP 配置

    • 自动为新连接的设备分配 IP 地址,无需手动设置,降低配置复杂性。
  3. 增强网络安全

    • 通过内置的过滤功能,可以限制不必要的 DNS 请求,提高网络安全性。
  4. 简化网络管理

    • 集成 DNS 和 DHCP 服务,使网络管理更加方便。

2、安装

yum -y install dnsmasq

[master-61 root ~] # yum install -y dnsmasq 
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
base                                                                            | 3.6 kB  00:00:00     
epel                                                                            | 4.3 kB  00:00:00     
extras                                                                          | 2.9 kB  00:00:00     
updates                                                                         | 2.9 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package dnsmasq.x86_64 0:2.76-17.el7_9.3 will be installed
--> Processing Dependency: libnettle.so.4()(64bit) for package: dnsmasq-2.76-17.el7_9.3.x86_64
--> Running transaction check
---> Package nettle.x86_64 0:2.7.1-9.el7_9 will be installed
--> Finished Dependency ResolutionDependencies Resolved=======================================================================================================Package               Arch                 Version                        Repository             Size
=======================================================================================================
Installing:dnsmasq               x86_64               2.76-17.el7_9.3                updates               281 kstalling for dependencies:nettle                x86_64               2.7.1-9.el7_9                  updates               328 kTransaction Summary
=======================================================================================================
Install  1 Package (+1 Dependent package)Total download size: 608 k
Installed size: 1.3 M
Downloading packages:
(1/2): nettle-2.7.1-9.el7_9.x86_64.rpm                                          | 328 kB  00:00:00     
(2/2): dnsmasq-2.76-17.el7_9.3.x86_64.rpm                                       | 281 kB  00:00:00     
-------------------------------------------------------------------------------------------------------
Total                                                                  1.6 MB/s | 608 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : nettle-2.7.1-9.el7_9.x86_64                                                         1/2 Installing : dnsmasq-2.76-17.el7_9.3.x86_64                                                      2/2 Verifying  : dnsmasq-2.76-17.el7_9.3.x86_64                                                      1/2 Verifying  : nettle-2.7.1-9.el7_9.x86_64                                                         2/2 Installed:dnsmasq.x86_64 0:2.76-17.el7_9.3                                                                     Dependency Installed:nettle.x86_64 0:2.7.1-9.el7_9                                                                        Complete!

3、创建dnsmasq配置文件,设置上游dns服务器地址,设置本地域名解析记录

[master-61 root ~] # vim /etc/dnsmasq.conf 取消注释,指定上游dns服务器地址
resolv-file=/etc/resolv.dnsmasq.conf指定运行地址是内网环境
listen-address=172.16.1.61本地域名解析记录
addn-hosts=/etc/hosts.dnsmasq.conf查找出配置文件中没有注释的内容
[master-61 root ~] # grep -Ev '^($|#)'  /etc/dnsmasq.conf 
resolv-file=/etc/resolv.dnsmasq.conf
listen-address=172.16.1.61
addn-hosts=/etc/hosts.dnsmasq.conf
conf-dir=/etc/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig

4、创建对应的数据文件

[master-61 root ~] # echo 'nameserver 233.5.5.5' > /etc/resolv.dnsmasq.conf[master-61 root ~] # cat >/etc/hosts.dnsmasq.conf <<EOF
> 172.16.1.61 master-61
> 172.16.1.5 slb-5
> 172.16.1.6 slb-6
> 172.16.1.7 web-7
> 172.16.1.8 web-8
> 172.16.1.9 web-9
> 172.16.1.31 nfs-31
> 172.16.1.41 rsync-41
> 172.16.1.51 db-51
> EOF

5、 启动dnsmasq服务,生效加上的自定义记录

[master-61 root ~] # systemctl start dnsmasq

6、测试dnsmasq是否可以使用

先注释掉本地hosts解析记录
[master-61 root ~] # vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6#内网ip       外网ip     主机名     机器的作用
#172.16.1.61  10.0.0.61  master-61  管理机
#172.16.1.5   10.0.0.5   slb-5      负载均衡服务器  
#172.16.1.6   10.0.0.6   slb-6      负载均衡服务器  
#172.16.1.7   10.0.0.7   web-7      web服务器       
#172.16.1.8   10.0.0.8   web-8      web服务器       
#172.16.1.9   10.0.0.9   web-9      web服务器       
#172.16.1.31  10.0.0.31  nfs-31     存储服务器      
#172.16.1.41  10.0.0.41  rsync-41   备份服务器     
#172.16.1.51  10.0.0.51  db-51      数据库服务器发现ping不通了
[master-61 root ~] # ping web-7
ping: web-7: Name or service not known需要指定本地的你dns配置文件的记录,使用dnsmasq的服务端地址
[master-61 root ~] # vim /etc/resolv.conf 
# Generated by NetworkManager
nameserver 172.16.1.61

http://www.dtcms.com/wzjs/161252.html

相关文章:

  • 外包公司的人好跳槽吗seo的研究对象
  • 重庆最新新闻事件今天seo的含义
  • 网站维护案百度指数查询app
  • access 数据库做网站企业网络
  • 品牌推广全案宁波核心关键词seo收费
  • 快速达建网站公司网站建设全包
  • 做网站的分辨率是72吗衡阳有实力seo优化
  • 生鲜电商网站开发网站建设推广
  • 哈尔滨品牌网站建设app推广接单网
  • dedecms中餐网站模板网络营销渠道有哪几种
  • 长宁苏州网站建设公司seo外链推广员
  • 企业网站建设xplogo游戏如何在网上推广
  • 手机如何访问电脑做的asp网站网络推广山东
  • 自己做网站卖什么华与华营销策划公司
  • 柳市网页设计网站推广seo方法
  • 怎样用vs做简单网站快速建站哪个平台好
  • 深圳网站建设服务合同100个关键词
  • 深圳网站开发设计公司排名域名解析网站
  • 教做甜品网站网络营销怎么做
  • asp.net 建立网站域名怎么注册
  • 太原网站建设推广网络整合营销公司
  • 专业长春网站建设工作室朔州seo
  • 桂林网站建设凡森网络网络软文范文
  • 12306网站 给手机核验怎么做如何做好平台推广
  • 网站拥有权网络营销主要是什么
  • 推广网站有哪些平台佛山百度网站快速排名
  • 现在手机网站用什么做微信软文推广怎么做
  • 怎么做关不掉的网站无代码网站开发平台
  • 福田祥菱箱货临沧seo
  • 微信官方网站在线客服搜索引擎优化的核心及内容