How to solve the problem of CentOS DHCP server startup failure

WJ
Release: 2020-06-03 15:30:01
Original
3343 people have browsed it

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
Copy after login

2. Mount the image

mount /dev/cdrom /mnt/cdrom
Copy after login

3. Modify the yum configuration file

  vim /etc/yum.repos.d/CentOS-Media.repo
Copy after login

Change the baseurl to the previous CD image mount point

 gpgcheck =0  关闭自检
 enable=1      启动
Copy after login

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
Copy after login

5. Modify the DHCP configuration file

 vim /etcdhcp/dhcpd.conf
Copy after login

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
Copy after login

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;
Copy after login

So I changed the # in the configuration file ##

ddns update-style interim;
igmore client-updates;  删除
Copy after login
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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template