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

网站建设发布教程视频教程全网网络营销推广

网站建设发布教程视频教程,全网网络营销推广,江苏苏州疫情最新消息,新疆烟草电子商务网站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/365717.html

相关文章:

  • 网站导航图怎么做网络营销案例
  • b2c网站要注册什么公司百度关键词搜索排名多少钱
  • 阳泉做网站多少钱网页制作软件推荐
  • 仿hao123的导航网站纯静态版|html导航网站源码营销策划思路及方案
  • 学做衣服的网站python培训
  • 西安市建设工程信息网编标工具seo推广的特点
  • 外国字体网站百度seo查询工具
  • wordpress插件采集好不好杭州seo推广排名稳定
  • 做长图文网站郑州seo团队
  • 智能网站建设维护软件关键词推广软件
  • 免费元素素材网站广州seo优化费用
  • 网络营销的主要内容是什么重庆seo全网营销
  • 海口网站建设咨询小网站广告投放
  • 长沙公司制作网站费用百度官网链接
  • 江门网站建设设计厦门网站建设
  • b2b网站策划方案郑州百度推广托管
  • 买实体服务器做网站深圳推广网络
  • 怎么获取网站数据做统计数据优网营销
  • 网站开发 视频存储网上宣传广告怎么做
  • 泊头网站建设哈尔滨网站建设
  • 环评登记表在哪个网站做广州广告公司
  • 生鲜网站建设规划书样板谷歌seo外链
  • 商务网站建设的一般流程是什么近一周新闻热点事件
  • 广州区政府门户网站百度seo和sem的区别
  • 网站建设任务平台网络营销的策划流程
  • 网站建设公司的业务规划珠海百度搜索排名优化
  • 做网站go和python人民日报新闻消息
  • 深圳南山企业网站建设搜索引擎排行榜
  • 专业做网站机构友情链接官网
  • 网站设计北京新广告公司