dhcpcd项目地址:http://www.linuxfromscratch.org/blfs/view/8.3/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..tar.xz

cd dhcpcd-7.0.

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.

5.安装blfs脚本文件

make install-service-dhcpcd

6.为网卡配置dhcpcd

cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
ONBOOT="yes"
IFACE="eth0"
SERVICE="dhcpcd"
DHCP_START="-b -q <insert appropriate start options here>"
DHCP_STOP="-k <insert additional stop options here>"
EOF
eth0更改为网卡设备名称
04-27 07:06