Home  >  Article  >  Operation and Maintenance  >  How to solve the problem of CentOS DHCP server startup failure

How to solve the problem of CentOS DHCP server startup failure

WJ
WJOriginal
2020-06-03 15:30:013342browse

How to solve the problem of CentOS DHCP server startup failure

How to solve the problem of CentOS DHCP server startup failure?

First, let’s install the DHCP software package

1. Create a folder to mount the CD image

mkdir /mnt/cdrom

2. Mount the image

mount /dev/cdrom /mnt/cdrom

3. Modify the yum configuration file

  vim /etc/yum.repos.d/CentOS-Media.repo

Change the baseurl to the previous CD image mount point

 gpgcheck =0  关闭自检
 enable=1      启动

How to solve the problem of CentOS DHCP server startup failure

4. Rename CentOS-Base.repo to CentOS-Base.repo_back Invalidate network yum

mv CentOS-Base.repo CentOS-Base.repo_back

5. Modify the DHCP configuration file

 vim /etcdhcp/dhcpd.conf

How to solve the problem of CentOS DHCP server startup failure

Before, I had been referring to books and methods to modify the configuration file, but when I finally turned on the DHCP server, it failed.

How to solve the problem of CentOS DHCP server startup failure

After searching for various reasons on the Internet, I couldn't solve it. Finally, I saw the sentence see /user/share/doc/dhcp* in the DHCP configuration file. /dhcpd.comf.sample So I went in and checked it out

cat /user/share/doc/dhcp*/dhcpd.comf.sample

It was full of comments and stuff. But there is a similar content in the configuration file

How to solve the problem of CentOS DHCP server startup failure

There is no configuration of

ddns update-style interim;
igmore client-updates;

So I changed the # in the configuration file ##

ddns update-style interim;
igmore client-updates;  删除

Restart the DHCP service again

It can start normally

Because I am using the bridge mode on the virtual machine, and my LAN uses static IP address acquisition, so I tested it on my physical machine

and was able to obtain the IP address normally

How to solve the problem of CentOS DHCP server startup failure
##Related references:

centOS tutorial

The above is the detailed content of How to solve the problem of CentOS DHCP server startup failure. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn