Linux Installation: Installing Linux Redhat 9 by
Linux Installation: Installing Linux Redhat 9 by
Workshop on:
System installation & customization
System maintenance
System performance & monitoring
Workshop does not deal with issues of:
System Security
IDS
Packet filtering using iptables
Overview
The object of this seminar is to provide
comprehensive check list of the more important
steps to be taken to install a linux system.
cont...
Overview continued
1. Basic scripts
2. Sed and awk expressions
3. Regular expressions
4. Setting up UDP and TCP sockets
Overview cont.
Raj Nagendra
William Zereneh
Introduction
Hardware compatibility
Disk space
Installation method
Installation class
Personal Desktop Installation
Workstation Installation
Server Installation
Custom Installation
Upgrade
1. Installation and Customization
Hardware Information
Where to get information about hardware
Record your system's hardware
1. Installation and Customization
Authentication Configuration
Package Group Selection
Selecting Individual Packages
Unresolved Dependencies
Preparing to Install
Installing Packages
Boot Diskette Creation
Video Card Configuration
X Configuration – Monitor and
Customization
Installation Complete
1. Installation and Customization
Advantages
Conventional networks require password-based
authentication schemes
Such schemes requires username and password
Transmission of authentication information for many services
is unencrypted
KERBEROS NEVER SENDS PASSWORDS ACROSS THE
NETWORK
1. Kerberos Cont.
Disadvantages
Implementation is difficult
Account information migration from UNIX password database
to a Kerberos password can be tedious
Partial compatibility with Pluggable Authentication Modules
PAM
Applications need to be modified to utilize Kerberos
Assumes a trusted user using an untrusted host on an
untrusted network, but if Key Distribution Center (KDC) is
compromised, then the entire Kerberos authentication system
will be at risk.
All or nothing solution. must use PAM or kerberized versions
of all clients/server applications
1. Kerberos Cont.
Run levels
/etc/inittab
Change run level for system maintenance
Halt System: /sbin/init 0
Single User: /sbin/init 1
Multiuser: /sbin/init 2
Full Multiuser: /sbin/init 3
Graphical: /sbin/init 5
Reboot System: /sbin/init 6
2. System Maintenance
Type of Backups
Full backup
Every single file is written to backup media
Incremental backup
Only modified files are written to backup media
Differential backup - Cumulative
Modified files will continue to be included in all
subsequent differential backups
Backup Media
Tape
Disk
Network
2. System Maintenance
Backup Technologies
tar
tar vcf /mnt/backup/home.backup.tar /home/
tar vzcf /mnt/backup/home.backup.tar /home/
cpio
find /home/ | cpio -o > /mnt/backup/home.backup.cpio
find /home/ -atime +365 | cpio -o >
/mnt/backup/home.backup.cpio
AMANDA – Advanced Maryland Automatic Disk
Archiver
A client/server based backup application
Single backup server; multiple clients
3. System Performance and
Monitoring
Tuning IDE Hard Disk Performance
Put swap partition near the beginning of hard
drive
Hard disk read timing
/sbin/hdparm -t /dev/hdaX
Enable 32-bit Transferes
/sbin/hdparm -c1 /dev/hdX
Enable DMA “using_dma” flag
/sbin/hdparm -d1 /dev/hdX
Show information
/sbin/hdparm -i /dev/hdX
3. System Performance and
Monitoring
Network
Change the following TCP/IP values
edit /etc/sysctl.conf
change/add
# Decrease the time default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 30
# Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 1800
# Turn off the tcp_window_scaling
net.ipv4.tcp_window_scaling = 0
# Turn off the tcp_sack
net.ipv4.tcp_sack = 0
# Turn off the tcp_timestamps
net.ipv4.tcp_timestamps = 0
Restart network - /etc/init.d/network restart
3. System Performance and
Monitoring
File System
ext3 over ext2
/bin/umount /dev/hdaX
/sbin/tune2fs -j /dev/hdaX
edit /etc/fstab change ext2 to ext3 for /dev/hdaX
/bin/mount /dev/hdaX
Maximum number of file handles allocated
by the kernel - file-max parameter
Aprox: 256 file for every 4M
Edit /etc/sysctl.conf add/change
# Improve the number of open files
fs.file-max = 8192 # for a 128M machine
3. System Performance and
Monitoring
Access Time
Linux records information about when files were
created, last modified and last accessed
Highly accessed files should have atime
attribute removed
/usr/bin/chattr -R +A /var/spool/
noatime mount parameter
edit /etc/fstab and add noatime option
/dev/hdaX /chroot ext3 defaults,noatime 1 2
3. System Performance and
Monitoring
Resource Monitoring
What to Monitor? Resources
CPU Power
Bandwidth
Memory
Storage
Utilities to use for CPU, Bandwidth and Memory
free
top
vmstat
3. System Performance and
Monitoring
free – The free command displays system
memory utilization
Example:
total used free shared buffers cached
Mem: 255508 240268 15240 0 7592
86188
-/+ buffers/cache: 146488 109020
Swap: 530136 26268 503868
Automate free
/usr/bin/watch -n 1 -d free
3. System Performance and
Monitoring
top – Displays CPU utilization, process
statistics, memory utilization
example
14:18:52 up 16 days, 21:37, 1 user, load average: 0.07, 0.02, 0.00
71 processes: 70 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 0.0% user 0.0% system 0.0% nice 0.0% iowait 100.0% idle
CPU1 states: 2.0% user 6.0% system 0.0% nice 0.0% iowait 90.0% idle
Mem: 513232k av, 505424k used, 7808k free, 0k shrd, 66464k buff
379364k actv, 0k in_d, 12044k in_c
Swap: 417648k av, 108724k used, 308924k free 325384k cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
18866 root 20 0 984 984 788 R 6.5 0.1 0:00 1 top
3. System Performance and
Monitoring
vmstat – Display process, memory, swap,
I/O, system and CPU activity
example:
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 108724 6400 66452 325664 0 0 5 6 10 10 2 1 8
si – swaped in
so – swaped out
3. System Performance and
Monitoring
Other monitoring tools
The Sysstat suite
/usr/bin/iostat
/usr/bin/mpstat
/usr/bin/sar
3. System Performance and
Monitoring
Storage
Utilities to use for Storage
smartd/smartctl
df
du
badblocks
smartd – is a daemon that monitors the Self-
Monitoring, Analysis and Reporting Technology
System (S.M.A.R.T.) built into ATA-3 and later
IDE and SCSI-3 hard drive.
/usr/sbin/smartctl -i /dev/hda
Device: Maxtor 90650U2 Supports ATA Version 5
Drive supports S.M.A.R.T. and is enabled
3. System Performance and
Monitoring
df – Disk free
/bin/df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda5 5578804 4279424 1298180 77% /
/dev/hda1 108868 9899 93348 10% /boot
none 256616 0 256616 0% /dev/shm
du – Disk usage
/usr/bin/du /tmp
du /tmp/
4 /tmp/screens/S-root
8 /tmp/screens
.....
4 /tmp/ssh-XXa4kqTn
4 /tmp/uscreens/S-donkey
8 /tmp/uscreens
88 /tmp
3. System Performance and
Monitoring
Other monitoring tools
smartd
Big Brother - bb
Multi Router Traffic Grapher - mrtg
logwatch
.....
References
www.redhat.com
www.disasterplan.com
www.amanda.org
www.linux-backup.net
http://web.mit.edu/kerberos/