system services

14
Unit 4: System Services Welcome!

Upload: vibhor-sharma

Post on 21-Jul-2016

212 views

Category:

Documents


0 download

DESCRIPTION

linux

TRANSCRIPT

Page 1: System Services

Unit 4:

System Services

Welcome!

Page 2: System Services

2

Unit-4: System Services

Network Time Protocol

Configure System Logging

X Window System

Remotely administering system

Automate jobs with – crontab

Configuring Printing

Page 3: System Services

3

Network Time Protocol

NTP stands for Network Time Protocol, and it is an Internet protocol used to synchronize the clocks of computers to some time reference. NTP is an Internet standard protocol originally developed by Professor David L. Mills at the University of Delaware.

NTP is one of the oldest Internet protocols still in use (since before 1985)

Page 4: System Services

4

Network Time ProtocolNTP uses a hierarchical system of "clock strata". The stratum levels define the distance from the reference clock and exist to prevent cycles in the hierarchy. Green line (direct connection) and Red line (network connection)

Page 5: System Services

5

Network Time Protocol

NTP is configured in /etc/ntp.conf.Can also be configured using system-config-date

Page 6: System Services

6

System LoggingVariety of log files are maintained. And its understanding is often vital for troubleshooting system problems. The centralized logging is provided by two daemons : syslogd Klogd

Some of the more important log files that are a part of system administrator's forte are as follows:

/var/log/dmesg - This log file is written upon system boot. It contains messages from the kernel that were raised during the boot process. You can also view them using the command: dmesg

/var/log/messages - This is the standard system log file, which contains messages from all your system software, non-kernel boot issues, and messages that go to 'dmesg'.

Page 7: System Services

7

System Logging

/var/log/maillog - This log file contains messages and errors from your sendmail.

/var/log/secure - This log file contains messages and errors from security related systems such as login, tcp_wrappers, and xinetd. This log file is very useful in detecting and investigating network abuse.

Main Configuration Files:

/etc/syslog.conf/etc/sysconfig/syslog

Page 8: System Services

8

Remote X Sessions

sshd - Sshd (Secure Shell Daemon) is the daemon program for ssh. Together these programs replace rlogin and rsh programs, and provide secure encrypted communications between two untrusted hosts over an insecure network.

/var/log/secure - This log file contains messages and errors from security related systems such as login, tcp_wrappers, and xinetd. This log file is very useful in detecting and investigating network abuse.

Main Configuration Files:

/etc/syslog.conf/etc/sysconfig/syslog

Page 9: System Services

9

Kernel ModulesThe Linux kernel has a modular design. At boot time, only a minimal resident

kernel is loaded into memory. Thereafter, whenever a user requests a feature that is not present in the resident kernel, a kernel module, sometimes referred to as a driver, is dynamically loaded into memory.

During installation, the hardware on the system is probed. Based on this probing and the information provided by the user, the installation program decides which modules need to be loaded at boot time. The installation program sets up the dynamic loading mechanism to work transparently.

Without modules, we would have to build monolithic kernels and add new functionality directly into the kernel image. Besides having larger kernels (larger foot-print), this has the disadvantage of requiring us to rebuild and reboot the kernel every time we want new functionality.

Located under /lib/modules/$(uname -r) /

Page 10: System Services

10

Kernel Modules Utilitieslsmod: gives a list of currently loaded modules

modprobe: can be used to load or unload a module

modprobe -r usb_storage

modinfo: can be used to display the information regarding a module

modinfo usb_storage

Page 11: System Services

11

Managing initrd Image Initial RAM disk provides the basic set of modules / drivers required to boot

the machine. Located under /boot/initrd-$(uname -r).img Can be recreated, if deleted, by using “mkinitrd” command Can be rebuild by using “mkinitrd” command using “--with” option

mkinitrd --with=usb_storage /boot/initrd-$(uname -r).img $(uname -r)

Page 12: System Services

12

sysctl: persistent kernel configuration sysctl is used to modify kernel parameters at runtime.

List all the current settings:

– sysctl -a To configure a parameter using “sysctl” command

– sysctl -w net.ipv4.icmp_echo_ignore_all = 1 Make the changes permanent by giving

– sysctl -p

Page 13: System Services

13

Exploring Hardware Devices lspci : to list current PCI devices. lsusb : to list current USB connected devices.

hal-device-manager : display devices in graphical window

Page 14: System Services

?Questions