Home >Operation and Maintenance >CentOS >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 启动
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
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.
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
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
##Related references:
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!