View
214
Download
0
Tags:
Embed Size (px)
Citation preview
Chapter TenChapter TenNetworkingNetworking
with UNIXwith UNIX
ObjectivesObjectives
Describe the origins and history of the Describe the origins and history of the UNIX operating systemUNIX operating system
Identify similarities and differences Identify similarities and differences between popular implementations of between popular implementations of UNIXUNIX
Understand why you might choose a Understand why you might choose a UNIX server for a corporate networkUNIX server for a corporate network
ObjectivesObjectives
Explain and execute basic UNIX Explain and execute basic UNIX commandscommands
Install Linux on an Intel-based PCInstall Linux on an Intel-based PC
Use Linux to add groups and users and to Use Linux to add groups and users and to change file access permissionschange file access permissions
Explain how UNIX can be internetworked Explain how UNIX can be internetworked with other network operating systemswith other network operating systems
Brief History of UNIXBrief History of UNIX
System VSystem V Versions of UNIX that come from Bell LabsVersions of UNIX that come from Bell Labs
BSD (Berkeley Software Division)BSD (Berkeley Software Division) Versions of UNIX from researchers at the Versions of UNIX from researchers at the
University of California at BerkeleyUniversity of California at Berkeley
Caldera International and Tarantella jointly Caldera International and Tarantella jointly own the rights to the UNIX own the rights to the UNIX source codesource code
Common UNIX FeaturesCommon UNIX Features
The ability to support multiple, simultaneously The ability to support multiple, simultaneously logged in userslogged in users
Hierarchical file systems that incorporate Hierarchical file systems that incorporate demountable volumesdemountable volumes
Consistent interfaces for input of data to and Consistent interfaces for input of data to and output of data from hardware devices, files, output of data from hardware devices, files, and running programsand running programs
The ability to start processes in the The ability to start processes in the backgroundbackground
Common UNIX FeaturesCommon UNIX Features
Hundreds of subsystems, including Hundreds of subsystems, including dozens of programming languagesdozens of programming languages
Program source code portabilityProgram source code portability
Windows interfaces that the user can Windows interfaces that the user can configure, the most popular of which is the configure, the most popular of which is the X Window systemX Window system
Current State of the MarketCurrent State of the Market
Unix market is huge and highly segmentedUnix market is huge and highly segmented
Some Some real-timereal-time implementations of the implementations of the UNIX system existUNIX system exist In a real-time implementation, the operating In a real-time implementation, the operating
system must respond to input immediatelysystem must respond to input immediately
Proprietary UNIXProprietary UNIX
An implementation of UNIX for which the An implementation of UNIX for which the source code is either unavailable or source code is either unavailable or available only by purchasing a licensed available only by purchasing a licensed copy from Caldera International and copy from Caldera International and TarantellaTarantella Sun’s proprietary version of UNIX is called Sun’s proprietary version of UNIX is called
SolarisSolaris IBM’s proprietary version of UNIX is called IBM’s proprietary version of UNIX is called AIXAIX HP’s proprietary version of UNIX is called HP’s proprietary version of UNIX is called HP-HP-
UXUX
Choosing a Proprietary UNIX SystemChoosing a Proprietary UNIX System
AdvantagesAdvantages Accountability and supportAccountability and support Optimization of hardware and softwareOptimization of hardware and software Predictability and compatibilityPredictability and compatibility
DrawbackDrawback Customer has no access to the system’s Customer has no access to the system’s
source code and thus cannot create a custom source code and thus cannot create a custom solutionsolution
Open Source UNIXOpen Source UNIX
Open source softwareOpen source software Software developed and packaged by a few Software developed and packaged by a few
individuals and made available to anyone without individuals and made available to anyone without licensing feeslicensing fees
Also called freely distributed softwareAlso called freely distributed softwareUNIX-like systems in this category include GNU, UNIX-like systems in this category include GNU, FreeBSD, and LinuxFreeBSD, and Linux
Different implementations of UNIX-like systems are Different implementations of UNIX-like systems are known as known as flavorsflavors
Freely distributable versions of UNIX include a Freely distributable versions of UNIX include a copyright called the copyright called the General Public LicenseGeneral Public License
Why Choose UNIX?Why Choose UNIX?
Is it compatible with existing Is it compatible with existing infrastructure?infrastructure?
Will it provide the security required by Will it provide the security required by the network’s resources?the network’s resources?
Can the technical staff manage it Can the technical staff manage it effectively?effectively?
Will existing applications run smoothly Will existing applications run smoothly on it?on it?
Why Choose UNIX?Why Choose UNIX?
Will it accommodate future growth (that Will it accommodate future growth (that is, is it scalable)?is, is it scalable)?
Does it support additional services the Does it support additional services the network’s users require?network’s users require?
How much does it cost?How much does it cost?
What type of sort can be expected from What type of sort can be expected from the vendor?the vendor?
Choosing UNIXChoosing UNIX
SambaSamba Open source software packageOpen source software package Complete Windows 2000-style file and print sharing Complete Windows 2000-style file and print sharing
facilityfacility
UNIX was originally developed as a UNIX was originally developed as a time-time-sharing systemsharing system Computing system to which each user must attach Computing system to which each user must attach
directly to share the resources of that computerdirectly to share the resources of that computer
Some proprietary UNIX systems have received Some proprietary UNIX systems have received Orange BookOrange Book certification certification
UNIX Server HardwareUNIX Server Hardware
Base system unit must include:Base system unit must include: Motherboard with CPU, memory, and I/O Motherboard with CPU, memory, and I/O
controlcontrol Network interface card (NIC)Network interface card (NIC) Floppy disk driveFloppy disk drive CD-ROM driveCD-ROM drive One or more fixed disksOne or more fixed disks
Decisions in Choosing Decisions in Choosing HardwareHardware
Which applications and services will run on Which applications and services will run on the server?the server?
How many users will this system serve?How many users will this system serve?
How much random access memory (RAM) How much random access memory (RAM) will the server need?will the server need?
How much secondary storage (hard disk) will How much secondary storage (hard disk) will the server need?the server need?
Decisions in Choosing Decisions in Choosing HardwareHardware
Table 10-1: Typical
hardware requirements for a Linux
server
A Closer Look at LinuxA Closer Look at Linux
Linux multiprocessingLinux multiprocessing Supports symmetric multiprocessing (SMP)Supports symmetric multiprocessing (SMP)
Linux memory modelLinux memory model From its inception, Linux was created to use From its inception, Linux was created to use
both physical and virtual memory efficientlyboth physical and virtual memory efficiently
Linux KernelLinux Kernel
KernelKernel As in NetWare, is the core of the systemAs in NetWare, is the core of the system Also similar to NetWare, it is possible to add Also similar to NetWare, it is possible to add
or remove functionality by loading and or remove functionality by loading and unloading Linux unloading Linux kernel moduleskernel modules
Analogous to NetWare NLMsAnalogous to NetWare NLMs
Linux File and Directory Linux File and Directory StructureStructure
Hierarchical file systemHierarchical file system Organization of files and directories on a disk partition in which Organization of files and directories on a disk partition in which
directories may contain files and directoriesdirectories may contain files and directories
FIGURE 10-1 Linux file
system hierarchy
Linux File ServicesLinux File Services
Linux includes support for multiple types of Linux includes support for multiple types of file systems, including:file systems, including: Local file systemsLocal file systems Remote file systemsRemote file systems Its native file system, called ext2Its native file system, called ext2 Sun Microsystem’s Network File System Sun Microsystem’s Network File System
(NFS)(NFS)
Linux Internet ServicesLinux Internet Servicesand Linux Processesand Linux Processes
Linux Internet ServicesLinux Internet Services ApacheApache
Open source software application that is the Open source software application that is the leading Internet Web server leading Internet Web server
Linux ProcessesLinux Processes Another UNIX innovation is the notion of Another UNIX innovation is the notion of
separate, numbered processesseparate, numbered processes
Linux Command SamplerLinux Command Sampler
Command interpreterCommand interpreter Program that accepts your typing and runs Program that accepts your typing and runs
the commandthe command Also known as a Also known as a shellshell Keeps track of the command history, much Keeps track of the command history, much
like the like the doskeydoskey command in DOS and command in DOS and Windows 2000Windows 2000
Linux Command SamplerLinux Command Sampler
Manual pagesManual pages Section 1 covers commands typically entered Section 1 covers commands typically entered
while typing in a command windowwhile typing in a command window Sections 2 through 5 document the Sections 2 through 5 document the
programmer’s interface to the UNIX systemprogrammer’s interface to the UNIX system Section 6 documents some of the Section 6 documents some of the
amusements and games that are included in amusements and games that are included in the UNIX systemthe UNIX system
Linux Command SamplerLinux Command Sampler
Manual pagesManual pages Section 7 describes the device drivers for the Section 7 describes the device drivers for the
systemsystem Section 8 covers the commands used by Section 8 covers the commands used by
administrators to manage the systemadministrators to manage the system Section 9 documents the UNIX kernel Section 9 documents the UNIX kernel
functions programmers use when writing functions programmers use when writing device driversdevice drivers
Linux Command SamplerLinux Command Sampler
GlobbingGlobbing Form of filename substitutionForm of filename substitution
PipePipe Serves as the connection between two Serves as the connection between two
commandscommands
PipelinePipeline Two or more commands separated by a pipeTwo or more commands separated by a pipe
Linux Command SamplerLinux Command Sampler
TABLE 10-2a: Commonly used Linux commands
Linux Command SamplerLinux Command Sampler
TABLE 10-2b: Commonly used Linux commands
(cont.)
Linux Command SamplerLinux Command Sampler
Linux systems keep quite a bit of information Linux systems keep quite a bit of information about each file, including:about each file, including: FilenameFilename File size (in bytes)File size (in bytes) Date and time a file’s Date and time a file’s i-nodei-node (file information (file information
node) was creatednode) was created Date and time that the file was last accessedDate and time that the file was last accessed Date and time that the file contents were last Date and time that the file contents were last
modifiedmodified
Linux Command SamplerLinux Command Sampler
Information Linux system keeps about each Information Linux system keeps about each file (cont.):file (cont.): Number of “aliases” or links to the fileNumber of “aliases” or links to the file Numeric identifier of the user who owns the fileNumeric identifier of the user who owns the file Numeric identifier of the group to which the file Numeric identifier of the group to which the file
belongsbelongs Access rights for the owner, the group, and all Access rights for the owner, the group, and all
othersothers
Linux Command SamplerLinux Command Sampler
To learn about the i-node information, use the ls commandTo learn about the i-node information, use the ls command
Figure 10-2: Example of output from ls
Linux Command SamplerLinux Command Sampler
Valid file typesValid file types ““d” for directoriesd” for directories ““l” for symbolic link filesl” for symbolic link files ““b” for block devicesb” for block devices ““c” for character device filesc” for character device files
Linux Command SamplerLinux Command Sampler
FIGURE 10-3 Anatomy of ls output
Linux Preinstallation QuestionsLinux Preinstallation Questions
What is the new server’s name?What is the new server’s name?
What is the server’s IP address?What is the server’s IP address?
What kind of video card is installed in the What kind of video card is installed in the server?server?
What kind of monitor is attached to the new What kind of monitor is attached to the new server?server?
What is the administrative user’s password?What is the administrative user’s password?
How can I remember all this information?How can I remember all this information?
Linux Preinstallation QuestionsLinux Preinstallation Questions
Linux very peacefully coexists with other Linux very peacefully coexists with other operating systems on your primary hard driveoperating systems on your primary hard drive
Read more about multiboot systems at the Read more about multiboot systems at the Linux installation Linux installation HOWTOHOWTO site: site: http://www.linuxhq.com/ldp/howto/Installation-http://www.linuxhq.com/ldp/howto/Installation-
HOWTO/index.htmlHOWTO/index.html
The Installation ProcessThe Installation Process
Figure 10-4: Welcome to Red Hat Linux screen
The Installation ProcessThe Installation Process
Figure 10-5: Network Configuration screen
Configuring Linux for Network Configuring Linux for Network AdministrationAdministration
Adding groups and usersAdding groups and users GroupaddGroupadd
Command to add a new group ID to a Linux Command to add a new group ID to a Linux systemsystem
UseraddUseraddCommand to add a new user ID to a Linux systemCommand to add a new user ID to a Linux system
Changing File Access Changing File Access PermissionsPermissions
Linux restricts access to resources by Linux restricts access to resources by comparing user and group IDs with the comparing user and group IDs with the owner and membership of filesowner and membership of files
Every file and directory on a Linux system Every file and directory on a Linux system is owned by exactly one user and is a is owned by exactly one user and is a member of exactly one groupmember of exactly one group
You may assign access permissions for the You may assign access permissions for the file’s owner, the file’s group, and everyone file’s owner, the file’s group, and everyone elseelse
Internetworking with Other Network Internetworking with Other Network Operating SystemsOperating Systems
SambaSamba
IPX/SPXIPX/SPX
AppleTalkAppleTalk
X3270X3270
WINEWINE
VMWareVMWare
Dozens and dozens of command-line utilities Dozens and dozens of command-line utilities that enable access to contents of files generated that enable access to contents of files generated on other systemson other systems
Chapter SummaryChapter Summary
The UNIX system is stable, robust network The UNIX system is stable, robust network operating systemoperating system
The key difference between freely distributable The key difference between freely distributable UNIX and proprietary implementations is that the UNIX and proprietary implementations is that the copyright on freely distributable implementations copyright on freely distributable implementations require that anyone purchasing an open source require that anyone purchasing an open source version of UNIX receive access code to the sourceversion of UNIX receive access code to the source
UNIX systems make great Internet serversUNIX systems make great Internet servers
One characteristic of all UNIX systems is a user-One characteristic of all UNIX systems is a user-definable command interpreterdefinable command interpreter
Chapter SummaryChapter Summary
The UNIX system was among the first The UNIX system was among the first operating systems to include a hierarchical file operating systems to include a hierarchical file systemsystem
Each UNIX process represents an instance of Each UNIX process represents an instance of a running executable program in core memorya running executable program in core memory
UNIX commands can be likened to ordinary UNIX commands can be likened to ordinary sentencessentences
Most UNIX commands are lowercase Most UNIX commands are lowercase alphabetic charactersalphabetic characters
Chapter SummaryChapter Summary
Command names are usually acronyms or Command names are usually acronyms or abbreviationsabbreviationsThe system uses information nodes (i-The system uses information nodes (i-nodes) to store everything other than the nodes) to store everything other than the actual contents of filesactual contents of filesLinux distributions are binary compatibleLinux distributions are binary compatibleUNIX systems quite competently UNIX systems quite competently interoperate with other network operating interoperate with other network operating systemssystems