关于 bind 和 dns(二)

进一步,bind 自编译,带 GeoIP 支持,针对不同地区客户端提供不同 view

编译后,环境安装

安装必要组件

#wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
#rpm -Uvh epel-release-latest-7.noarch.rpm
yum install epel-release -y
yum update
yum install -y libuv libuv-devel pcre-devel zlib-devel gcc gcc-c++ autoconf automake make pcre-devel zlib-devel openssl-devel openldap-devel unixODBC-devel gcc libtool openssl libmaxminddb libmaxminddb-devel libnghttp* libcap*

添加运行用户即权限

useradd -s /sbin/nologin -M named
chown -R named:named /usr/local/bind/

加入环境变量

echo "export PATH=${PATH}:/usr/local/bind/sbin/:/usr/local/bind/bin/" >> /etc/profile
source /etc/profile

 

bind 编译部署参考:https://www.loshub.com/article/show/448/

geoip 各类编码: https://support.maxmind.com/hc/en-us/articles/4414877149467-IP-Geolocation-Data

geoip 数据库使用:https://dev.maxmind.com/geoip/docs/databases/city-and-country?lang=en#binary-databases

bind 帮助文档:https://bind9.readthedocs.io/en/v9_18_8/chapter7.html?highlight=geoip#access-control-lists

 

posted on 2022-11-07 17:36  震撼起飞  阅读(32)  评论(0编辑  收藏  举报

导航