Title: Overview of Unix System Administration
1Overview of Unix System Administration
- Bambang A.B. Sarif
- Unix System Administrator
- CCSE, KFUPM
2Agenda
- What is Unix/Linux
- What is system administration
- Things you must have
- Rules of thumb
- Good habits to develop
- In solving problems
- Automating unix system administration
3What is UNIX
- UNIX is an operating system that originated at
Bell Labs (NJ) in 1969. - UNIX is actually a trademark, but often used as a
generic term to describe UNIX-like operating
systems. - There are numerous different flavors of UNIX
all of which utilize similar UNIX operating
system concepts, but may have different features
or run on different hardware.
4The UNIX Umbrella
Hardware Vendors
Linux Distributions
Sun Solaris, HP HP-UX, Compaq True 64 UNIX, IBM
AIX, IRIX, MAC OSX
RedHat, Mandrake, SuSe, Debian, Caldera,
Yellowdog
FreeBSD, BSDI, NetBSD OpenBSD
SCO UNIX (now Caldera/Tarantula)
Other
BSD Flavors
Commercial distribution (i.e you must pay for
it)
Derivative of RedHat
5Popularity vs. Maturity
Popular
Sun Solaris
RedHat Linux / Linux Mandrake
RedHat Linux
FreeBSD / NetBSD / OpenBSD, etc.
Debian Linux
HP-UX
Caldera Linux
SuSe
AIX
Irix
Compaq True 64 UNIX
SCO UNIX
Darwin (Mac OSX)
Mature
Look for more in http//www.distrowatch.com
6What makes UNIX Unique?
- UNIX is a multi-user, time-sharing operating
system every user gets a piece of the CPU. - UNIX flavors generally adhere to some types of
standards (I.e. POSIX) - UNIX standards allow for portability of software
across multiple UNIX distributions. -
-
7What is Linux?
- A Unix-like operating system initially developed
in the early 1990s by Linus Torvald. - Initially developed to run on PC hardware but has
been ported to other architectures as well. - Distributed under a GNU General Public License
free software. - Kernel is its distinguishing feature.
- Generally packaged in various distributions.
8Linux Distributions
- Vary according to included software packages,
package management systems, installation
process, and Window Managers. - Distributions
- Red Hat Enterprise Linux
- Fedora Core
- Mandriva
- Ubuntu
- OpenSuSE
- TurboLinux
- Debian GNU/Linux
- Slackware
9Why Linux?
- Linux has matured greatly over the past 5 years
and has positioned itself as the most flexible
UNIX distribution today. - It can be run on very low-end, generally
available hardware. - Lots of software available.
- Flexible the same Linux distribution used by a
hobbyist on low end hardware can be used by an
enterprise on high-end hardware. - Its the first UNIX flavor to hit retail store
shelves and is easily obtainable across the
world. - Administration skill sets transfer easily to and
from other UNIX flavors. - Its free!
10What is system administration
- To keep, maintain and troubleshoot the system
(unix network) - 247 job
- Roles
- Installation and upgrade of system/applications
- Installation and upgrade services
- Manage users
- Restoring and backing up files
- Monitoring and performance tuning
-
11User/System Policy
- Policy has to be created before services are
provided - No policy means you kill yourself
- Some policies
- User account/password
- Access
- Quotas
- Services
-
12Things you must have
- Independent learning skill
- Analytical skills
- You dont need to know everything about unix
- There is manual page, books
- You can consult your uncle Google
- Ability to analyze the problem and look for
solutions is more important - Make log files your friend
- Many big problems only need a little tweaking or
workaround - Troubleshooting skills, troubleshooting skills,
troubleshooting skills, - Experience
- It can be developed
- Write it down!!
13Things you should have
- Programming/Scripting skills
- Installation new services may require you to
compile or even debug the application - You have to master the shell scripting skill
- Ability to understand man pages, log files
- Ability to use unix tools
- Unix provide many tools to help you in admin job
- Basic cd, ls, cat, head, tail
- Search which, locate, find
- Text cat, head, tail, grep, sed, awk, vi, emacs
- Process ps, uptime, top, sar
- Network tcpdump, snoop, netstat, ifconfig
- Disk du, df, quota, format, fsck
14Rules of Thumb
- Never restart the system unless you really have
to. - You can restart some services without restarting
the system - Dont use the graphical interface if you are a
true admin!!! - Most of configuration files, script, services are
in text files - Faster as compared to graphical interface
- You will not confused if you are managing systems
with different unix/linux distribution
15Good habits to develop
- Write down all your experience, you may need it
in the future - Backup important files before you do some
modifications. - You can do it periodically if you want
- You can connect with more than 1 root connections
to the system you are administering. - In case you messed up with one connection, you
can fix it with the other right away. -
-
16In solving problems
- You need all information
- Username
- Hostname
- The way you connect to that hostname
- The application you were using
- The error messages
- The time when you got the error
- Can you solve the problem if a user come to you
and just said my account is not working, Opnet
is not working ? -
17Log files
- On linux, you can go to /var/log
- Depends on the application
- Information shown in log files depend on the
debug level you defined
18Check list
- Before you begin solving a user problem, you have
to check few things - Is it hardware problem
- Is it network connection problem
- Is it network problem
- Is it a specific machine problem
- Does it happen only to a specific user
- Etc
-
19Common User problem
- Forgot the password
- Doesnt have permission
- Doesnt have required environment variables such
as PATH - Mistakenly delete some files/folder
- Quota exceeded.
-
20Automating Unix Administration
- You dont want to spend the whole day making sure
that all servers/workstations and its services
are fine - Use monitoring tools that can alert you for any
problem in the network - mon, nagios, cacti, angel
- Create scripts to check the status of
servers/services and use cron to run it
periodically - Mail the result to admin
-
21Example script
- !/bin/sh
- machine"sunfire"
- down
- i0
- while i -le 15
- do
- sunmachine"i"
- /usr/sbin/ping sun gt /dev/null
- if ? -ne 0
- then
- down"downsun"
- fi
- iecho "i1" bc -l
- done
- if -n "down"
- then
- echo down tr '\012' /usr/ucb/mail -s "DOWN
machines" admin_at_ccse.kfupm.edu.sa - fi
22Recommended readings
- Unix system administration handbook by Evi
Nemeth, et. all. - Automating Unix and Linux administration by
Bauer, Kirk
23Thank You