The first step:
first install the dhcp package under root privileges, the relevant command codes are as follows
or you can use the two commands
yum install dhclient.x86_64
yum install dhcp-common.x86_64In the second step
, after the DHCP software package is successfully installed, the dhcp version information will be displayed, as shown in the following figure.
- Step 3
Use the rpm -q dhcp command to check whether the DHCP service is installed. No information is returned if it is not installed, and version information is returned if it is installed.
-
Edit the dhcp configuration file "/etc/dhcp/dhcpd.conf", the code is as follows (take Beihua University network class 16 linux classroom experiment as an example):
The meaning and content explanation are as follows :
Edit the "/etc/rc.d/init.d/dhcpd" file and modify the relevant code below. (centos7 does not need to be modified)
When setting Linux to start, start the dhcpd service at the same time (this step may report an error, don't worry about it)
After configuring the relevant parameters of DHCP, we also need to start the DHCP service. The command code is as follows:
service dhcpd restart After that, there is no error on centos7. The word [OK] appears on centos6.5.
Learn from this experience to configure my computer
Configuration and use of dhcp server in LINUX -cyl
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=325530155&siteId=291194637
Recommended
Ranking