Содержание
- 2. System Time
- 3. A precise clock is a is a prerequisite for operating correctly. Linux uses two types of
- 4. Hardware Clock
- 5. Maintaining Hardware Clock The hwclock (hardware clock) command is used by the root user to update
- 6. Maintaining Hardware Clock To set the hardware clock from the current system time, execute either of
- 7. Maintaining Hardware Clock To view both clocks at the same time, separate the commands with a
- 8. System Clock
- 9. Maintaining System Clock To view the system clock, use the date command: Чтобы просмотреть системные часы,
- 10. Clock Drift Clock drift is how much time the hardware clock gains or loses on a
- 11. Setting Timezones
- 12. Setting Timezone The /usr/share/zoneinfo directory contains timezone date for different regions. Каталог /usr/share/zoneinfo содержит дату часового
- 13. Setting Timezone On Debian-based systems (Ubuntu, Linux Mint), the timezone can be set by updating the
- 14. Network Time Protocol (NTP)
- 15. Network Time Protocol (NTP) Most used method for synchronizing the local server’s time with the time
- 16. The ntpd daemon Sets and updates the system time in synchronization with reference time servers. Sends
- 17. Example /etc/ntp.conf file Used to configure the NTP daemon as a server or client. A sample
- 18. The /etc/ntp.conf file The server keyword specifies the NTP servers to synchronize with. Ключевое слово server
- 19. Querying NTP The ntpq utility is used to query NTP and monitor the performance of the
- 20. Querying NTP The following table explains some of the fields in the output of the ntpq
- 21. Querying NTP An NTP stratum refers to how close to a reference clock (i.e. Strarum-0 clock)
- 22. Tracing NTP The ntptrace utility provides the trace of the chain of NTP servers to the
- 23. The ntpdate Command The ntpdate command is used to set the system date and time. Using
- 24. Setting Time with the ntpdate Command To verify if a specific NTP server is available, execute
- 25. Using pool.ntp.org Virtual cluster of time servers providing NTP service globally. Uses a server pool implementation
- 26. Understanding chrony
- 27. Understanding chrony Chrony is a set of programs that are used to ensure that the clock
- 28. Components of chrony chronyd The daemon that synchronizes the system with time retrieved from NTP servers
- 29. chronyc Command If not arguments are specified, chronyc works in interactive mode: Если аргументы не указаны,
- 30. Configuration of chronyd The configuration file that controls chronyd is the /etc/chrony.conf file (on some distributions,
- 31. System Logging
- 32. Introduction The sysklogd daemon provides logging facilities for applications and programs The klogd daemon provides logging
- 33. Log File Locations The rsyslogd daemon is configured using the /etc/rsyslog.conf file. Демон rsyslogd настраивается с
- 34. Kernel Logging The klogd daemon passes messages received from the kernel to syslogd for processing. Демон
- 35. System Logging The rsyslogd acts on the messages as per action specified in the /etc/rsyslog.conf file
- 36. Configuring rsyslogd selector: describes what will be logged Contains 2 parts: facility and priority separated by
- 37. Configuring rsyslogd action: describes where to send the log information Specify the full path to the
- 38. Example /etc/rsyslog.conf *.info;mail.none;authpriv.none;cron.none /var/log/messages # Log everything but mail, authentication and cron in # the /var/log/messages
- 39. The logger Command Used to send messages to the system logging facility. Commonly used to verify
- 40. The logger Command To demonstrate: Consider the following rsyslog configuration file entry which will isolate mail
- 41. rsyslog Log Management Log files grow over time. An administrator should institute logging policies that determine
- 42. logrotate Command The logrotate tool is used to automate the rotation of log files with different
- 43. logrotate Command The following table summarizes the settings found in the /etc/logrotate.conf configuration file: В следующей
- 44. logrotate Command The following is an example /etc/logrotate.conf configuration file: Ниже приведен пример конфигурационного файла /etc/logrotate.conf:
- 45. Systemd Journal For systems using systemd as their init system, rsyslog has been replaced by the
- 46. Systemd Journal Configuration The /etc/systemd/journald.conf file controls the systemd-journal. The most used directive in the file
- 47. Systemd Journal Log Management The journalctl command is used to interact with the systemd-journald. Command flags
- 48. system-cat Command The systemd-cat command allows you to add to the systemd-journald data. The output from
- 49. system-cat Command Below is an example of adding the process list for the user to the
- 50. Email Configuration
- 51. Mail Transfer Agents (MTAs) MTAs handle the transfer of messages between machines and routing them Commonly
- 52. The mail command Provides a command interface for the mail system Provides command line options for
- 53. The mail Command A “?” prompt will be shown to the user to enter subsequent mail
- 54. The mail Command Reply to the 2nd message in the mailbox: Ответ на 2-е сообщение в
- 55. Startup Options Some of the key options of the mail command are: Некоторые из ключевых параметров
- 56. Sending Mail To send new mail to a user, type mail on the command line, followed
- 57. The mailq Command Messages are removed from the mail queue after being sent to the remote
- 58. Aliasing Email Addresses Used to convert one recipient name to another. Alias can be created to
- 59. Aliasing Email Addresses Deliver all messages that are sent to the local support mailbox to the
- 60. Aliasing Email Addresses The sendmail utility cannot read the /etc/mail/aliases file. It expects a binary format
- 61. Mail Forwarding The .forward file, placed in a user’s home directory, is used for automatically forwarding
- 62. Mail Forwarding To forward the incoming messages to support and psgsupport mailboxes and do not retain
- 63. SMTP Simple Mail Transfer Protocol (SMTP) is the standard for email servers communication. Uses port 25,
- 64. Sendmail Released in 1979 as “delivermail”, rewritten later to adapt TCP. Was the standard MTA at
- 65. Sendmail Uses /usr/sbin/mail.local program if both the sender and receiver are on the same machine. Uses
- 66. Sendmail Message header contains routing information Sendmail daemon configured using the /etc/mail/sendmail.cf file Uses a single
- 67. sendmail Command Used to send messages to recipients. Handles message routing. Mainly used to deliver pre-formatted
- 68. The sendmail command The following command sends mail to test@gsource.com: Следующая команда отправляет почту test@gsource.com: the
- 69. Postfix Developed at IBM in the 1990s. Alternative to Sendmail’s single executable design which causes security
- 71. Скачать презентацию