注意,仅供参考!
###包的下载界面
https://archlinux.org/packages/extra/x86_64/pdnsd/
###包的下载链接
https://archlinux.thaller.ws/extra/os/x86_64/pdnsd-1.2.9.a-14-x86_64.pkg.tar.zst
#########具体安装执行步骤#########
cp usr/bin/* /usr/bin/
cp usr/lib/systemd/system/pdnsd.service /usr/lib/systemd/system/
###CentOS
cp usr/lib/tmpfiles.d/pdnsd.conf /usr/lib/tmpfiles.d/
###Ubuntu
cp usr/lib/sysusers.d/pdnsd.conf /usr/lib/sysusers.d/
mkdir /usr/share/doc/pdnsd/
cp usr/share/doc/pdnsd/pdnsd.conf /usr/share/doc/pdnsd/pdnsd.conf
cp usr/share/doc/pdnsd/pdnsd.conf /etc
mkdir /var/cache/pdnsd/
###############################
/etc/pdnsd.conf文件里的内容:
###############################
global {
perm_cache=1024;
cache_dir="/var/cache/pdnsd";
run_as="root";
server_ip = ens192; # Use eth0 here if you want to allow other
# machines on your network to query pdnsd.
status_ctl = on;
# but may make pdnsd less efficient, unfortunately.
query_method=tcp_only;
min_ttl=15m; # Retain cached entries at least 15 minutes.
max_ttl=1w; # One week.
timeout=10; # Global timeout option (10 seconds).
neg_domain_pol=on;
udpbufsize=1024; # Upper limit on the size of UDP messages.
}
server {
label= "myisp";
ip = 114.114.114.114; # Put your ISP's DNS-server address(es) here.
# This may be necessary if you are behind some
# kind of firewall and cannot receive replies
# from outside name servers.
timeout=4; # Server timeout; this may be much shorter
# that the global timeout option.
uptest=if; # Test if the network interface is active.
interface=ens192; # The name of the interface to check.
interval=10m; # Check every 10 minutes.
purge_cache=off; # Keep stale cache entries in case the ISP's
# DNS servers go offline.
edns_query=yes; # Use EDNS for outgoing queries to allow UDP messages
# larger than 512 bytes. May cause trouble with some
# legacy systems.
}
###############################
systemctl start pdnsd.service