Сбор пожертвований на сервер для UBUNTU.RU
0 Пользователей и 1 Гость просматривают эту тему.
Changing the Logging FileThe last configuration I would like to demonstrate today is changing the default logging file. First, I'll change the logging line in /usr/local/etc/dhcpd.conf so that it looks like this:Код: [Выделить]# Use this to send dhcp log messages to a different log file (you also# have to hack syslog.conf to complete the redirection).log-facility local7;Next, I'll create an empty log file called dhcpd.log:Код: [Выделить]# touch /var/log/dhcpd.logThen, I'll create an entry for this logfile in /etc/syslog.conf by adding this line:Код: [Выделить]local7.* /var/log/dhcpd.logLet's take a look at that entry for a moment. By default, you're given eight logging "facilities" to use for local applications; these are called local0 to local7. You can use whichever local facility you wish, as long as it isn't being used by another application. I've decided to use local7, which is why I also referred to it by that name in the DHCP server configuration file.Once you've chosen a facility, you follow it by a period and a logging level. I've chosen the logging level of *, which will log all events, regardless of their level. I then gave the location of the log file to which to write events.Once I've saved the changes to /etc/syslog.conf, I need to send syslogd a signal one so it is aware of the changes:Код: [Выделить]# killall -1 syslogdI also need to make the DHCP server aware of the change. Remember, a signal one won't do it, so I'll use the restart option to the startup script:Код: [Выделить]# /usr/local/etc/rc.d/isc-dhcpd.sh restart
# Use this to send dhcp log messages to a different log file (you also# have to hack syslog.conf to complete the redirection).log-facility local7;
# touch /var/log/dhcpd.log
# killall -1 syslogd
# /usr/local/etc/rc.d/isc-dhcpd.sh restart
Страница сгенерирована за 0.081 секунд. Запросов: 23.
© 2012 Ubuntu-ru — Русскоязычное сообщество Ubuntu Linux.
© 2012 Canonical Ltd. Ubuntu и Canonical являются зарегистрированными торговыми знаками Canonical Ltd.