Centos7安装DHCP服务

来源:互联网 发布:网络摄像头安装步骤 编辑:程序博客网 时间:2024/06/06 17:09

本文转自:http://blog.csdn.net/sdd220/article/details/76970963

1.配置/etc/sysconfig/network-scripts/ifcfg-eth0 将网卡设置为开机启动,地址配置为静态(我修改的是ifcfg-lo) 
ONBOOT=yes 
BOOTPROTO=static 
2.关闭防火墙(有可能影响tftp) 
[root@localhost ~]# systemctl stop iptables.service 
[root@localhost ~]# systemctl status iptables.service 
3.修改/etc/sysconfig/selinux配置文件,永久关闭selinux 
[root@localhost ~]#vim /etc/sysconfig/selinux

SELINUX=disabled

4.安装dhco包 
[root@localhost ~]#yum -y install dhcp 
这里写图片描述 
5.将/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample拷贝至/etc/dhcp/dhcpd.conf并修改这里写图片描述 
subnet netmask IP子网 启动dhcp服务的网段,与dhcp服务器在同一个网段 
range dhcp地址池,IP子网范围 
option routers 为客户端指定网关 
6.查看DHCP服务是否启动(查看67端口) 
这里写图片描述

错误: 
1.这里写图片描述 
2.这里写图片描述 
这里的错误均是配置文件未修改引起的,修改之后问题解决,查看67端口启动服务。


原创粉丝点击