这次我会结合我前面所发的搭建DHCP服务,dns服务和HTTP服务,中核做一个实验有什么不...
source link: https://blog.51cto.com/u_15070926/5241180
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
这次我会结合我前面所发的搭建DHCP服务,dns服务和HTTP服务,中核做一个实验有什么不懂得,可以评论区交流一下,也可以私信我,葱鸭!
原创注:挂载镜像和修改网卡,还有关闭防火墙、关闭安全Linux
1.前期准备需要准备两台服务器一台PC机。
两台服务都使用本地yum,而且两台服务器是在同一网段(VM1---十网段)
dns,http服务器(192.168.10.9)
dhcp服务器(192.168.10.8)
dns,http服务器搭建本地yum
dhcp服务器搭建本地yum
2.搭建dhcp服务器
yum
install dhcp*-y
创建dhcp池
subnet
192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.150 192.168.10.200;
option domain-name-servers 192.168.10.9;
option domain-name " www.bdqn.com";
option routers 192.168.10.8;
option broadcast-address 192.168.10.255;
default-lease-time 600;
max-lease-time 7200;
开启dhcp
systemctl
restart dhcpd
3.搭建dns,http服务器
搭建dns服务器
使用yum安装bind
yum install
bind* -y
编辑dns,正向解析、反向解析
vim
/etc/named.conf
创建正向解析文件
编辑正向解释文件
创建反向解析文件
编辑反向解析文件
编写vim /etc/resolv.conf
查看named开启状态
netstat -anpu | grep name //UDP 53端口在监听
搭建http服务器
yum
install http* -y
编辑httpd.conf
vim
/etc/httpd/conf/httpd.conf
查看http
curl
192.168.10.9
使用dhcp服务器是否可以查看http和dns
查看dns需要编写vim /etc/resolv.conf
查看http
使用pc(开启一台win10进行验证)注:需要改网卡,如果dhcp获取不是自己写的东西,可能是获取到本机dhcp可以在任务管理器里面关闭vmdhcp
使用网站先输入IP地址
输入www.bdqn.com
- 打赏
- 3赞
- 2收藏
- 评论
- 分享
- 举报
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK