dhcpcd项目地址:http://www.linuxfromscratch.org/blfs/view/stable-systemd/basicnet/dhcpcd.html

1.下载dhcpcd包并校验md5

wget http://roy.marples.name/downloads/dhcpcd/dhcpcd-7.0.7.tar.xz

md5sum -c md5sums

2.解压并进入包目录

tar -xvf dhcpcd-7.0.7.tar.xz

cd dhcpcd-7.0.7

3.参照书中内容编译安装

./configure --libexecdir=/lib/dhcpcd \
--dbdir=/var/lib/dhcpcd &&
make
make install

4.返回blfs-sources目录并删除解压的包目录

cd $LFS/sources/blfs-sources/

rm -rf dhcpcd-7.0.7

5.安装blfs脚本文件

make install-dhcpcd

6.配置开机启动dhcpcd服务

systemctl enable dhcpcd@eth0
etho更换为实际的网络接口
05-11 15:02