- •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
16 Part I Linux Basics
Linux on a Personal Computer
At one time, the use of Linux on the PC was only for the technical professional or hobbyist. This is changing rapidly because the impression that Linux is always stable but difficult for the end user is being replaced by the idea that Linux is easy to install, set up, and use. Almost every distribution of Linux has an easy-to-use graphical interface that even the novice user can follow. Linux distributions are also using some excellent hardware probing tools for easier installation on any PC. Most creators of Linux distributions understand that the user may want to dual-boot with Microsoft Windows or Mac OS, so they make this an easy option to perform. The addition of Windows-like Desktop managers and GUI environments has eased the transition for traditional Mac OS and Microsoft Windows users into the Linux environment. All of these updated features are making Linux a viable choice for the home or business PC user. However, Linux still has some disadvantages because some tasks continue to be difficult to perform. For example, the novice user is still afraid of using the UNIX command line, and many other tasks involve a more indepth knowledge of the Linux environment that a novice user may not have. Behind the GUI interface, however, is the power, stability, and reliability that UNIX and Linux bring to the PC — regardless of the platform. A familiar interface, overlaying a powerful operating system, lets everyone use Linux and benefit from it.
Graphical installation
The fact that the common user has the ability to operate a Linux PC the same way as a competing OS is a tribute to the speed at which Linux has developed. This growth has powered several changes in Linux, the first of which is the installation interface. Most distributions have left the command line behind, opting for an easy- to-understand graphical installation. (Don’t worry; the command line is still there for those who want to use it.) These graphical installation programs provide mouse support, a basic windows system, and easy push button control panels that allow users to walk through the installation process fairly easily. Using this method, any user who can install or upgrade Microsoft Windows or Mac OS can install or upgrade Linux. This is the first key development that is allowing Linux to grow.
Hardware detection
The second development that is contributing to the growth of Linux is its hardware detection and support. All major distributions of Linux for the PC have excellent hardware detection. Through the use of advanced hardware detection and some support for plug-and-play devices, Linux can detect and load the correct device drivers for various types of hardware. This enables the user to ignore the previous task of manually configuring the PC for the hardware that it contains. The ability to detect most new hardware and automatically load proper drivers has eased the difficulty of Linux installation on most PCs.
Chapter 1 Basic Linux Concepts |
17 |
Graphical user interface
Because most users transitioning from the Microsoft Windows or the Mac operating system are used to a graphical environment, Linux had to have a similar interface to remain competitive. Both the K Desktop Environment (KDE) and GNU Network Object Model Environment (GNOME) are very competent GUI environments. They include most (if not all) of the features that the Microsoft Windows or Mac OS graphical interfaces offer, and they add several excellent utilities, such as word processors, database programs, spreadsheets, accounting programs, and many more. Several commercial programs, such as WordPerfect, are also available for Linux. The maturing process of the Linux graphical interface is not complete, but they are extremely comparable to the other GUIs on competitive operating systems.
Linux limitations on the PC
There are some prominent issues that must be resolved before more users will have the desire to switch to Linux. Most commercial application software is written for Microsoft or Mac OS, and even though some are ported to Linux, a large number of popular software applications are still not available. Some hardware is also not supported to the fullest capability possible. Linux relies on vendors to make their drivers or hardware open to developers. Some manufacturers don’t release information for their hardware. This lack of information can cause the user some difficulty in configuring the hardware — especially if no drivers are available for the device. It can take a long time for a developer to write a Linux driver for recently released hardware devices. These issues are decreasing in number as new releases of the Linux kernel make improvements on support for 3D graphics, USB, IEEE1394, and virtually any other new hardware technology.
Linux succeeds on the PC
Because Linux is now providing support for almost every piece of hardware, has an easy installation interface, and gives users an excellent GUI to work with, Linux has become the fastest growing operating system today. Perhaps Linux will soon be seen as the best operating system for the PC — and it is completely possible that Linux will displace other operating systems as the primary OS for every PC platform.
Linux on workstations
Because Linux will work with virtually any hardware device, it can also be ported easily to work on virtually every hardware platform. This ability has allowed Linux to be installed on the professional workstation. This ability to run on any workstation platform may provide users with the following:
New life for older workstations with slower hardware
A common operating system environment across different platforms
Software portability to all hardware platforms
18 Part I Linux Basics
These benefits can enable general users and users in companies and governments to work on the same operating system across various hardware from PCs to workstations.
Because Linux was created with UNIX compliance in mind, it inherits the portability of UNIX. Portability means that it can be adapted to practically any hardware, so you will see it on everything from embedded chips to multi-processor servers. The porting to various workstation platforms allows Linux to replace vendor-specific operating systems and provide a current, common, and POSIX-compliant operating system, which can be used to provide a common operating system environment to all hardware devices. Linux can thus save a user, company, or government the expense of replacing or upgrading the vendor-specific operating system on the old workstations.
Linux on servers
Because UNIX is an excellent server operating system, Linux inherits the UNIX capability of providing efficient and stable server services. The stability of Linux makes it a natural selection to provide services to many users. Because Linux supports all the major services that are on the market today and can easily scale upwards to support additional services and applications, it fulfills all the needs that a server must provide. Linux runs on virtually every platform, so it is able to replace less capable and unreliable operating systems. Linux does have some limitations, but as stated previously, Linux is rapidly resolving these deficiencies as the kernel is improved and evolved.
Stability
Servers require stability. Linux is a very stable operating system — often running for years without a reboot — so it can easily provide a reliable server to any user, company, or government. The reliability of Linux can be traced to the kernel, and because the GNU GPL allows anyone to fix problems with the kernel, it is continually evolving its stability through constant improvements. The kernel, the core system, and other services can run as modules, thus adding to the stability of Linux. Additionally, if a module were to crash, it can be stopped and restarted separately from the operating system; this is a good way to update drivers and other services that are running on the server. By providing a very stable environment, Linux is very well suited to be a server.
Services
Linux provides the base operating system for a server environment, but its popularity has come from the wide variety of applications and services that have been developed for it by Linux programmers. These services are usually released under Open Source or GNU GPL methods and are improved and modified to work as stable and efficient as possible.