Backups, Logging, Troubleshooting. Dates for Last Week of Class Homework 7 – Due Tuesday 5/1 by...
-
Upload
dustin-park -
Category
Documents
-
view
214 -
download
0
Transcript of Backups, Logging, Troubleshooting. Dates for Last Week of Class Homework 7 – Due Tuesday 5/1 by...
Backups, Logging, Troubleshooting
Dates for Last Week of Class• Homework 7
– Due Tuesday 5/1 by midnight
• Labs 7 & 8– 8 is extra credit– Due Thursday 5/3 by midnight– No Late ones accepted
• Final – Thursday 5/3– 6 – 9:30 in classroom– open [book|notes|computer]– will need working VM
Backups
• What to backup?
• How often?
• Where?
• Don’t forget to test restores!!!
Backup Medium
• 2nd Hard Drive
• CDs, DVDs, Flash Drives
• Tape
• Another server
• Online
Backup Utilities
• tar
• cpio
• dump/restore
• zip/unzip
• dd
• really, really expensive commercial ones
Logs
• Controlled by 2 daemons– syslog – general logging– klogd – kernel messages
Syslog• Controlled by /etc/syslog.conf:# Log anything except mail of level info or higher.# Don't log private authentication messages!*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.authpriv.* /var/log/secure
# Log all the mail messages in one place.mail.* -/var/log/maillog
# Log cron stuffcron.* /var/log/cron
Syslog Format
• Basic syntax:codeword.priority location
• Example:
cron.* /var/log/cron
Syslog Codewords
• auth – message from a user authentication program this used to be called security
• auth-priv – private authentication program• daemon – any daemon not explicitly listed will generate a
message under this category• kern – kernel messages through klogd• syslog – messages about the logging process itself• user – messages from application software started by a
user • local0 through local7 – messages generated by Linux
where the level is established by the Linux vendor local7 for instance pertains to boot messages
• cron, lpr, mail, news – self explanatory
Syslog Priorities
• From lowest to highest:– none - no priority– debug - log debugging messages used by programmers or
testers of the software– info - log informational messages about what the program is
doing– notice - noteworthy events– warning - potential problem events– err – errors– crit - critical error messages that will likely cause the program to
terminate– alert - like crit except that the error can impact other programs– emerg - problems serious enough to potentially crash the entire
OS
Syslog location
• File: /some/path/to/file
• Remote: @loghost
Troubleshooting
• Log files in /var/
• man pages!!!!
• apropos (man –k) – search man pages for matches
• System monitoring commands – top, ps, etc
Software Installation
How to install?
• Source
– Download .tar.gz, extract, make, make install
• Packages (2 biggest for Linux)
– RPM – Redhat Package Manager
– DEB – Debian Packages
• Commercial Unix
– bff for AIX – Backup File Format
– dstream for Solaris - shar
Package Managers
• CentOS Specific
– rpm (command line)
– yum (command line)
– pirut (Graphical front-end to yum)• “Applications” → “Add/Remove Software”
yum
• yum – Yellowdog Updater Modified
– Used for installing new software
– Used for removing old software
– Used for updating current software
Make
• Used to build software from sourceall: scheduler
scheduler: scheduler.o
g++ scheduler.o -o scheduler
scheduler.o: scheduler.C
g++ -c scheduler.C
clean:
rm -rf *o scheduler
install: scheduler
mkdir -p /usr/local/bin
cp scheduler /usr/local/bin