- •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
240 Part III Configuration
Configuring Internet Services
3.6 Configure basic Internet services (e.g., HTTP, POP, SMTP, SNMP, FTP)
3.15 Configure access rights (e.g., rlogin NIS, FTP, TFTP, SSH, Telnet)
The configuration of Internet services is a very broad topic. Client services are usually thought of as World Wide Web, e-mail, news, and FTP clients. Configuring these services requires the knowledge of which service is being provided.
Web browser
A Web browser is used to view Web pages that use the Hypertext Markup Language (HTML) over the Hypertext Transfer Protocol (HTTP). Configuring a third party Web browser or an included browser, such as the KDE Konqueror Web browser, requires very little effort. Usually, these programs use the settings created in the configuration of networking. After a system has been assigned an IP address, netmask, default path (gateway) and DNS, the Web browser uses those settings to access the intranet or Internet. However, in some environments, these settings may not be enough. For example, if a proxy server is being used to manage Internet access for users, you must configure an additional setting to indicate the address of the proxy server.
POP and SMTP
POP3 and SMTP are used in conjunction to provide a client with the ability to send and receive e-mail. The POP3, or Post Office Protocol 3, is the most recent version of a standard protocol for receiving e-mail downloaded to clients from servers. The POP3 system holds the e-mail until the client connects; after the client connects, the mail is downloaded to the client’s system. The Simple Mail Transfer Protocol (SMTP) is used for sending and receiving e-mail. Because it is limited in its ability to queue messages, however, SMTP is normally used for server-to-server mail transfer and uploading of messages from clients.
The IMAP standard is an alternative to POP3. It allows the client to access e-mail from the mail server without removing it from the server until instructed to do so by the client.
The basic configuration of POP3 and SMTP clients requires some information. You need to insert the following information into the mail client.
User Name
E-mail account name
POP3 server name (used for incoming mail)
Chapter 7 Configuring Networking 241
POP3 TCP/IP port used; the default is 110 and is usually used but can be changed
SMTP server name (used for outgoing mail)
SMTP TCP/IP port used, the default is 25 and is usually used but can be changed
Authentication method used
Using these settings with any mail client software should allow the configuration of mail accounts. Another feature also included with many mail clients is the ability to access News servers. These can be configured inside the mail client and require the following additional information.
Server name
NNTP TCP/IP port used, the default settings are 119 for standard connections and 563 for SSL connections (usually used but can be changed)
User name and password preferences
This enables the configuration of POP3, SMTP, and NNTP for clients in most environments.
FTP
The standard for distributing files on the Internet is the File Transfer Protocol (FTP). It is the simplest way to exchange files between computers on the Internet. With a simple command line interface, a user can use FTP to perform updates, deletes, renames, moves, and copies of files at a server. Web browsers make FTP requests to download files that are selected from a Web page. To use FTP, a user can use the switches and commands shown in Table 7-4.
Table 7-4
FTP Client Switches and Commands
Switch/Command |
Description |
|
|
-d |
Enable debugging. |
|
|
-g |
Disable filename “globbing.” |
|
|
-i |
Turn off interactive prompting during multiple file transfers. |
|
|
-n |
Do not attempt “auto-login” upon initial connection. |
|
|
-t |
Enable packet tracing (not used). |
|
|
Continued
242 Part III Configuration
|
Table 7-4 (continued) |
|
|
Switch/Command |
Description |
|
|
-v |
Show all responses from the remote server, as well as report on |
|
data transfer statistics. This is turned on by default if ftp is |
|
running interactively with its input coming from the user’s |
|
terminal. |
|
|
! [ command ] |
Run command as a shell command on the local machine. If no |
|
command is given, invoke an interactive shell. |
|
|
$ macro-name [ args ] |
Execute the macro-name that was defined with the macdef |
|
command. |
|
|
account [ passwd ] |
Supply a supplemental password required by a remote system |
|
for access to resources once a login has been successfully |
|
completed. |
|
|
append |
Append a local file to a file on the remote machine. |
|
|
ascii |
Use ASCII, the default. |
|
|
bell |
Sound a bell after each file transfer command is completed. |
|
|
binary |
Use binary. |
|
|
bye |
Terminate the FTP session with the remote server and exit ftp. |
|
|
case |
Toggle remote computer file name case mapping during mget |
|
commands. |
|
|
cd remote-directory |
Change the working directory on the remote machine to |
|
remote-directory. |
|
|
cdup |
Change the remote machine’s working directory to the parent of |
|
the current remote machine’s working directory. |
|
|
close |
Terminate the FTP session with the remote server, and return to |
|
the command interpreter. |
|
|
cr |
Toggle RETURN stripping during “network ASCII” type file |
|
retrieval. |
|
|
delete remote-file |
Delete the file remote-file on the remote machine. |
|
|
debug [ debug-value ] |
Toggle debugging mode. If an optional debug-value is specified it |
|
is used to set the debugging level. |
|
|
dir [ remote-directory ] |
Print a listing of the directory contents in the directory, |
[ local-file ] |
remote-directory, and, optionally, placing the output in local-file. |
|
If no directory is specified, the current working directory on the |
|
remote machine is used. If no local file is specified, output is sent |
|
to the terminal. |
|
|
disconnect |
Terminate the FTP session with the remote server, and return to |
|
the command interpreter. |
Chapter 7 Configuring Networking 243
Switch/Command |
Description |
|
|
form [ format-name ] |
Set the carriage control format subtype. |
|
|
get |
Retrieve the remote-file and store it on the local machine. |
|
|
glob |
Toggle filename expansion, or “globbing,” for mdelete, mget, and |
|
mput. If globbing is turned off, filenames are taken literally. |
|
|
hash |
Toggle hash-sign (#) printing for each data block transferred. |
|
|
help [ command ] |
Print an informative message about the meaning of |
|
thecommand. |
|
|
lcd [ directory ] |
Change the working directory on the local machine. |
|
|
ls [ remote-directory ] |
Print an abbreviated listing of the contents of a directory on the |
[ local-file ] |
remote machine. |
|
|
macdef macro-name |
Define a macro. |
|
|
mdelete [remote-files] |
Delete the remote-files on the remote machine. |
|
|
mdir remote-files |
Like dir, except multiple remote files may be specified. |
local-file |
|
|
|
mget remote-files |
Expand the remote-files on the remote machine and do a get for |
|
each file name thus produced. |
|
|
mkdir directory-name |
Make a directory on the remote machine. |
|
|
mls remote-files |
Like ls, except multiple remote files may be specified. |
local-file |
|
|
|
mode [ mode-name ] |
Set the “transfer mode” to mode-name. |
|
|
mput local-files |
Expand wild cards in the list of local files given as arguments and |
|
do a put for each file in the resulting list. |
|
|
nmap |
Set or unset the filename mapping mechanism. |
[ inpattern outpattern ] |
|
|
|
ntrans |
Set or unset the filename character translation mechanism. |
[ inchars [ outchars ] ] |
|
|
|
open host [ port ] |
Establish a connection to the specified host FTP server with |
|
optional port selection. |
|
|
prompt |
Toggle interactive prompting. |
|
|
proxy ftp-command |
Execute an FTP command on a secondary control connection. |
|
|
put local-file |
Upload a local file to the remote machine. |
remote-file |
|
|
|
pwd |
Print working directory. |
|
|
quit |
Terminate the FTP session with the remote server and exit ftp. |
|
|
Continued
244 Part III Configuration
|
Table 7-4 (continued) |
|
|
Switch/Command |
Description |
|
|
quote arg1 arg2 ... |
Send the arguments specified, verbatim, to the remote FTP server. |
|
A single FTP reply code is expected in return. |
|
|
recv remote-file |
Retrieve the remote-file and store it on the local machine. |
[ local-file] |
|
|
|
remotehelp |
Request help from the remote FTP server. |
[ command-name ] |
|
|
|
rename from to |
Rename the file retreived from the remote machine. |
|
|
reset |
Clear reply queue. |
|
|
rmdir directory-name |
Delete a directory on the remote machine. |
|
|
runique |
Toggle storing of files on the local system with unique filenames. |
|
|
send local-file |
A synonym for put. |
[ remote-file ] |
|
|
|
sendport |
Toggle the use of PORT commands. |
|
|
status |
Show the current status of ftp. |
|
|
struct [ struct-name ] |
Set the “file structure” to struct-name. |
|
|
sunique |
Toggle storing of files on remote machine under unique file |
|
names. |
|
|
tenex |
Set the “representation type” to that needed to talk to TENEX |
|
machines. |
|
|
trace |
Toggle packet tracing (not used). |
|
|
type [ type-name ] |
Set the “representation type” to type-name. |
|
|
user user-name |
Identify yourself to the remote FTP server. |
[password ][ account] |
|
|
|
verbose |
Toggle verbose mode. |
|
|
? [ command ] |
Print an informative message about the meaning of command. |
|
|
The FTP command is not much use without the FTP server service running on the remote system. To provide this feature, the FTP program requires the ftpd daemon. Luckily, the ftpd daemon is started by the inetd by default. The inetd daemon listens for connections on port 20, in the /etc/inetd.conf and initiates the appropriate daemon when an FTP connection is requested.