SYSTEM SERVICES
NETWORK TIME PROTOCOL:
Workstation hardware clocks tend to drift over time without correction
Many application require accurate timing
Time synchronization makes system logs easier to analyze
NTP clients should use three time servers
Config tool: system-config-date
NTP is configured in /etc/ntp.conf
server 192.168.0.1
server 192.168.0.2
server clock.example.com
driftfile /var/lib/ntp/drift
ENABLE THE NETWORK TIME PROTOCOL
system-config-date
Enter the NTP server's name
service ntpd start/restart/reload
chkconfig ntpd on
SYSTEM LOGGING:
Log file examples:
CENTRALISED LOG HOST CONFIGURATION:
/var/log/dmesg: Kernel boot messages
/var/log/messages: Standard system error messages
/var/log/maillog: Mail system messages
/var/log/secure: Security, authentication, and xinetd messages
LOG SERVER:
vim /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-r -m 0"
service syslog start/restart/reload
chkconfig syslog on
LOG CLIENT:
Append the entry in /etc/syslog.conf
authpriv.*
authpriv.*
/var/log/secure
@
(By this entry user authentication log messages are sending to the log server)
service syslog start/restart/reload
chkconfig syslog on
XORG SERVER CONFIGURATION
Configuration stored in /etc/X11/xorg.conf
Configuration settings can be changes as follows
system-config-display
setup select x configuration
startx
service xfs start/restart/reload
chkconfig xfs on
Note: This is process gives better results in runlevel 3, by this option we can change system
resolution, colour depth, monitor type, video card...
VNC: VIRTUAL NETWORK COMPUTING
Allows to access or share a complete desktop over the network. Uses significantly less
bandwidth as pure remote X connections
VNC SERVER
Individual users can start a VNC server with the command: vncserver
Requires a VNC password which should not be identical to the system password
System -> Preferences -> Remote Desktop
Enable Allow users to view your Desktop and Ask for your confirmation
Note: By this users can view your Desktop with your confirmation
Servers can automatically be started via
/etc/init.d/vncserver start/restart/reload
(or)
service vncserver start/restart/reload
VNC CLIENT
Connects to a remote VNC server with vncviewer host:screen
vncviewer
(or)
Application Accessories VNC Viewer ip
(or)
vncviewer
OpenSSH
Encrypted remote shell
Frequently used for remote system administration
Can copy files securely
Supports key based authentication
ssh root@station2.example.com
Generating Key Pairs
If you do not want to enter your password every time you use ssh, scp, or sftp to connect to a
remote machine, you can generate an authorization key pair.
Keys must be generated for each user.
To generate keys for a user, use the following steps as the user who wants to connect to
remote machines.
If you complete the steps as root, only root will be able to use the keys.
Red Hat Enterprise Linux 5.1 uses SSH Protocol 2 and RSA keys by default.
Generating an RSA Key Pair for Version 2
To generate an RSA key pair to work with version 2 of the protocol, type the following
command at a shell prompt:
ssh-keygen -t rsa
Accept the default file location of ~/.ssh/id_rsa.
Enter a passphrase different from your account password and confirm it by entering it again.
Note: if you don’t want password just press Enter twice.
The public key is written to ~/.ssh/id_rsa.pub. The private key is written to
~/.ssh/id_rsa. Never distribute your private key to anyone.
Change the permissions of the .ssh directory using the following command:
chmod 755 ~/.ssh
Copy the contents of ~/.ssh/id_rsa.pub into the file ~/.ssh/authorized_keys on the
machine to which you want to connect. If the file ~/.ssh/authorized_keys exist, append
the contents of the file ~/.ssh/id_rsa.pub to the file ~/.ssh/authorized_keys on the
other machine.
scp –r .ssh/ id_rsa.pub@:.ssh/authorized_keys
Change the permissions of the authorized_keys file using the following command:
chmod 644 ~/.ssh/authorized_keys
Note: The above configuration should be done in both Systems.
Now you are able to ssh on the another system with out password (Empty password given), [or] with
password that you have given (own password given)
CRONTAB:
crontab -eu
crontab -lu
crontab -ru
FIELD
minute
hour
day of month
month
day of week
==> create/edit crontab
==> lists user crontab
==> removes crontab
ALLOWED VALUES
0-59
0-23
1-31
1-12
0-7 (0 or 7 is Sun,)
A field may be an asterisk (*), which always stands for first-last
Ex: Run at 2:15pm on the first of every month
crontab -eu
15 14 1 * *
service crond start/restart/reload
chkconfig crond on
echo "this is test" > /dev/tty1
THE ANACRON SYSTEM
Anacron runs cron jobs that did not run when the computer is down
Assumes computers are not up continually
Vital for laptops, desktops, workstations, and other systems that are not up continually
Useful for servers that need to be taken down temporarily
Configuration file: /etc/anacrontab
Field 1: If the job has not been run in this many days...
Field 2: wait this number of minutes after reboot and then run it
Field 3: job identifier
Field 4: the job to run
CUPS
Uses the Internet Printing Protocol (IPP)
Allows remote browsing of printer queues
CONFIGURATION FILES
/etc/cups/cupsd.conf
/etc/cups/printers.conf
CONFIGURATION TOOLS
system-config-printer
Web based on http://localhost:631/
Command line management of print queues with lpadmin
lp
lpr
lpq
lprm
cancel
lpstat
CONFIGURING PRINTER:
system-config-printer
Click the New button.
Click Forward
Change the name to printerX
Click Forward
Select Locally-connected as the queue type and highlight /dev/lp0
Click Forward
Select Generic manufacturer and choose Raw Print Queue
Click Forward
Click Finish
Click Yes when it asks if you want to print a test page, and click Yes when it asks if
it looks okay.
Close down system-config-printer. Verify that there is a job in the queue:
lpq
service cups start/restart/reload
chkconfig cups on
Printer X is ready and printing.
to print a file
submits files for printing.
to view print queue
to cancel jobs
to cancel jobs
displays status information about the current classes, jobs, and printers
NETWORK TIME PROTOCOL:
Workstation hardware clocks tend to drift over time without correction
Many application require accurate timing
Time synchronization makes system logs easier to analyze
NTP clients should use three time servers
Config tool: system-config-date
NTP is configured in /etc/ntp.conf
server 192.168.0.1
server 192.168.0.2
server clock.example.com
driftfile /var/lib/ntp/drift
ENABLE THE NETWORK TIME PROTOCOL
system-config-date
Enter the NTP server's name
service ntpd start/restart/reload
chkconfig ntpd on
SYSTEM LOGGING:
Log file examples:
CENTRALISED LOG HOST CONFIGURATION:
/var/log/dmesg: Kernel boot messages
/var/log/messages: Standard system error messages
/var/log/maillog: Mail system messages
/var/log/secure: Security, authentication, and xinetd messages
LOG SERVER:
vim /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-r -m 0"
service syslog start/restart/reload
chkconfig syslog on
LOG CLIENT:
Append the entry in /etc/syslog.conf
authpriv.*
authpriv.*
/var/log/secure
@
(By this entry user authentication log messages are sending to the log server)
service syslog start/restart/reload
chkconfig syslog on
XORG SERVER CONFIGURATION
Configuration stored in /etc/X11/xorg.conf
Configuration settings can be changes as follows
system-config-display
setup select x configuration
startx
service xfs start/restart/reload
chkconfig xfs on
Note: This is process gives better results in runlevel 3, by this option we can change system
resolution, colour depth, monitor type, video card...
VNC: VIRTUAL NETWORK COMPUTING
Allows to access or share a complete desktop over the network. Uses significantly less
bandwidth as pure remote X connections
VNC SERVER
Individual users can start a VNC server with the command: vncserver
Requires a VNC password which should not be identical to the system password
System -> Preferences -> Remote Desktop
Enable Allow users to view your Desktop and Ask for your confirmation
Note: By this users can view your Desktop with your confirmation
Servers can automatically be started via
/etc/init.d/vncserver start/restart/reload
(or)
service vncserver start/restart/reload
VNC CLIENT
Connects to a remote VNC server with vncviewer host:screen
vncviewer
(or)
Application Accessories VNC Viewer ip
(or)
vncviewer
OpenSSH
Encrypted remote shell
Frequently used for remote system administration
Can copy files securely
Supports key based authentication
ssh root@station2.example.com
Generating Key Pairs
If you do not want to enter your password every time you use ssh, scp, or sftp to connect to a
remote machine, you can generate an authorization key pair.
Keys must be generated for each user.
To generate keys for a user, use the following steps as the user who wants to connect to
remote machines.
If you complete the steps as root, only root will be able to use the keys.
Red Hat Enterprise Linux 5.1 uses SSH Protocol 2 and RSA keys by default.
Generating an RSA Key Pair for Version 2
To generate an RSA key pair to work with version 2 of the protocol, type the following
command at a shell prompt:
ssh-keygen -t rsa
Accept the default file location of ~/.ssh/id_rsa.
Enter a passphrase different from your account password and confirm it by entering it again.
Note: if you don’t want password just press Enter twice.
The public key is written to ~/.ssh/id_rsa.pub. The private key is written to
~/.ssh/id_rsa. Never distribute your private key to anyone.
Change the permissions of the .ssh directory using the following command:
chmod 755 ~/.ssh
Copy the contents of ~/.ssh/id_rsa.pub into the file ~/.ssh/authorized_keys on the
machine to which you want to connect. If the file ~/.ssh/authorized_keys exist, append
the contents of the file ~/.ssh/id_rsa.pub to the file ~/.ssh/authorized_keys on the
other machine.
scp –r .ssh/ id_rsa.pub
Change the permissions of the authorized_keys file using the following command:
chmod 644 ~/.ssh/authorized_keys
Note: The above configuration should be done in both Systems.
Now you are able to ssh on the another system with out password (Empty password given), [or] with
password that you have given (own password given)
CRONTAB:
crontab -eu
crontab -lu
crontab -ru
FIELD
minute
hour
day of month
month
day of week
==> create/edit crontab
==> lists user crontab
==> removes crontab
ALLOWED VALUES
0-59
0-23
1-31
1-12
0-7 (0 or 7 is Sun,)
A field may be an asterisk (*), which always stands for first-last
Ex: Run at 2:15pm on the first of every month
crontab -eu
15 14 1 * *
service crond start/restart/reload
chkconfig crond on
echo "this is test" > /dev/tty1
THE ANACRON SYSTEM
Anacron runs cron jobs that did not run when the computer is down
Assumes computers are not up continually
Vital for laptops, desktops, workstations, and other systems that are not up continually
Useful for servers that need to be taken down temporarily
Configuration file: /etc/anacrontab
Field 1: If the job has not been run in this many days...
Field 2: wait this number of minutes after reboot and then run it
Field 3: job identifier
Field 4: the job to run
CUPS
Uses the Internet Printing Protocol (IPP)
Allows remote browsing of printer queues
CONFIGURATION FILES
/etc/cups/cupsd.conf
/etc/cups/printers.conf
CONFIGURATION TOOLS
system-config-printer
Web based on http://localhost:631/
Command line management of print queues with lpadmin
lp
lpr
lpq
lprm
cancel
lpstat
CONFIGURING PRINTER:
system-config-printer
Click the New button.
Click Forward
Change the name to printerX
Click Forward
Select Locally-connected as the queue type and highlight /dev/lp0
Click Forward
Select Generic manufacturer and choose Raw Print Queue
Click Forward
Click Finish
Click Yes when it asks if you want to print a test page, and click Yes when it asks if
it looks okay.
Close down system-config-printer. Verify that there is a job in the queue:
lpq
service cups start/restart/reload
chkconfig cups on
Printer X is ready and printing.
to print a file
submits files for printing.
to view print queue
to cancel jobs
to cancel jobs
displays status information about the current classes, jobs, and printers
No comments:
Post a Comment