zoukankan      html  css  js  c++  java
  • CentOS下yum安装dnsmasq,并强制替换为最新版

     

    由于yum安装的dnsmasq版本比较低,从网上找到了参考方法,将yum安装好的dnsmasq强制替换为最新版!

    安装dnsmasq的下载地址:http://www.thekelleys.org.uk/dnsmasq/

    我选择的是最新的版本:dnsmasq-2.76

    wget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.76.tar.gz

    解压:

    tar xf dnsmasq-2.76.tar.gz

    编译:

    cd dnsmasq-2.76
    make V=s

    源码make不带etc等。

    然后用yum install安装dnsmasq

    yum install dnsmasq

    自带安装的2.4.8版本,所以用编译好的最新版覆盖即可。

    yes|cp -f ./src/dnsmasq /usr/sbin/dnsmasq
    dnsmasq -v

    查看到的版本是最新版本的dnsmasq了。

    再修改一下默认的 Dnsmasq 配置文件 /etc/dnsmasq.conf

    # 不读取 /etc/resolv.conf ,取消注释即可
    no-resolv
    no-poll
    # 添加上游服务器为 DNSCrypt,如果还有其他的 server= 记得取消注释。
    server=127.0.0.1#5301
    # 在所有网卡上关闭 DHCP,用不着这个功能。如果有多个网卡那么一行一个。
    no-dhcp-interface=eth0
    no-dhcp-interface=eth1
    # 添加自定义 hosts 文件
    addn-hosts=/etc/dns/hosts

  • 相关阅读:
    已知二叉树的前序遍历、中序遍历,求后序遍历
    排序算法
    应用层
    运输层
    mysql分页查询
    mysql 性能分析及explain用法
    数据库SQL优化
    MATLAB GUI设计(1)
    路径选择
    Python itchat库(1)
  • 原文地址:https://www.cnblogs.com/zhangrui153169/p/13477388.html
Copyright © 2011-2022 走看看