Objectives
Upon completion of this unit, you should be able to:
- Understand the importance of time syncronization
- Configure system logging
- Setup the X Window System
- remotely administer the system
- Automate tasks with cron
- Configure printing
Network Time Protocol
1) Workstation hardware clocks tend to drift over time without correction
2) Many application require accurate timing
3) Time synchronization makes system logs easier to analyze
4) NTP couters the drift by manipulating the length of second
5) NTP clients should use three time servers
6) Config file: /etc/ntp.conf
7) Configure tool: system-config-date
System Logging
1) Centralized logging daemons: syslogd, klogd
2) Log file examples:
- /var/log/dmesg: Kernel boot messages
- /var/log/messages: Standard system error messages
- /var/log/maillog: Mail system messages
- /var/log/secure: Securit, authentication, and xinetd messages
3) Application log files and directories also reside in /var/log
syslog configuration
1) syslog system V intialization script in /etc/rc.d/init.d controls both the syslogd and the klogd daemons
2) /etc/syslog.conf configures system logging
3) /etc/sysconfig/syslog sets switches used when starting syslogd and klogd from the system V initialization script
XOrg: The X11 Server
1) Foundation for the Red Hat Enterprise Linux graphical user interface (GUI)
2) Open source implementation of X11
3) Client/ Server architecture
4) Core server with dynamically loaded modules
- drivers: ati, nv, mouse, keyboard, etc.
- extensions: dri, glx, and extmod
5) Font Rendering
- Native server: xfs
- Fontconfig/Xft libraries
XOrg Server Configuration
1) Typically configured afte installation
2) Post-install configuration:
- Best results while in runlevel 3!
- system-config-display
options: �Cnoui, �Creconfig
3) Stored in /etc/X11/xorg.conf
XOrg in runlevel 3
1) Two methods to establish the environment
- /usr/X11R6/bin/xinit
- /usr/X11R6/bin/startx
2) Environment configuration
- /etc/X11/xinit/xinitrc and ~/.xinitrc
- /etc/X11/xinit/Xclients and ~/.Xclients
- /etc/sysconfig/desktop
XOrg in runleve 5
1) Envrionment established by /sbin/init
2) Environment configuration
- /etc/inittab
- /etc/X11/perfdm
3) /etc/sysconfig/desktop
- Desktop defines the window manager
- Displaymanager defines the display manager
4) /etc/X11/xdm/Xsession
- /etc/x11/xinit/xinitrc.d/*
- ~/.xsession or ~/.Xclients
Remote X Sessions
1) X protocol communication is unencrypted
2) Host-based sessions implemented through the xhost command
3) User-based sessions implemented through the Xauthority mechanism
4) sshd may automatically install xauth keys on remote machine
- Tunnels X protocol over secure encrypted ssh connection
SSh: Secure Shell
1) encrypted remote shell
2) frequently used for remote system administration
3) can copy files securely
4) can execute commands remotely
# ssh root@host 'ifconfig eth0’
5) can tunnel X11 and other TCP based network traffice
6) supports key based authentication
VNC: Virtual Network Computing
1) Allow to access or share a complete desktop over the network
2) Uses significantly less bandwidth as pure remote X connections
3) Server
- Individual users can start a VNC server with the command: vncserver
- Run $HOME/.vnc/xstartup upon startup
- Requires a VNC password which should not be identical to the system password
- Servers can automatically be started via /etc/init.d/vncserver
4) Client
- connects to a remote VNC server with vncviewer host:screen
- unique screen numbers distinguish between multiple VNC servers running on the same host
- supports tunneling throught SSH: vncview �Cvia user@host localhost:1
Cron
1) Used to schedule recurring events
2) Use crontab to edit, install and view job schedules
3) Syntax
- crontab [-u user] file
- crontab [-l | �Cr | �Ce] (-l lists crontab, �Cr remove crontab, �Ce edits crontab using $EDITOR)
Controlling Access to cron
1) Restrict /allow user access to cron
- /etc/cron.allow
- /etc/cron.deny
2) Contains usernames to allow / deny access
System crontab Files
1) Different format than user crontab files
2) Master crontab file /etc/crontab runs executables in
- /etc/cron.hourly
- /etc/cron.daily
- /etc/cron.weekly
- /etc/cron.monthly
3) /etc/cron.d/ directory contains additionaly system crontab files
Daily Cron Jobs
1) tmpwatch
- Cleans old files in specific directories
- Keeps /tmp from filling up
2) logrotate
- Keeps log files from geting to large
- Highly configurable in /etc/logrotate.conf
3) logwatch
- provides a summary about system activity
- reports suspicious messages
- configuration file: /etc/log.d/conf/logwatch.conf
The anacron System
1) anacron runs cron jobs that did not run when the computer is down
- Assumes computers are not up continually
- Vital for laptops, desktops, workstation, and other systems that are not up continually
- Useful for servers that need to be taken down temporarily
2) Configuration file: /etc/anacrontab
- Field 1: If the job has not been run in this many days…
- Field 2: wait the number of minutes after reboot and then run it
- Field 3: job identifier
- Field 4: the job to run
CUPS
1) Uses the Internet Printing Protocol (IPP)
- allow remote browsing of printer queues
- based on HTTP/1.1
- uses PPD files to describe printer
- Configuratino files: /etc/cups/cupsd.conf, /etc/cups/printers.conf
2) Configuration tools:
- system-config-printer
- web based on http://localhost :631
- commandline management with lpadmin
End of Unit4
1) Questions and Answers
2) Summary
- system logging
- system-config-display
- remote adminstration tools: ssh and vnc
- task automation
- what are the tools to configure cups?