在linux系統(tǒng)中實現(xiàn)動態(tài)域名解析的方法
1.首先,在linux系統(tǒng)中搭建一個動態(tài)域名解析環(huán)境;
yum install dhcp -y
cd /etc/dhcp
cp /usr/share/doc/dhcp*/dhcpd.conf.example dhcpd.conf #根據(jù)提示覆蓋文件
vim /etc/dhcp/dhcpd.conf
systemctl star dhcpd
2.環(huán)境搭建好后,將網(wǎng)絡(luò)設(shè)置為dhcp方式;
vim /etc/sysconfig/network-scripts/ifconfig-eth0
3.網(wǎng)絡(luò)dhcp設(shè)置好后,對網(wǎng)絡(luò)進(jìn)行重啟;
systemctl restart network
ip addr show
4.最后,網(wǎng)絡(luò)重啟后,對配置文件進(jìn)行以下修改即可;
vim /etc/dhcp/dhcpd.conf
systemctl restart named
systemctl restart dhcp
systemctl restart network