ch1 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 64

An Introduction to System

Administration

CHAPTER 1
Chapter Objectives
Explore the world of the Sysadmin.
List the duties of the Sysadmin.
List the skill set required of the Sysadmin.
List a few personality traits of a typical Sysadmin.
What Is a Sysadmin?
In a “small company” the Sysadmin may be the entire information technology
staff.
◦ The Sysadmin may do everything from telephone, to fax, to computer management.
◦ Sysadmin may have to order supplies, deal with users, develop software, repair
hardware, and laugh at the CEO’s jokes!
What Is a Sysadmin?
In a large company the Sysadmin may be one member of a large group.
◦ May be responsible for one aspect of the data center operation.
◦ Programmers
◦ Database Administrators
◦ Network Administrators
◦ Operators
◦ May not even know what the CEO looks like.
Common Sysadmin
Traits
A Sysadmin is a customer service agent!
The Sysadmin must be able to communicate with technical
and non-technical users.
The Sysadmin should be patient, and have a sense of
humor.
The Sysadmin must be able to solve difficult technical
problems.
The Sysadmin must be able to work in a group setting.
The Sysadmin must document activities in order to
reproduce the results.
What Does a Sysadmin
Do?
Plan and manage the machine room environment
◦ design machine room; specify cooling, cabling, power
connections, and environmental controls (fire alarm,
security)
Install and maintain operating system software, application
software, and patches.
Determine hardware and software pre-requisites, which
patches to install, which services to provide, and which
services to disable.
What Does a Sysadmin
Do?
Schedule downtime to perform upgrades/patches, and test devices and schedule
downtime to manage devices.
Install and maintain user accounts; develop acceptable use policy and login-name
policy; determine password change policies; install/configure/manage name
services; and manage licenses.
Determine disk quota, police/manage disk space, and monitor log files.
What Does a Sysadmin
Do?
Train users on software and security.
Ensure that users have access to documentation.
Help users and provide help-desk support and problem
tracking system to answer user questions.
Configure network services:
◦ printing, file sharing, name service.
◦ determine file sharing needs and printing policies.
◦ manage security for shared resources.
What Does a Sysadmin
Do?
Install/maintain system devices, hardware/drivers; specify
supported devices; determine spares practices.
Install/configure/manage web servers, configure web
access agents
Configure and maintain business applications
◦ web agents
◦ e-mail
◦ calendar software
◦ order/problem tracking software
What Does a Sysadmin
Do?
Install/configure/manage e-mail software
◦ mail transfer agents.
◦ mail readers.
Configure and manage system security
◦ security for business applications,
◦ read security mailing lists and CERT notifications,
◦ install/configure "firewall" software to limit intruder access,
◦ collect evidence in case of successful intrusion and clean up
after intrusion
What Does a Sysadmin
Do?
Configure and maintain connectivity between hosts
◦ monitor connectivity
◦ troubleshoot connectivity problems
◦ investigate complaints of poor response
What Does a Sysadmin
Do?
Configure and maintain system backups,
◦ determine backup strategy and policies, and
◦ configure backup software
◦ perform backups
◦ monitor backup logs
◦ check backup integrity
◦ determine disaster survival plans
◦ perform restores
What Does a Sysadmin
Do?
Troubleshoot and repair system problems; and determine, locate, and
repair/replace problem components
Document the system, and develop and maintain documentation on local setup
and local policies
Skills Required
Delegation and Time Management
Ethics
Ability to create/follow Policies and Procedures
Desire to learn
Customer Service Attitude
Knowledge of technical aspects
◦ Hardware
◦ Software
◦ Problem Solving
Chapter Summary
Sysadmins are often viewed as “a jack of all trades”
Sysadmins are customer service oriented.
Sysadmins need to be able to communicate clearly.
Sysadmins need to be able to solve problems
Sysadmins need to be analytical thinkers.
Operating System
Concepts, Terminology and
History

CHAPTER 2
Chapter Objectives
Define a few of the terms which we use in the book.
Understand a few basic concepts the are the foundation of
Operating System design.
Explore Operating System history.
Operating System
Concepts
For purposes of this book, we'll consider an
operating system to be the supporting software
structure on which application programs run.
◦ This support structure includes the facilities to
manage the computer system's resources and
any utility programs needed to maintain and
configure the operating system.
◦ The heart of system administration is
configuring an operating system to create an
environment suitable for the applications that
the users require.
Operating System
Concepts
One can classify operating systems into two
broad groups, early and modern, based on an
analysis of three key features:
◦ Ability to share CPU resources between multiple
programs.
◦ Methods employed to control access to system
storage.
◦ Methods employed to protect system and
application memory from corruption.
Operating System
Concepts
Early operating systems provided poor support for these three
features.
◦ Running multiple programs, while possible, was done via a cooperative
system which depended on each application program to release the
CPU periodically to allow its peer processes to run.
◦ Protection of system storage was limited. Critical system files and user
files were not protected from damage by user-level applications.
Operating System
Concepts
Finally, early operating systems did not provide
memory protection for individual processes or
the operating system kernel, thus allowing
application “bugs” to result in damage to the
parts of the operating system and applications
loaded into memory.
The poor reliability of early operating
systems is (in part) due to the lack of
support for these features.
Operating System
Concepts
Modern operating systems are those which provide good support
for these three features.
◦ All of the UNIX variants, Linux, Mac OS X and Windows NT, 2000 and XP
provide support for these features.

As a result, these modern operating systems are more


robust and reliable.
Operating System
Concepts
UNIX systems refer to the Operating System’s
core component as the kernel.
◦ A UNIX kernel handles the interaction with the
system hardware.
◦ The UNIX kernel is specific to a particular
computer or group of computers that share a
common hardware design.
◦ UNIX kernels are built around one of two designs:
◦ a single, monolithic kernel or
◦ a micro-kernel.
Operating System
Concepts
◦ The monolithic design is older and uses a single
binary image to provide the resource management
and hardware interface functions of the core layer.
Some examples of the monolithic design are Linux
and Solaris.
◦ A micro-kernel design uses a very small task
management component and a suite of modules for
all other resource management functions. Windows
NT, Windows 2000, Windows XP and Mac OS X are
examples of micro-kernel designs.
Operating System
Concepts
The recent incarnations of Windows; NT, 2000,
and XP share a similar layered construction
approach with UNIX.
◦ These recent versions of Windows are based on a
micro-kernel design using a small kernel layer
and hardware abstraction layer at their base.
◦ The middle layer is made up of dynamically
loaded libraries and services.
◦ The applications layer contains the familiar
applications such as text processors,
spreadsheet, web browsers, etc.
Operating System
Concepts
Hardware designs are often called hardware
architectures.
◦ Fine distinctions between hardware architectures
matter most at the core level of the operating
system.
◦ Differences such as “Pentium III versus Intel 486” or
“SPARC 4m versus SPARC 4c” are important in the
selection of a kernel or operating system distribution.
◦ On many vendor’s hardware this simple description is
sufficient to make a choice of operating system.
Operating System
Concepts
On PC hardware, the hardware architecture is
often only part of the information needed to
select an operating system.
◦ The variety of PC hardware (models of video, I/O,
and network cards) all require specific software
drivers.
◦ The availability of drivers for a specific device
and a specific operating system is critical.
◦ All components in the PC, including each
interface card and the motherboard, need to be
supported by the operating system vendor
Operating System
Concepts
At the application layer level, the hardware
architecture distinctions become less fine.
◦ At this layer general categories such as "Intel
x86" or "SPARC" are sufficient to describe
whether a particular program binary will run on a
particular machine.
◦ This general hardware description is sometimes
called the application architecture.
History Lessons
The development of the various flavors of UNIX, Windows and Mac
OS give us clues to their administration and design.
History Lessons
The simplified UNIX history tree is a mess.
◦ A more complete and detailed history tree is even more confusing.
◦ A complete tree is about 12 pages long! (see
http://perso.wanadoo.fr/levenez/unix/).
History Lessons
From the late 1970s to early 1980s, UNIX evolved into two related
but distinct camps.
◦ One camp centered about a commercial UNIX developed by American
Telephone and Telegraph (AT&T) .
◦ The AT&T versions were named System III and later System V.
History Lessons
◦ The other popular UNIX variant, Berkeley
Standard Distribution or BSD UNIX, was funded
by the Department of Defense's Advanced
Research Projects Administration.
◦ Networking was added to BSD UNIX making it an
important force in the early development of the
Internet.
◦ BSD UNIX formed the basis for the early SunOS,
IRIX, NeXTSTEP and later versions of BSD.
◦ The most common current BSD-styled UNIXes are
the BSD triplets, OpenBSD, FreeBSD, NetBSD.
History Lessons
Differences between flavors of UNIX become
more apparent the more sophisticated the user
becomes.
◦ At the most basic level, all UNIX variants share a
common set of user level commands that
function in a nearly identical manner with the
exception of some option flags.
◦ More sophisticated users will note the different
option flags.
◦ Programmers will note that the BSD and System
V families of UNIX have significant differences in
libraries and system calls.
The differences between UNIX variants
History Lessons
From the perspective of a system administrator,
a BSD derived UNIX has several noteworthy
differences from its System V cousins.
◦ The option flags and output format for several
programs, are different from their System V
counterparts.
◦ BSD UNIXes use a small collection of run control
files (e.g. /etc/rc, /etc/rc.local) which each start
multiple service daemons.
◦ The BSD UNIX device naming convention for disk
and tape drives usually uses a flat directory
scheme with a letter, number, letter pattern
(e.g. /dev/rz0a) to specify the device driver,
device number and partition or density.
History Lessons
So where does Linux fit into all this?
◦ Linux is sort of a mutt as far as its orientation with regard to the BSD
and System V styles of UNIXes.
◦ Many of the commands share the BSD style option flags and output
◦ Run-control files and other aspects of system administration vary between distributions.
History Lessons
Where did Windows come from?
At nearly the same time the two major UNIX varieties were
establishing themselves and the commercial UNIX derivatives
were being born, the personal computer was being created.
Bill Gates and Microsoft delivered the first PC operating system,
the command line oriented Disk Operating System (DOS).
History Lessons
In an effort to compete with the Apple graphical user interface
(GUI), the Windows Operating System was developed.
◦ Early versions of Windows lacked the maturity of the Apple GUI.
◦ The Windows development split into two streams: a “home” or personal
version of Windows, and a “business” or commercial version.
◦ Recently, Microsoft has been trying to merge the two versions into a
single offering.
History Lessons
Apple and Mac OS X
◦ Driving along a third parallel set of tracks, Apple developed Mac OS for
their Macintosh computer during roughly the same time frame as
Windows.
◦ Inspired by the work Xerox had done on graphical user interfaces, Apple developed the
Macintosh, the first commercially successful personal computer with a graphical user
interface.
History Lessons
Apple and Mac OS X
◦ NeXT Computers took the look and feel of MacOS and married it to a UNIX-like micro-
kernel architecture to form the NeXTStep Operating System.
◦ When Apple acquired NeXT, the developers had an opportunity to update and expand the
Apple GUI interface, resulting in MacOS X.
Summary
Basic terminology and history gives the system
administrator the background to take on the
tasks she faces.
◦ Understanding some basic terminology aids in
the choice of software, operating systems and
hardware and forms a common language for
broad descriptions of these items and their
relation to each other.
◦ The history of the development of UNIX, Windows
and Mac OS provides insights into the
organization, tools and problems one faces on a
particular type of system. An understanding and
knowledge of this history allows a system
administrator to more rapidly come up to speed
when faced with a new system.
Fundamental System
Administration Tools

CHAPTER 3
Chapter Goals
To introduce reader to a few of the tools required to perform the duties of the
system administrator.
To introduce good practices for system administrators.
File Tree navigation fundamentals.
Introduction to the UNIX vi File Editor.
Fundamental Sysadmin Tasks

The daily tasks performed by a system administrator


require specialized as well as common tools.
◦ System administration requires a way of working that is :
◦ craftsman-like,
◦ strives for a working practice aimed at producing robust, secure,
and reliable systems.
◦ This chapter examines tools and practices common to many
system administration tasks.
Fundamental Sysadmin Tasks

System administrators are knowledgeable users of the


systems they manage.
◦ They need to know how to:
◦ navigate the file system,
◦ use basic user-level tools,
◦ use the ubiquitous vi editor,
◦ combine commands using pipes,
◦ employ a variety of graphical tools.
◦ It is assumed for the purposes of this chapter that the reader
has a basic knowledge of the Windows and UNIX user
environments.
Good Practices
Good working practices are the threads that tie together
the tasks performed by the Sysadmin.
Good practices make tasks easier to reproduce, preserve
system security/robustness, and maintain system
functionality.
System administrator involves managing details.
◦ Knowing how a system is configured, what patches have been
applied, what services the system needs or provides, and any
number of other items is a tremendous aid in solving
problems.
Good Practices
Another part of the job is continual learning.
Establishing a discipline of carrying out daily, weekly, and monthly tasks is
necessary in maintaining systems, identifying slowly growing problems, and
preparing for unexpected problems.
Good Practices
· Avoid using root or administrator as much as possible.
Use a less privileged account, for which mistakes will be
less drastic.
· Avoid using wildcard characters, such as the asterisk (*),
when running as root or administrator.
· Make it a habit to create backup copies of files before
you edit.
· Allow plenty of time to complete the tasks you need to
perform.
Moving Around the File
TheTree
most basic tasks of system administration involve the
manipulation of file storage.
◦ Understanding file system navigation tools, and being able to
use them, are basic to managing a system.
Both UNIX and Windows organize disk storage into a tree
structure.
◦ UNIX unifies all file storage space, disks, remote file systems,
and entries for devices and communications end points into a
single tree.
◦ Windows takes the approach of creating a forest of trees, one
for each disk or remote file system or share, with separate
named entities (e.g., c:, lpt0)
Moving Around the File
Tree
◦ Files within the file trees can be referred to by their full path
names, traversing the tree from the root to the leaf and
listing each directory as it is passed.
◦ Although providing the full path completely specifies the
location of a file, it is more common to use a relative path;
one that starts in your current location.
Commands for traversal of the file tree:
◦ cd / chdir Change Directory
◦ pwd Show current location
◦ ls / dir List the files and directories
Moving Around the File
Tree
A less common set of commands gathers and displays file
system space statistics.
◦ On UNIX systems, the df command reveals statistics
concerning individual file systems in a system’s file tree,
whereas the du command produces a list of the space
consumed by directories.
◦ On Windows systems this information is available using a
graphical file tree viewer such as the explorer program or the
web browser.
Why vi
Despite the graphical tools available for many system
administration tasks, on UNIX systems, many tasks require
file editing.
◦ Examples include maintenance of hosts and network files for
networking, and of configuration files for daemons such as
inetd and init.
Few people really “love” vi. However, it is frequently the
only screen-oriented text editor available for managing a
system.
◦ Although not as easy to use as some editors, vi is widely
available and should be accessible on any UNIX system.
Why vi
Many editors cause problems when editing system files. For example:
◦ Pico and emacs do not (by default) place a newline at the end of a line of text.
◦ This causes many problems with editing files such as /etc/passwd, and other format sensitive configuration files.
◦ These editors may not have access to all of the resources that they require when the
system is in single user mode.
Power Tools
There are a number of general tools and techniques that
are more frequently used by system administrators than by
users.
◦ These include
◦ command shell features,
◦ graphical desktop tools,
◦ programmable filters, and
◦ scripting languages.
◦ Many of these are available on both UNIX and Windows in
one form or another, although most have their roots in the
UNIX environment.
Power Tools
pipes - allow you to “pipe” the output of one command
into another command as input.
ps (task manager) – allows you to view the system process
table.
◦ The ps command differs a bit among UNIX variants. The two
major divisions are the BSD-style and the System V-style.
more/less – pagination commands that allow you to view
files one page at a time.
grep – Get Regular Expression – find a pattern in a file.
Power Tools
tar – create a tape archive of files.
Programmable Filters
◦ Another class of tools that can be used with pipes or by
themselves to massage a flow of data are programmable
filters.
◦ Two common examples of filters are awk and sed.
◦ awk uses an interpreted command language, and treats input as
though it were a textual database.
◦ sed – the stream editor, uses the regular expression language
seen in vi and grep, and allows you to edit streams of input.
Power Tools
find – locate files by name, or file characteristics, or locate strings in files.
perl – a very powerful interpreted scripting language.
cygwin – a UNIX shell and utilities for use on Windows systems.
Juggling Multiple Tasks
Juggling multiple tasks is a fact of life for a system
administrator:
◦ Monitoring network and system performance
◦ dealing with a never-ending stream of e-mail
◦ searching the web for information
◦ remotely accessing several systems
Modern windowed environments help with juggling tasks
by providing easily used graphical interfaces and tools for
grouping related tasks.
Windowed Environments
Both Windows and UNIX provide some form of windowed
work environment.
Although these desktop environments all appear to be
different, they have several common features that are of
interest to the system administrator.
◦ First, note that all desktops allow for multiple windows.
◦ Switching back and forth between tasks or GUI tools is performed
by mouse click or keyboard shortcut.
Windowed Environments
◦ Second, all desktops offer terminal emulation, providing
multiple command line interfaces.
◦ Multiple terminal windows are often used for connections to
remote systems or to edit a configuration file while using another
terminal window to test the configuration.
◦ Third, idle tasks can be reduced to icons or entries on a task
management menu for easy access.
◦ Fourth, UNIX desktops provide a facility for switching
between multiple virtual screens. There are add-on tools for
the Windows desktops that facilitate the virtual screen
facility.
General-purpose GUI Tools
E-mail
◦ Most system administrators handle a large volume of e-mail
each day. A powerful mail agent is a requirement for dealing
with this flood of information.
◦ A good mail agent for a system administrator should include
filtering tools, for automating the task of sorting mail, and an
easily navigated filing and searching system.
◦ Some recent mail agents are GUI based and make it easier to
fully use their filtering and navigation features.
General-purpose GUI Tools
Web Browsers
◦ A vast amount of useful system administration information is
available on the Internet and viewable via a web browser.
◦ Most UNIX and Windows platforms offer several web
browsers, such as the popular Internet Explorer and Netscape
Navigator.
◦ For basic information, viewing and downloading of files,
nearly any web browser will work. However, a browser that
integrates graphics and PDF file viewing allows a wider range
of information to be viewed.
General-purpose GUI Tools
Virtual Terminal
◦ Perhaps the most common use of a windowed environment is a
setup of multiple-terminal windows, connected to multiple
systems.
◦ Terminal windows have several advantages over an ordinary
terminal:
◦ Terminal windows provide variable scroll-back capabilities that provide easy
review of output.
◦ Terminal windows can emulate various terminals, allowing a single
workstation to act in place of one or more special-purpose terminals.
◦ Terminal windows also allow for easy transfer of small bits of text and
command strings by incorporating “cut and paste” capabilities.
General-purpose GUI Tools
Spreadsheet
◦ Spreadsheets can be used effectively to automate a number of recordkeeping tasks.
◦ Typical uses of a spreadsheet are as a table of data that can be sorted and searched and as a progress checklist
for larger tasks.
Summary
The fundamental tools of system administration include:
◦ careful and systematic work habits
◦ a selection of basic software tools.
◦ editors,
◦ filters,
◦ file system navigation
◦ windowed environments
◦ power tools

You might also like