Product SiteDocumentation Site

Red Hat Enterprise Linux 6

Deployment Guide

Deployment, Configuration and Administration of Red Hat Enterprise Linux 6

Edition 2

Jaromír Hradílek

Red Hat, Inc. Engineering Content Services

Douglas Silas

Red Hat, Inc. Engineering Content Services

Martin Prpič

Red Hat, Inc. Engineering Content Services

Eva Kopalová

Red Hat, Inc. Engineering Content Services

Ella Deon Lackey

Red Hat, Inc. Engineering Content Services

Tomáš Čapek

Red Hat, Inc. Engineering Content Services

Petr Kovář

Red Hat, Inc. Engineering Content Services

Miroslav Svoboda

Red Hat, Inc. Engineering Content Services

John Ha

Red Hat, Inc. Engineering Content Services

David O'Brien

Red Hat, Inc. Engineering Content Services

Michael Hideo

Red Hat, Inc. Engineering Content Services

Don Domingo

Red Hat, Inc. Engineering Content Services

Legal Notice

Copyright © 2010, 2011 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other trademarks are the property of their respective owners.


1801 Varsity Drive
RaleighNC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701

Abstract
The Deployment Guide documents relevant information regarding the deployment, configuration and administration of Red Hat Enterprise Linux 6. It is oriented towards system administrators with a basic understanding of the system.

Preface
1. Target Audience
2. How to Read this Book
3. Document Conventions
3.1. Typographic Conventions
3.2. Pull-quote Conventions
3.3. Notes and Warnings
4. Feedback
5. Acknowledgments
I. Basic System Configuration
1. Keyboard Configuration
1.1. Changing the Keyboard Layout
1.2. Adding the Keyboard Layout Indicator
1.3. Setting Up a Typing Break
2. Date and Time Configuration
2.1. Date/Time Properties Tool
2.1.1. Date and Time Properties
2.1.2. Network Time Protocol Properties
2.1.3. Time Zone Properties
2.2. Command Line Configuration
2.2.1. Date and Time Setup
2.2.2. Network Time Protocol Setup
3. Managing Users and Groups
3.1. Introduction to Users and Groups
3.1.1. User Private Groups
3.1.2. Shadow Passwords
3.2. Using the User Manager Tool
3.2.1. Viewing Users and Groups
3.2.2. Adding a New User
3.2.3. Adding a New Group
3.2.4. Modifying User Properties
3.2.5. Modifying Group Properties
3.3. Using Command Line Tools
3.3.1. Adding a New User
3.3.2. Adding a New Group
3.3.3. Enabling Password Aging
3.3.4. Enabling Automatic Logouts
3.3.5. Creating Group Directories
3.4. Additional Resources
3.4.1. Installed Documentation
II. Package Management
4. Product Subscriptions and Entitlements
4.1. An Overview of Managing Subscriptions and Content
4.1.1. The Purpose of Subscription Management
4.1.2. Defining Subscriptions, Entitlements, and Products
4.1.3. Subscription Management Tools
4.1.4. Subscription and Content Architecture
4.1.5. Advanced Content Management: Extended Update Support
4.1.6. Certificate-based Red Hat Network versus RHN Classic
4.2. Using Red Hat Subscription Manager Tools
4.2.1. Launching Red Hat Subscription Manager
4.2.2. About subscription-manager
4.2.3. Looking at RHN Subscription Management
4.3. Managing Special Deployment Scenarios
4.3.1. Local Subscription Services, Local Content Providers, and Multi-Tenant Organizations
4.3.2. Virtual Guests and Hosts
4.3.3. Domains
4.4. Registering, Unregistering, and Reregistering a System
4.4.1. Registering Consumers in the Hosted Environment
4.4.2. Registering Consumers to a Local Organization
4.4.3. Registering an Offline Consumer
4.4.4. Registering Consumers from the Command Line
4.4.5. Unregistering
4.4.6. Restoring a Registration
4.5. Handling Subscriptions
4.5.1. Subscribing and Unsubscribing through the GUI
4.5.2. Handling Subscriptions through the Command Line
4.5.3. Stacking Subscriptions
4.5.4. Manually Adding a New Subscription
4.6. Redeeming Subscriptions on a Machine
4.6.1. Redeeming Subscriptions through the GUI
4.6.2. Redeeming Subscriptions on a Machine through the Command Line
4.7. Viewing Available and Used Subscriptions
4.7.1. Viewing Subscriptions in the GUI
4.7.2. Listing Subscriptions with the Command Line
4.7.3. Viewing Subscriptions Used in Both RHN Classic and Certificate-based Red Hat Network
4.8. Working with Subscription yum Repos
4.9. Responding to Subscription Notifications
4.10. Healing Subscriptions
4.10.1. Enabling Healing
4.10.2. Changing the Healing Check Frequency
4.11. Viewing Organization Information
4.12. Updating Entitlements Certificates
4.12.1. Updating Entitlement Certificates
4.12.2. Updating Subscription Information
4.13. Configuring the Subscription Service
4.13.1. Red Hat Subscription Manager Configuration Files
4.13.2. Using the config Command
4.13.3. Using an HTTP Proxy
4.13.4. Changing the Subscription Server
4.13.5. Configuring Red Hat Subscription Manager to Use a Local Content Provider
4.13.6. Managing Secure Connections to the Subscription Server
4.13.7. Starting and Stopping the Subscription Service
4.13.8. Checking Logs
4.13.9. Showing and Hiding Incompatible Subscriptions
4.13.10. Checking and Adding System Facts
4.13.11. Regenerating Identity Certificates
4.13.12. Getting the System UUID
4.13.13. Viewing Package Profiles
4.13.14. Retrieving the Consumer ID, Registration Tokens, and Other Information
4.14. About Certificates and Managing Entitlements
4.14.1. The Structure of Identity Certificates
4.14.2. The Structure of Entitlement Certificates
4.14.3. The Structure of Product Certificates
4.14.4. Anatomy of Satellite Certificates
5. Yum
5.1. Checking For and Updating Packages
5.1.1. Checking For Updates
5.1.2. Updating Packages
5.1.3. Preserving Configuration File Changes
5.2. Packages and Package Groups
5.2.1. Searching Packages
5.2.2. Listing Packages
5.2.3. Displaying Package Information
5.2.4. Installing Packages
5.2.5. Removing Packages
5.2.6. Working with Transaction History
5.3. Configuring Yum and Yum Repositories
5.3.1. Setting [main] Options
5.3.2. Setting [repository] Options
5.3.3. Using Yum Variables
5.3.4. Viewing the Current Configuration
5.3.5. Adding, Enabling, and Disabling a Yum Repository
5.3.6. Creating a Yum Repository
5.4. Yum Plug-ins
5.4.1. Enabling, Configuring, and Disabling Yum Plug-ins
5.4.2. Installing Additional Yum Plug-ins
5.4.3. Plug-in Descriptions
5.5. Additional Resources
6. PackageKit
6.1. Updating Packages with Software Update
6.2. Using Add/Remove Software
6.2.1. Refreshing Software Sources (Yum Repositories)
6.2.2. Finding Packages with Filters
6.2.3. Installing and Removing Packages (and Dependencies)
6.2.4. Installing and Removing Package Groups
6.2.5. Viewing the Transaction Log
6.3. PackageKit Architecture
6.4. Additional Resources
III. Networking
7. NetworkManager
7.1. The NetworkManager Daemon
7.2. Interacting with NetworkManager
7.2.1. Connecting to a Network
7.2.2. Configuring New and Editing Existing Connections
7.2.3. Connecting to a Network Automatically
7.2.4. User and System Connections
8. Network Interfaces
8.1. Network Configuration Files
8.2. Interface Configuration Files
8.2.1. Ethernet Interfaces
8.2.2. Channel Bonding Interfaces
8.2.3. Alias and Clone Files
8.2.4. Dialup Interfaces
8.2.5. Other Interfaces
8.3. Interface Control Scripts
8.4. Configuring Static Routes
8.5. Network Function Files
8.6. Additional Resources
8.6.1. Installed Documentation
IV. Infrastructure Services
9. Services and Daemons
9.1. Configuring the Default Runlevel
9.2. Configuring the Services
9.2.1. Using the Service Configuration Utility
9.2.2. Using the ntsysv Utility
9.2.3. Using the chkconfig Utility
9.3. Running the Services
9.3.1. Checking the Service Status
9.3.2. Running the Service
9.3.3. Stopping the Service
9.3.4. Restarting the Service
9.4. Additional Resources
9.4.1. Installed Documentation
9.4.2. Related Books
10. Configuring Authentication
10.1. Configuring System Authentication
10.1.1. Launching the Authentication Configuration Tool UI
10.1.2. Selecting the Identity Store for Authentication
10.1.3. Configuring Alternative Authentication Features
10.1.4. Configuring Authentication from the Command Line
10.1.5. Using Custom Home Directories
10.2. Using and Caching Credentials with SSSD
10.2.1. About the sssd.conf File
10.2.2. Starting and Stopping SSSD
10.2.3. Configuring Services
10.2.4. Creating Domains
10.2.5. Configuring Access Control for SSSD Domains
10.2.6. Configuring Domain Failover
10.2.7. Deleting Domain Cache Files
10.2.8. Using NSCD with SSSD
10.2.9. Troubleshooting SSSD
11. OpenSSH
11.1. The SSH Protocol
11.1.1. Why Use SSH?
11.1.2. Main Features
11.1.3. Protocol Versions
11.1.4. Event Sequence of an SSH Connection
11.2. Configuring OpenSSH
11.2.1. Configuration Files
11.2.2. Starting an OpenSSH Server
11.2.3. Requiring SSH for Remote Connections
11.2.4. Using a Key-Based Authentication
11.3. OpenSSH Clients
11.3.1. Using the ssh Utility
11.3.2. Using the scp Utility
11.3.3. Using the sftp Utility
11.4. More Than a Secure Shell
11.4.1. X11 Forwarding
11.4.2. Port Forwarding
11.5. Additional Resources
11.5.1. Installed Documentation
11.5.2. Useful Websites
V. Servers
12. DHCP Servers
12.1. Why Use DHCP?
12.2. Configuring a DHCP Server
12.2.1. Configuration File
12.2.2. Lease Database
12.2.3. Starting and Stopping the Server
12.2.4. DHCP Relay Agent
12.3. Configuring a DHCP Client
12.4. Configuring a Multihomed DHCP Server
12.4.1. Host Configuration
12.5. DHCP for IPv6 (DHCPv6)
12.6. Additional Resources
12.6.1. Installed Documentation
13. DNS Servers
13.1. Introduction to DNS
13.1.1. Nameserver Zones
13.1.2. Nameserver Types
13.1.3. BIND as a Nameserver
13.2. BIND
13.2.1. Configuring the named Service
13.2.2. Editing Zone Files
13.2.3. Using the rndc Utility
13.2.4. Using the dig Utility
13.2.5. Advanced Features of BIND
13.2.6. Common Mistakes to Avoid
13.2.7. Additional Resources
14. Web Servers
14.1. The Apache HTTP Server
14.1.1. New Features
14.1.2. Notable Changes
14.1.3. Updating the Configuration
14.1.4. Running the httpd Service
14.1.5. Editing the Configuration Files
14.1.6. Working with Modules
14.1.7. Setting Up Virtual Hosts
14.1.8. Setting Up an SSL Server
14.1.9. Additional Resources
15. Mail Servers
15.1. Email Protocols
15.1.1. Mail Transport Protocols
15.1.2. Mail Access Protocols
15.2. Email Program Classifications
15.2.1. Mail Transport Agent
15.2.2. Mail Delivery Agent
15.2.3. Mail User Agent
15.3. Mail Transport Agents
15.3.1. Postfix
15.3.2. Sendmail
15.3.3. Fetchmail
15.3.4. Mail Transport Agent (MTA) Configuration
15.4. Mail Delivery Agents
15.4.1. Procmail Configuration
15.4.2. Procmail Recipes
15.5. Mail User Agents
15.5.1. Securing Communication
15.6. Additional Resources
15.6.1. Installed Documentation
15.6.2. Useful Websites
15.6.3. Related Books
16. Directory Servers
16.1. OpenLDAP
16.1.1. Introduction to LDAP
16.1.2. Installing the OpenLDAP Suite
16.1.3. Configuring an OpenLDAP Server
16.1.4. Running an OpenLDAP Server
16.1.5. Configuring a System to Authenticate Using OpenLDAP
16.1.6. Additional Resources
17. File and Print Servers
17.1. Samba
17.1.1. Introduction to Samba
17.1.2. Samba Daemons and Related Services
17.1.3. Connecting to a Samba Share
17.1.4. Configuring a Samba Server
17.1.5. Starting and Stopping Samba
17.1.6. Samba Server Types and the smb.conf File
17.1.7. Samba Security Modes
17.1.8. Samba Account Information Databases
17.1.9. Samba Network Browsing
17.1.10. Samba with CUPS Printing Support
17.1.11. Samba Distribution Programs
17.1.12. Additional Resources
17.2. FTP
17.2.1. The File Transfer Protocol
17.2.2. FTP Servers
17.2.3. Files Installed with vsftpd
17.2.4. Starting and Stopping vsftpd
17.2.5. vsftpd Configuration Options
17.2.6. Additional Resources
17.3. Printer Configuration
17.3.1. Starting the Printer Configuration Tool
17.3.2. Starting Printer Setup
17.3.3. Adding a Local Printer
17.3.4. Adding an AppSocket/HP JetDirect printer
17.3.5. Adding an IPP Printer
17.3.6. Adding an LPD/LPR Host or Printer
17.3.7. Adding a Samba (SMB) printer
17.3.8. Selecting the Printer Model and Finishing
17.3.9. Printing a test page
17.3.10. Modifying Existing Printers
17.3.11. Additional Resources
VI. Monitoring and Automation
18. System Monitoring Tools
18.1. Viewing System Processes
18.2. Viewing Memory Usage
18.3. Viewing File Systems
18.4. Viewing Hardware Information
18.5. Monitoring Performance with Net-SNMP
18.5.1. Installing Net-SNMP
18.5.2. Running the Net-SNMP Daemon
18.5.3. Configuring Net-SNMP
18.5.4. Retrieving Performance Data over SNMP
18.5.5. Extending Net-SNMP
18.6. Additional Resources
18.6.1. Installed Documentation
19. Viewing and Managing Log Files
19.1. Configuring rsyslog
19.1.1. Global Directives
19.1.2. Modules
19.1.3. Rules
19.1.4. rsyslog Command Line Configuration
19.2. Locating Log Files
19.2.1. Configuring logrotate
19.3. Viewing Log Files
19.4. Adding a Log File
19.5. Monitoring Log Files
19.6. Additional Resources
19.6.1. Installed Documentation
19.6.2. Useful Websites
20. Automating System Tasks
20.1. Cron and Anacron
20.1.1. Starting and Stopping the Service
20.1.2. Configuring Anacron Jobs
20.1.3. Configuring Cron Jobs
20.1.4. Controlling Access to Cron
20.1.5. Black/White Listing of Cron Jobs
20.2. At and Batch
20.2.1. Configuring At Jobs
20.2.2. Configuring Batch Jobs
20.2.3. Viewing Pending Jobs
20.2.4. Additional Command Line Options
20.2.5. Controlling Access to At and Batch
20.2.6. Starting and Stopping the Service
20.3. Additional Resources
20.3.1. Installed Documentation
21. Automatic Bug Reporting Tool (ABRT)
21.1. Overview
21.2. Installing ABRT and Starting its Services
21.3. Running ABRT
21.3.1. Using the Graphical User Interface
21.3.2. Using the Command Line Interface
21.4. Configuring ABRT
21.4.1. ABRT Events
21.4.2. Standard ABRT Installation Supported Events
21.4.3. Event Configuration in ABRT GUI
21.4.4. ABRT Specific Configuration
21.4.5. Configuring Automatic Reporting
21.4.6. Uploading and reporting using a proxy server
21.5. Configuring Centralized Crash Collection
21.5.1. Configuration Steps Required on a Dedicated System
21.5.2. Configuration Steps Required on a Client System
21.5.3. Saving Package Information
21.5.4. Testing ABRT's Crash Detection
22. OProfile
22.1. Overview of Tools
22.2. Configuring OProfile
22.2.1. Specifying the Kernel
22.2.2. Setting Events to Monitor
22.2.3. Separating Kernel and User-space Profiles
22.3. Starting and Stopping OProfile
22.4. Saving Data
22.5. Analyzing the Data
22.5.1. Using opreport
22.5.2. Using opreport on a Single Executable
22.5.3. Getting more detailed output on the modules
22.5.4. Using opannotate
22.6. Understanding /dev/oprofile/
22.7. Example Usage
22.8. OProfile Support for Java
22.8.1. Profiling Java Code
22.9. Graphical Interface
22.10. OProfile and SystemTap
22.11. Additional Resources
22.11.1. Installed Docs
22.11.2. Useful Websites
VII. Kernel, Module and Driver Configuration
23. Manually Upgrading the Kernel
23.1. Overview of Kernel Packages
23.2. Preparing to Upgrade
23.3. Downloading the Upgraded Kernel
23.4. Performing the Upgrade
23.5. Verifying the Initial RAM Disk Image
23.6. Verifying the Boot Loader
23.6.1. Configuring the GRUB Boot Loader
23.6.2. Configuring the OS/400 Boot Loader
23.6.3. Configuring the YABOOT Boot Loader
24. Working with Kernel Modules
24.1. Listing Currently-Loaded Modules
24.2. Displaying Information About a Module
24.3. Loading a Module
24.4. Unloading a Module
24.5. Setting Module Parameters
24.6. Persistent Module Loading
24.7. Specific Kernel Module Capabilities
24.7.1. Using Multiple Ethernet Cards
24.7.2. Using Channel Bonding
24.8. Additional Resources
25. The kdump Crash Recovery Service
25.1. Configuring the kdump Service
25.1.1. Configuring the kdump at first boot
25.1.2. Using the Kernel Dump Configuration Utility
25.1.3. Configuring kdump on the Command Line
25.1.4. Testing the Configuration
25.2. Analyzing the Core Dump
25.2.1. Running the crash Utility
25.2.2. Displaying the Message Buffer
25.2.3. Displaying a Backtrace
25.2.4. Displaying a Process Status
25.2.5. Displaying Virtual Memory Information
25.2.6. Displaying Open Files
25.2.7. Exiting the Utility
25.3. Additional Resources
25.3.1. Installed Documentation
25.3.2. Useful Websites
A. Consistent Network Device Naming
A.1. Affected Systems
A.2. System Requirements
A.3. Enabling and Disabling the Feature
A.4. Notes for Administrators
B. RPM
B.1. RPM Design Goals
B.2. Using RPM
B.2.1. Finding RPM Packages
B.2.2. Installing and Upgrading
B.2.3. Configuration File Changes
B.2.4. Uninstalling
B.2.5. Freshening
B.2.6. Querying
B.2.7. Verifying
B.3. Checking a Package's Signature
B.3.1. Importing Keys
B.3.2. Verifying Signature of Packages
B.4. Practical and Common Examples of RPM Usage
B.5. Additional Resources
B.5.1. Installed Documentation
B.5.2. Useful Websites
B.5.3. Related Books
C. The X Window System
C.1. The X Server
C.2. Desktop Environments and Window Managers
C.2.1. Desktop Environments
C.2.2. Window Managers
C.3. X Server Configuration Files
C.3.1. The Structure of the Configuration
C.3.2. The xorg.conf.d Directory
C.3.3. The xorg.conf File
C.4. Fonts
C.4.1. Adding Fonts to Fontconfig
C.5. Runlevels and X
C.5.1. Runlevel 3
C.5.2. Runlevel 5
C.6. Additional Resources
C.6.1. Installed Documentation
C.6.2. Useful Websites
D. The sysconfig Directory
D.1. Files in the /etc/sysconfig/ Directory
D.1.1. /etc/sysconfig/arpwatch
D.1.2. /etc/sysconfig/authconfig
D.1.3. /etc/sysconfig/autofs
D.1.4. /etc/sysconfig/clock
D.1.5. /etc/sysconfig/dhcpd
D.1.6. /etc/sysconfig/firstboot
D.1.7. /etc/sysconfig/i18n
D.1.8. /etc/sysconfig/init
D.1.9. /etc/sysconfig/ip6tables-config
D.1.10. /etc/sysconfig/keyboard
D.1.11. /etc/sysconfig/ldap
D.1.12. /etc/sysconfig/named
D.1.13. /etc/sysconfig/network
D.1.14. /etc/sysconfig/ntpd
D.1.15. /etc/sysconfig/quagga
D.1.16. /etc/sysconfig/radvd
D.1.17. /etc/sysconfig/samba
D.1.18. /etc/sysconfig/selinux
D.1.19. /etc/sysconfig/sendmail
D.1.20. /etc/sysconfig/spamassassin
D.1.21. /etc/sysconfig/squid
D.1.22. /etc/sysconfig/system-config-users
D.1.23. /etc/sysconfig/vncservers
D.1.24. /etc/sysconfig/xinetd
D.2. Directories in the /etc/sysconfig/ Directory
D.3. Additional Resources
D.3.1. Installed Documentation
E. The proc File System
E.1. A Virtual File System
E.1.1. Viewing Virtual Files
E.1.2. Changing Virtual Files
E.2. Top-level Files within the proc File System
E.2.1. /proc/buddyinfo
E.2.2. /proc/cmdline
E.2.3. /proc/cpuinfo
E.2.4. /proc/crypto
E.2.5. /proc/devices
E.2.6. /proc/dma
E.2.7. /proc/execdomains
E.2.8. /proc/fb
E.2.9. /proc/filesystems
E.2.10. /proc/interrupts
E.2.11. /proc/iomem
E.2.12. /proc/ioports
E.2.13. /proc/kcore
E.2.14. /proc/kmsg
E.2.15. /proc/loadavg
E.2.16. /proc/locks
E.2.17. /proc/mdstat
E.2.18. /proc/meminfo
E.2.19. /proc/misc
E.2.20. /proc/modules
E.2.21. /proc/mounts
E.2.22. /proc/mtrr
E.2.23. /proc/partitions
E.2.24. /proc/slabinfo
E.2.25. /proc/stat
E.2.26. /proc/swaps
E.2.27. /proc/sysrq-trigger
E.2.28. /proc/uptime
E.2.29. /proc/version
E.3. Directories within /proc/
E.3.1. Process Directories
E.3.2. /proc/bus/
E.3.3. /proc/bus/pci
E.3.4. /proc/driver/
E.3.5. /proc/fs
E.3.6. /proc/irq/
E.3.7. /proc/net/
E.3.8. /proc/scsi/
E.3.9. /proc/sys/
E.3.10. /proc/sysvipc/
E.3.11. /proc/tty/
E.3.12. /proc/PID/
E.4. Using the sysctl Command
E.5. Additional Resources
E.5.1. Installed Documentation
E.5.2. Useful Websites
F. Revision History
Index