1 / 23

Overview of Unix System Administration

Overview of Unix System Administration. Bambang A.B. Sarif Unix System Administrator CCSE, KFUPM. Agenda. 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. What is UNIX.

Télécharger la présentation

Overview of Unix System Administration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Overview of Unix System Administration Bambang A.B. Sarif Unix System Administrator CCSE, KFUPM

  2. Agenda • 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

  3. What 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.

  4. The 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

  5. Popularity vs. Maturity Popular Sun Solaris RedHat Linux RedHat Linux / Linux Mandrake 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

  6. What 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.

  7. What 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.

  8. Linux 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

  9. Why 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. • It’s 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. • It’s free!

  10. What 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

  11. User/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

  12. Things you must have • Independent learning skill • Analytical skills • You don’t 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!!

  13. Things 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

  14. Rules of Thumb • Never restart the system unless you really have to. • You can restart some services without restarting the system • Don’t 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

  15. Good 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.

  16. In 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” ?

  17. Log 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

  18. Check 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

  19. Common “User” problem • Forgot the password • Doesn’t have permission • Doesn’t have required environment variables such as PATH • Mistakenly delete some files/folder • Quota exceeded.

  20. Automating Unix Administration • You don’t 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

  21. Example script #!/bin/sh machine="sunfire" down= i=0 while [ $i -le 15 ] do sun=$machine"$i" /usr/sbin/ping $sun > /dev/null if [ $? -ne 0 ] then down="$down:$sun" fi i=`echo "$i+1" | bc -l` done if [ -n "$down" ] then echo $down | tr : '\012' | /usr/ucb/mail -s "DOWN machines" admin@ccse.kfupm.edu.sa fi exit 0

  22. Recommended readings • “Unix system administration handbook”by Evi Nemeth, et. all. • “Automating Unix and Linux administration”by Bauer, Kirk

  23. Thank You

More Related