[root@Server yum.repos.d]# yum clean all
已加载插件:langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
正在清理软件源: Base
Cleaning up everything
[root@Server yum.repos.d]#
重新加载软件包
[root@Server yum.repos.d]# yum repolist all
已加载插件:langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Base | 4.1 kB 00:00
(1/2): Base/group_gz | 137 kB 00:00
(2/2): Base/primary_db | 4.0 MB 00:00
源标识 源名称 状态
Base RHEL 启用: 4,986
repolist: 4,986
[root@Server yum.repos.d]#
repolist:4,986:表示有可用的软件包数量,如果没有,则检查本地源文件的配置。
安装DHCP软件包
使用YUM工具安装DHCP软件包
[root@master-bad ~]# yum -y install dhcp
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package dhcp.x86_64 12:4.2.5-58.el7 will be installed
...
Installed:
dhcp.x86_64 12:4.2.5-58.el7
Dependency Updated:
dhclient.x86_64 12:4.2.5-58.el7 dhcp-common.x86_64 12:4.2.5-58.el7
dhcp-libs.x86_64 12:4.2.5-58.el7
Complete!
[root@master-bad ~]#
复制DHCP的默认配置文件到DHCP的配置目录中
[root@master-bad ~]# cd /etc/dhcp/
[root@master-bad dhcp]# ls
dhclient.d dhclient-exit-hooks.d dhcpd6.conf dhcpd.conf scripts
[root@master-bad dhcp]# cat dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
[root@master-bad dhcp]# cat /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example | grep -v "#" >> dhcpd.conf
[root@master-bad dhcp]# ls
dhclient.d dhclient-exit-hooks.d dhcpd6.conf dhcpd.conf scripts
[root@master-bad dhcp]#