- •About the Author
- •Credits
- •How This Book Is Organized
- •Part I: Linux Basics
- •Part II: Installation
- •Part III: Configuration
- •Part IV: Administration
- •Part V: Maintaining the Linux System
- •How Each Chapter Is Structured
- •How to Use This Book
- •Conventions Used in This Book
- •What is Linux?
- •The origin of UNIX
- •Who started Linux?
- •Understanding Open Source
- •Understanding Closed Source
- •Understanding Artistic License
- •Is Freeware really free?
- •Is Shareware never free?
- •A comparison and contrast of licensing methods
- •The Growth of Linux
- •Linux on a Personal Computer
- •Graphical installation
- •Hardware detection
- •Graphical user interface
- •Linux limitations on the PC
- •Linux succeeds on the PC
- •Linux on workstations
- •Linux on servers
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux Kernel
- •Kernel versions
- •Kernel availability
- •Linux Distributions
- •Beehive
- •BlueCat
- •Caldera OpenLinux
- •Debian
- •Corel
- •DragonLinux
- •Elfstone
- •Gentoo
- •Hard Hat Linux
- •KRUD
- •LinuxPPC
- •Mandrake
- •Phat Linux
- •Slackware
- •StormLinux
- •SuSE
- •TurboLinux
- •Yellow Dog Linux
- •Mini and Specialty Distributions
- •Astaro
- •KYZO
- •FlightLinux
- •NetMAX
- •Packages and Packaging Solutions
- •Red Hat Package Manager
- •Debian Package Management System
- •Tarball
- •Linux Resources
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux In the Real World
- •Word Processing
- •Spreadsheets and databases
- •Web browsing
- •File transfer
- •More, more, and more applications
- •The Server and DNS
- •A Linux Web server
- •Linux e-mail server
- •File servers
- •Proxy, news, and search servers
- •FTP servers
- •Firewalls
- •Determining Linux Roles and Services
- •Comparing Linux with other operating systems
- •Hardware compatibility
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Installing Linux
- •Final Preparations for Installation
- •Verification
- •Package selection
- •Final hardware verification
- •Pre-installation partitioning planning
- •Installing Linux
- •Text or GUI installation
- •Basic setup of Linux
- •Selecting the machine type
- •Partitioning the hard disk drive
- •Installing a boot manager
- •Creating the Boot Diskette
- •Networking
- •Additional installation information
- •Accounts and passwords
- •Additional packages to install
- •GUI installation
- •Obtaining video card information
- •Configuring the X windows system
- •Selecting the windows manager or desktop environment
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Answers to Assessment Questions
- •Scenarios
- •Alternative to the GUI Installation
- •Command Line installation
- •Install the Linux system
- •Network installations of Linux
- •Review of a Linux Installation
- •Installation media
- •Initial selections
- •Installation type or class
- •Disk partitioning and formatting
- •Installing LILO
- •Network configuration
- •User accounts
- •Authentication methods
- •Package selection and installation
- •A Dual-Boot Installation of Linux
- •Linux with Microsoft Windows
- •Linux with Microsoft Windows NT and 2000
- •Linux and Solaris
- •Linux and other operating systems
- •Installing Additional Software with gzip and tar
- •Installing Additional Software with RPM
- •Removing software with RPM
- •Upgrading software with RPM
- •Query the RPM software
- •Verify the RPM software
- •Verify the package files
- •Upgrading the Kernel
- •Upgrading a Linux Kernel
- •System Log Files
- •The Final Test of the Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What is the X Window System?
- •The X Window System
- •X Client and Server communications
- •X Window Manager
- •Configuring X Window Systems
- •Custom X Window System Programs
- •Manual Configuration of the X Window System
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic Network Services
- •TCP/IP Protocol Suite
- •Connection protocols needed
- •Other network protocols
- •Configuring Basic Network Services
- •Host name
- •IP addressing
- •DHCP
- •Netmask
- •Hardware resources
- •Routing and gateways
- •PPP, SLIP and PLIP connections
- •Server Tasks with
- •IP aliases for virtual hosts
- •Apache Web Server
- •Samba File Server
- •Home directories
- •Disk shares
- •Configuring Client Services
- •SMB/CIFS
- •NIS client configuration
- •NFS client configuration
- •Configuring Internet Services
- •Web browser
- •POP and SMTP
- •TFTP
- •SNMP
- •Remote Access
- •Rlogin
- •Telnet
- •OpenSSH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Adding Hardware
- •Memory
- •Swap
- •Adding a hard drive
- •Video and monitor
- •Printers
- •Configuration files
- •Setting environment variables
- •BASH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic User and Group Administration
- •What are users and groups?
- •Creating users
- •Change user information
- •Deleting users
- •Creating groups
- •Getting Around Linux
- •Navigating Linux
- •Common file and directory commands
- •Setting File and Directory Permissions
- •Mounting and Managing File Systems
- •Mount
- •Umount
- •Mounted file systems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Multi-User Environment
- •The creation of Virtual Consoles
- •The Linux Terminal Server Project
- •Configurations for remote systems
- •Monitoring remote connections
- •Common Shell Commands
- •Basic shell scripts
- •Caution using root access
- •Navigating the GUI interface
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Runlevels
- •init
- •Shutting down Linux
- •Managing Linux Services
- •Configuring Linux Printing
- •lpd daemon
- •/etc/printcap
- •Printing management
- •Using the vi Editor
- •vi operation modes
- •Editing text files
- •Using the
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disk and File System Management
- •Repairing Partitions
- •System Automation and Scheduling
- •cron
- •Core Dumps
- •Analyzing core dumps
- •GNU Debugger
- •Managing Networking Interfaces
- •Installing System Packages and Patches
- •Compressed archive
- •Debian Package Installer
- •Slackware Package Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Processes
- •Core services versus non-critical services
- •Process administration
- •Process control
- •Monitoring Log Files
- •Maintaining Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Security
- •Securing the Environment
- •Location
- •Environment
- •System Security
- •System/user files
- •Permissions
- •Log auditing
- •Backups
- •Linux Security Best Practices
- •Network security
- •Firewall
- •System security
- •Securing a Web server
- •Securing an FTP server
- •FTP program version
- •FTP configuration files
- •Process security
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disaster Recovery Planning
- •Types of data
- •Frequency and Scheduling
- •Storage and media types
- •Recovering data
- •Offsite storage
- •Linux Backup Tools and Commands
- •Third party tools
- •Tape devices
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Identifying the Problem
- •Methodology and Best Practices
- •Troubleshooting Resources
- •Documentation resources
- •Internet resources
- •System Log Files
- •Tools for Log Files
- •Output to another file
- •Locating files
- •Process Configuration and Management
- •Stopping, Starting, and Restarting Processes
- •Configuration Files
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Examining the Startup Process
- •Boot process steps
- •Analyzing Boot Process Errors
- •Common Boot Problems
- •Using System Status Tools
- •File System Check
- •System Resource Commands
- •Using the System Boot Disk
- •Types of boot disks
- •Creating a boot disk
- •Creating a rescue/utility disk
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Common User Problems
- •Login problems
- •File and directory permissions
- •Printing problems
- •Mail problems
- •Software Package Problems
- •Package dependencies
- •Software and version conflicts
- •Backup and Restore Errors
- •Backup hardware
- •Backup software
- •File restore errors
- •Application Failures
- •Log files
- •Process and daemon errors
- •Web server errors
- •Telnet
- •Mail services
- •Basic Networking Troubleshooting
- •Networking connectivity
- •Network hardware problems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Mainboard Components
- •BIOS
- •System memory
- •System Resources
- •I/O addresses
- •Direct memory access
- •Laptop Considerations
- •PCMCIA
- •Linux Peripheral Configuration
- •Installing and Configuring SCSI Devices
- •SCSI definitions
- •SCSI technologies
- •SCSI cabling and termination
- •SCSI device configuration
- •Linux SCSI devices
- •ATA/IDE Devices
- •IDE drive configuration
- •Linux ATA/IDE Drive configuration
- •Linux Support for Other Devices
- •IEEE 1394 (Firewire)
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What’s on the CD-ROM
- •System Requirements
- •Using the CD with Microsoft Windows
- •Using the CD with Linux
- •Microsoft Windows applications
- •Linux applications
- •Troubleshooting
- •Sample Exam
- •Exam Questions
- •Exam Answers
- •Taking a CompTIA Exam
- •How to register for an exam
- •What to expect at the testing center
- •Your exam results
- •If you don’t receive a passing score
- •About the Linux + Exam
- •Preparing for the Linux+ Exam
- •For More Information
- •Preamble
- •No Warranty
- •Glossary
- •Index
58 |
Part II Installation |
suites, such as KOffice and StarOffice, provide a complete package of Officecompatible programs, including Kivio, which is a Visio-style flowcharting application. Linux also includes PIM (Personal Information Manager) and Palm organizer support software, and programs that allow users to manipulate graphics, such as GIMP, Krayon, and the vector drawing application, Killustrator. You can also send a fax by using Linux with programs such as sendfax, kphonecenter, and SendfaKs. Scheduling tools are also available in software packages, such as StarOffice Schedule. Presentation applications include Corel Presentations, Kpresenter,
and StarOffice Impress, among others.
Virtually any software program is available for Linux; however, some applications have issues of non-compatibility due to the Closed Source nature of commercial applications. Microsoft has yet to port any of their very popular software versions to the Linux operating system. Many Microsoft formats are not supported on the Web or in e-mail programs. This is one reason that an enterprise may not fully deploy Linux as a desktop service. Regardless of how well Linux is suited for the desktop, however, you have many compelling reasons for deploying Linux on the server side, and possibly replacing UNIX, Microsoft, and Novell desktops in the enterprise server environment.
The Server and DNS
The Linux operating system is typically used as a server in the enterprise because it is a very stable and complete operating system. Because Linux has been developed to be a UNIX-like operating system, it can perform almost any job that a UNIX server can perform. And because Microsoft Windows and Novell Netware Servers are now providing most of the same services that are provided by UNIX servers, you can use Linux to perform these duties in place of the Microsoft or Novell operating system-based servers. Also, because Linux is very stable, it has proven to be very reliable and has therefore been accepted into the server rooms, farms, and clusters of major companies for operating mission-critical services. Linux is especially suited for Internet applications and services such as DNS, e-mail, firewall, FTP, proxy, Web file and print, and many other popular Internet services. These servers are able to provide the services that you need in the enterprise environment in a reliable, inexpensive, and well-supported way.
When you install a Linux server, Domain Name System (DNS) is one of the many popular Internet options available. DNS is a distributed Internet directory service. DNS resolves system names to IP addresses. This is an important service because it allows users to connect to machines by their name rather than an obscure IP address, which can be easily forgotten.
DNS directory service consists of DNS data, DNS servers, and Internet protocols for retrieving data from the servers. Resource records for each host are made available by the DNS directory, using special text files organized into zones. Zones are kept on authoritative servers that are distributed all over the Internet, which answer
Chapter 3 Pre-Installation Planning |
59 |
queries according to the DNS network protocols. Most servers are authoritative for some zones and perform a caching function for all other DNS information. Most DNS servers, however, are authoritative for just a few zones, but larger servers are authoritative for tens of thousands of zones. By breaking the DNS into smaller zones and then those zones into domains, the load on any one machine is lightened. This also improves the reliability of the Internet by not requiring one server or group of servers to have all the information. Because this is a hierarchical configuration, the enterprise organization can establish a DNS server to control access to the organizational network. This can be done on a Linux server by enabling a specific piece of software. Small businesses can use this software to allow users to connect to the Internet, or large organizations can use it to establish domains and eventually a DNS zone server of their own. Creating, using, and providing a DNS server allows the enterprise to control access to specific servers. To see this service in action:
1.Select your favorite Web site.
2.Open a console prompt.
3.Type the command ping www.linux.org
4.Press enter.
Your display will look something like this:
Pinging www.linux.org [198.182.196.56] with 32 bytes of data:
Reply from 198.182.196.56: bytes=32 time=80ms TTL=232 Reply from 198.182.196.56: bytes=32 time=80ms TTL=232 Reply from 198.182.196.56: bytes=32 time=71ms TTL=232 Reply from 198.182.196.56: bytes=32 time=70ms TTL=232
Ping statistics for 198.182.196.56:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:
Minimum = 70ms, Maximum = 80ms, Average = 75ms
This display shows that DNS resolved the name www.linux.org to the IP address 198.182.196.56.
A Linux Web server
Whereas DNS resolves a name to an IP address allowing users to connect to Web pages, a Web server provides the actual Web page. Linux is used throughout the Internet to provide this service. The most popular software that Linux uses to provide Web pages is the Apache Web server. Apache exists to provide commercialgrade software capable of providing HyperText Transfer Protocol, or HTTP, which is a standard for creating documents to be viewed over the Internet. Apache is the
60 |
Part II Installation |
leading Internet Web server with over a 60 percent market share, according to the Netcraft survey (www.netcraft.com/survey). Apache Web Server powers Web sites over other commercial software at a rate of more than 3 to 1, and will continue to do so because it is a robust, stable, and free alternative to other software. This may be the best example of Linux because the Apache Web server is not only capable but is preferred in the enterprise environment.
Linux e-mail server
E-mail is one of the most important services utilized by the end user. It is the most commonly used communications medium for users to communicate internally and externally. Using e-mail within an organization requires the support of an e-mail server. The most common mail server program is the Sendmail package. Sendmail supports all the services necessary to provide a comprehensive e-mail server. Sendmail supports connectivity to a mail user agent (MUA), mail transfer agents (MTAs), several transfer protocols, and delivery agents. Other programs also perform this function, such as Postfix.
MUA is an application that is run directly by the user and provides the ability to compose and send outgoing messages as well as to display, file, and print messages. Examples of MUAs are Netscape Composer, Kmail, StarOffice Mail, elm, mailx, mh, and zmail.
MTAs are used to transfer messages between e-mail servers. MUAs send messages to the transfer agent, which then transfers the message to another MTA; this MTA then either passes the message to a known MUA or to another MTA.
This process continues until the MTA knows the destination MUA and delivers the message.
Transfer agents are responsible for properly routing messages to their destination. The language spoken between transfer agents is known as a transfer protocol. The most common transfer protocol is SMTP (Simple Mail Transfer Protocol), but there are many more, including the well known UUCP (Unix-to- Unix copy) and X.400.
Delivery agents are used to place a message in a user’s mailbox. When the message arrives at its destination, the final transfer agent gives the message to the appropriate delivery agent, which adds the message to the user’s mailbox. In Linux, the most common delivery agent is the procmail service.
Linux also supports commercial products, such as the Lotus Domino server, to provide e-mail services. The ability of Linux to perform these tasks — specifically the Sendmail application — allows it to be used as a full function e-mail server.
Chapter 3 Pre-Installation Planning |
61 |
File servers
Linux is an excellent platform for providing access to file systems that may be local or remote. File servers are a necessity in the enterprise environment so that users may safely store their data in a central location. These file server services may be needed for other Linux, UNIX, Microsoft, and Apple clients or servers.
The ability of Linux to be used as a network file server is comparable to UNIX. UNIX uses the Network File System (NFS), which is a distributed file system, to mount a remote file system or directory and to treat those files or directories as if they were local. Linux uses the NFS software package, which includes commands and daemons for NFS, Network Information Service (NIS), and other services.
NIS was originally created by Sun Microsystems and was originally called Sun’s Yellow Pages—this terminology is sometimes still used.
Support for NFS normally requires that each system be configured to access each resource or device with a configuration file. The inclusion of NIS in Linux allows the server to maintain the configuration files for the entire network. This makes administration of network resources and devices easier, because only the NIS files must be updated instead of every client. It’s natural to expect Linux to provide services for other Linux or UNIX clients, but what about Microsoft clients?
Microsoft created the Server Message Block (SMB) protocol to provide the ability to share files and resources. SMB was created for use in the small local area network (LAN) environment and proved to be unsuitable for larger networks. As a result, Microsoft created the Common Internet File System (CIFS), which is based on SMB and Network Basic Input Output System (NetBIOS) of previous Microsoft networking. For Linux to provide support for Microsoft clients requires a service to run on each client or a Linux service that understands Microsoft protocols. Enter Samba, a software program created by Andrew Tridgell, which allows Linux clients to communicate with Microsoft resources using the SMB protocol. Samba is Open Source, and is available from www.samba.org. The last piece of the puzzle may require Linux to support Macintosh operating system clients.
Macintosh computers use AppleTalk to provide access to remote file systems and printers. Linux can provide network file services to Mac OS clients with the Netatalk implementation of AppleTalk. This allows Apple clients the ability to access files, directories, and printers on a Linux server. To provide the Netatalk service, Linux is required to have kernel level support for the AppleTalk Datagram Delivery Protocol (DDP). Most Linux distributions include this support. Apple’s latest MAC OS, called OS X is based on BSD UNIX, so NFS support may be provided or added to the new Mac OS. The support for Mac, Microsoft, UNIX, and Linux clients allows Linux file servers to exist and excel in the enterprise environment.