- •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
Chapter 16 Study Guide 503
3.Take a look at the last few lines of the /var/log/messages file using the tail command:
tail /var/log/messages
You should see a message indicating that crond was stopped. Check the running processes to ensure this by using the following command:
ps -ef | grep crond
4.Open another console window, and watch the /var/log/message file in real time:
tail -f /var/log/messages
5. Now, start the crond process by using its startup script in /etc/rc.d/init.d:
./crond start
You should see a message show up in the /var/log/messages file that crond was started.
6. Check to see if crond is running by using the following command:
ps -ef | grep crond
Answers to Chapter Questions
Chapter Pre-test
1.You can find the MAN pages directly on your system by simply typing the word man and the command that you want to look up.
2.The locate utility is used to find the location of a specified program.
3.By using the tail command, you can watch the log file in real-time, and see entries as they happen.
4.Most hardware problems are detected at boot time by the BIOS.
5.The main system kernel log file is /var/log/messages.
6.Most system configuration files are located in /etc.
7.You must first examine the symptoms of the problem to understand where to begin looking for a solution.
8.The pipe “|” option is used to send the output of one command to another one.
9.The best place to look for Linux documentation is the Linux Documentation Project.
10.You can examine current running processes by using the ps -ef command.
504 Chapter 16 Study Guide
Assessment Questions
1.D. The service, even though it is currently running, may be in a frozen state, and will need to be restarted. For review, see the “Process Configuration and Management” section.
2.B. Because the system has a problem even before the operating system is loaded, the problem is hardware-based, and is most likely caused by a problem with the system board. For review, see the “Methodology and Best Practices” section.
3.A. Because the area on the disk that stores the operating system can’t be found, the problem must lie with the hard disk. This can also indicate a problem with the master boot record of the drive. For review, see the “Methodology and Best Practices” section.
4.D. The locate command is able to find the location of the file very quickly. It is most helpful if you know the full name of the file that you are looking for. For review, see the “Tools for Log Files” section.
5.C. The general log file for the Linux system is /var/log/messages. For review, see the “System Log Files” section.
6.A. The quickest way to find out information on a system command is to use the internal MAN pages, which give you a full description of the command, and information on how to use all of its options. For review, see the “Troubleshooting Resources” section.
7.C. By outputting the log file through the grep command, a user can specify a certain keyword to look for, which then displays all instances of that word in the log file. This greatly reduces the time required for searching through a log file for relevant information. For review, see the “Tools for Log Files” section.
8.B. To see a file being updated in real time, you can use the tail -f command, which stands for “follow.” This way, you don’t have to keep opening and closing the file to see any changes. For review, see the “Tools for Log Files” section.
9.B. In order for the process to see the new configuration, it has to be restarted. For review, see the “Process Configuration and Management” section.
10.D. Because the installation program is specific to that distribution, it is best to visit that distribution’s home page for information on the installation. The other options may only give you general Linux support. For review, see the “Troubleshooting Resources” section.
11.A. Joining a local Linux Users Group allows you to interact with people within your city or region on any number of Linux issues. User groups are a great place to exchange information, and to get questions and answers on your system. For review, see the “Troubleshooting Resources” section.
12.D. By sending the output of the cat command to the more command, you can read the log file screen-by-screen. Thus, you can see the entire file from start to finish while using the spacebar to move ahead in the file. For review, see the “Tools for Log Files” section.
Chapter 16 Study Guide 505
13.C. Because the service seems to be working properly and no one else is having any problems, it is most likely that the user is not using her application correctly. For review, see the “Methodology and Best Practices” section.
14.A. To quickly narrow down your problem, you should initially determine whether the problem is hardwareor software-related. This puts you in the right direction from the beginning. For review, see the “Methodology and Best Practices” section.
15.B. By checking the running processes, you can quickly ascertain whether the suspected service is running or not. Even though the service may be running, it may be in a frozen state, so you should next test the service for functionality. For review, see the “Process Configuration and Management” section.
16.B. The command to show the first 100 lines of a file is head -100 filename. The tail command shows the last line of a filename, while grep searches for a specified search string within a file. For review, see the “Tools for Log Files” section.
17.D. The most overlooked item is often the item that can cause a problem. In this case, the user’s caps lock key was on, thus causing them to input their password incorrectly (Linux is case-sensitive). For review, see the “Methodology and Best Practices” section.
18.A. In this case (a broad topic like setting up networking), the best resource is a HOWTO document on the topic of networking. For review, see the “Troubleshooting Resources” section.
19.C. In this case, the most likely cause of the problem is that the /home partition is out of space, which is where the user is most likely trying to save his file. For review, see the “System Log Files” section.
20.D. Bootup kernel messages can be viewed in the /var/log/dmesg file. For review, see the “System Log Files” section.
Scenarios
1.You must begin with the obvious and most simple scenarios first, such as going to the user’s desk and trying to recreate the problem. Can the user access other files? Is the user logged in as themselves? Should the user even have rights to that file?
If this doesn’t work, you must move up the chain of systems from the most simple to the complex. Examine the user’s networking settings to make sure that they are correct. Try to access the same files from another point on the network.
Then, check your server for the problem. Most likely, the user doesn’t have permission to the file in question.
506 Chapter 16 Study Guide
2.Because the Web server was recently upgraded, it may be easy to assume that something is wrong with the software configuration. However, always start with the simplest and most obvious things first.
Check the log file of the Web server, and note any warning or error messages. This should give you a quick clue as to the location of the problem.
Judging by the log file, you can then narrow down the exact configuration issue that is affecting the server. You find that a typographical error has occurred in the configuration.
Using a text editor, you fix the problem. However, it won’t go into affect until you stop and restart the Web server process.
First, set up a console to actively view your application log file by using the following command:
tail -f /var/log/httpd/httpd.log
Then, stop and restart the Web server process, by paying close attention to any error messages that may appear in the log file.
Troubleshooting the
Boot Process
EXAM OBJECTIVES
6.5 Use system status tools to examine system resources and statuses (e.g., fsck, setserial)
6.6 Use systems boot disk(s) and root disk on workstation and server to diagnose and rescue file system
6.8 Use disk utilities to solve file system problems (e.g., mount, umount)
6.11 Take appropriate action on boot errors (e.g., LILO, bootstrap)
17C H A P T E R
508 |
Part VI Troubleshooting and Maintaining System Hardware |
CHAPTER PRE-TEST
1.Why should you always create a system rescue boot disk?
2.What is the purpose of the fsck utility?
3.What command can you use to examine current system resources usage?
4.What sort of utilities should be saved on a boot disk?
5.Why would you want to connect to your server using a terminal connection?
6.What command can you use to check current running processes?
7.What is the purpose of LILO?
8.What command can you use to format the master boot record?
9.What log can you check to analyze boot time errors?
10.What is the purpose of the setserial command?
Answers to these questions can be found at the end of the chapter.