编辑dhcp服务配置文件
vim/etc/dhcp/dhcpd.conf在末尾加入
log-facilitylocal4;
编辑rsyslog服务配置文件,修改/var/log/messages加入local4.none/var/log/messages
vim/etc/rsyslog.conf加入
#Savedhcpdmessagesalsotodhcpd.log
local4.*/var/log/dhcpd.log
#*.info;mail.none;authpriv.none;cron.none/var/log/messages
*.info;mail.none;authpriv.none;cron.none;local4.none/var/log/messages
重启rsyslog服务
servicersyslogrestart
重启dhcpd服务
servicedhcpdrestart
tail-f/var/log/dhcpd.conf
tail-f/var/log/messges