- •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
496 |
Part VI Troubleshooting and Maintaining System Hardware |
Always restart a process after changing the configuration file. If you don’t, the changes won’t take effect.
Configuration Files
6.3 Examine and edit configuration files based on symptoms of a problem using system utilities
You may find that a process is not working properly because an error has occurred in its configuration file. Even a simple typing mistake can cause an application or process to run abnormally, so you must take great care when editing these configuration files.
The config files for most system processes and applications are stored in the /etc directory with files ending in the .conf extension. These configuration files are mere text files, and can be manipulated with any good text editor.
This example employs the httpd.conf file for the Web server. Consider this problem: You have set your document root directory to a wrong location. Users that are trying to access the Web server find that they can’t access any documents, or (even worse) the document root location is set to a directory with sensitive files.
In this case, the administrator must edit the httpd.conf file and set the DocumentRoot directive to its correct location. Change it back to the default directory of /home/httpd/html and then save the httpd.conf file.
At this point, if your users try to immediately access the Web page, you will still have the original problem. This is because the process is still running with the original configuration file. To have the program read the new configuration file, you must tell the process to stop and start, or perform a restart.
Summary
This chapter details some basic steps of troubleshooting a problem. This chapter describes many tools and resources to aid in finding a solution to your issue as efficiently as possible. For the exam, keep in mind the following key points:
Methodology and Best Practices
•Never overlook the obvious
•Work your way from the simple to the complex
•Document your solution
Chapter 16 Linux Troubleshooting Basics 497
Resources
•Linux User Groups, Linux Documentation Project
•News groups, mailing lists
•MAN pages, HOWTOs
System Log Files
•/var/log/messages: Main system kernel log file — examine it frequently
•/var/log/mesg: Kernel boot messages
Command Line Tools
•cat: Print a file to the screen
•grep: Find a pattern of text in a file
•head / tail: Examine the top or bottom of a text file
•more: Read files a screen at a time
•| and >, >>: Used to redirect output to another program or output file
•locate, find: Used to find the location of files
Process management
•Scripts located in /etc/rc.d/init.d
•Commands include start, stop, restart
•Use ps -ef to find running processes
Configuration files: Most are located in /etc, end in .conf extension
498 Chapter 16 Study Guide
STUDY GUIDE
The Study Guide section provides you with the opportunity to test your knowledge about the Linux+ exam objectives that are covered in this chapter. The Assessment Questions provide practice for the real exam, and the Scenarios provide practice with real situations. If you get any questions wrong, use the answers to determine the part of the chapter that you should review before continuing.
Assessment Questions
1.Users are complaining that Samba services are not working properly. The administrator checks that the service is running. What can the administrator do to fix the problem?
A.Reboot the system
B.Reload the samba configuration file
C.Kill the samba service
D.Restart the samba service
2.A Linux system has been rebooted. When it starts up, no display appears on the screen and the system is beeping. What may this indicate?
A.The monitor is not connected
B.BIOS is indicating a system board problem
C.One of the hard drives is out of space
D.The Linux kernel is corrupted
3.A Linux system has crashed. The server is restarted, but a message appears, indicating that the operating system can’t be found. What is the most likely cause of the problem?
A.The hard drive has failed
B.The kernel needs to be upgraded
C.The motherboard has failed
D.The network card has failed
Chapter 16 Study Guide 499
4.A Linux administrator is having a difficult time locating the configuration file httpd.conf for the Web server. What command line tool can aid in finding the file?
A.tail
B.cat
C.grep
D.locate
5.A Linux administrator is noticing odd system behavior. Which log file can be examined to find general system log messages?
A./var/cron/messages
B./var/log/maillog
C./var/log/messages
D./etc/httpd/log
6.A Linux administrator is having trouble with the options for a particular command. What is the best resource to use for information on the command?
A.MAN pages
B.Linux Documentation Project
C.Linux distribution home page
D.Usenet newsgroups
7.An administrator is reading through a lengthy log file in order to find out why a certain application keeps crashing. What command can be used to simplify the log search using a search string?
A.find
B.cat
C.grep
D.locate
8.A programmer is constantly making changes to his application’s configuration file, and then running the application to see if anything comes up in the error log. Which command lets the user see the log file in real-time, as entries are being added?
A.tail logfile
B.tail -f logfile
C.head -50 logfile
D.more logfile
500 Chapter 16 Study Guide
9.In order to fix a bug in a process, an administrator has made changes to the daemon’s configuration file. When she checks the process, it is still exhibiting the same behavior. What is the most likely cause of the problem?
A.The file was saved with a different name
B.The process has to be restarted to enable the new configuration
C.The process needs to be reinstalled
D.The system needs to be rebooted
10.An administrator is having problem with a specific Linux distribution’s installation program. What is the best resource to use to troubleshoot the problem?
A.HOWTO networking guide
B.Linux Documentation Project home page
C.Local Linux users group
D.The distribution’s Web page
11.What is the best source of information for local Linux concerns within a Linux administrator’s geographic region?
A.Linux Users Group
B.Mailing List
C.Usenet group
D.MAN pages
12.A Linux administrator is trying to read through a large log file using the cat command. Because it is so large, the cat command scrolls the file right to the end without allowing the start of the file to be read. What command can be used to more easily read the file?
A.Use head to read the first ten lines of the log
B.Pipe the cat command to the head command
C.Copy the output to another file
D.Pipe the cat command to the more command
13.A user is complaining that he can’t connect to the company’s Web server. You have checked that the Web service is running and no one else is having problems connecting to the server. What is the most likely cause of the problem?
A.The server needs to be restarted
B.The httpd daemon needs to be stopped then started
C.The user is not using their program correctly
D.The Web server configuration is flawed
Chapter 16 Study Guide 501
14.When troubleshooting a problem, what should be an initial step in narrowing down the issue?
A.Examine if the problem is hardware or software related
B.Determine if the problem persists when the server is rebooted
C.Determine the time of day the issue occurred
D.Determine if other servers exhibit the same behavior
15.A user is complaining that the printing service is not working. What is the quickest way to check whether the service is indeed running or not?
A.Restart the server
B.Check the running processes with the ps command
C.Have the user log out then in again
D.grep the main log file for printer errors
16.What command should be used to show the first 100 lines of a file?
A.grep -100 filename
B.head -100 filename
C.tail -100 filename
D.tail -f filename
17.A Linux administrator is currently examining a problem involving a user who is unable to login. After checking the appropriate services and examining the user’s account properties, a problem can’t be found. What is the most likely cause of the issue?
A.The user’s password is expired
B.The login process is not available
C.The user is locked out of their account
D.The user’s caps lock key is on
18.A Linux administrator is trying to set up networking on a new system, but is running into problems. What is the best source of troubleshooting information in this case?
A.Networking HOWTO
B.MAN pages
C.Mailing List
D.Linux Users Group