RHEL 5 EssentialsRed Hat Enterprise Linux 5Essentials                                      2
RHEL 5 EssentialsRed Hat Enterprise Linux 5 Essentials – First Edition© 2010 Payload Media. This eBook is provided for per...
RHEL 5 EssentialsTable of ContentsChapter 1.    About RHEL 5 Essentials .....................................................
RHEL 5 EssentialsChapter 7.        Configuring RHEL 5 GNOME Screen Resolution and Multiple Monitors ................ 49  7...
RHEL 5 Essentials  12.4 Changing the Appearance of a Desktop Panel ..........................................................
RHEL 5 Essentials  17.3 Disabling a Keyboard Shortcut .......................................................................
RHEL 5 Essentials  21.4 Firewall Configuration ..............................................................................
RHEL 5 Essentials  25.2 Installing Samba on an RHEL System ..................................................................
RHEL 5 Essentials  28.5 Building an RHEL Xen Guest System ...................................................................
RHEL 5 Essentials   32.5 Shutting Down a Guest System .......................................................................
RHEL 5 Essentials  36.1 Running virt-install to build the Xen or KVM Guest System ...........................................
RHEL 5 Essentials  40.1 What is Swap Space?..................................................................................
RHEL 5 EssentialsChapter 1.            About RHEL 5 EssentialsArguably one of the most highly regarded and widely used ent...
RHEL 5 EssentialsChapter 2.             Installing RHEL 5 on a Clean Disk DriveThe first step on the path to learning abou...
RHEL 5 Essentials2.2   Installing Red Hat Enterprise LinuxInsert either the RHEL DVD or disk 1 of the CDROM collection int...
RHEL 5 Essentials2.3       Partitioning a Disk for RHELWhen you reach the disk partitioning phase of the installation, the...
RHEL 5 Essentials          Use free space on selected drives and create default layout - If the current partitions       ...
RHEL 5 EssentialsOn the next screen, enter a password for the root account on the system. The root, or super-user account ...
RHEL 5 EssentialsTo view or modify the specific package selections, make sure that the Customize Now option isselected bef...
RHEL 5 Essentialsand password when prompted. If you would prefer to register the system at a later time, do sosimply by ru...
RHEL 5 EssentialsChapter 3.             Performing an RHEL 5 Network InstallationIn addition to installing directly from t...
RHEL 5 Essentialsfrom disk 1 of the six set CDROM installation suite. Alternatively, take the boot.iso file from theimages...
Rhel5 essentials preview
Upcoming SlideShare
Loading in …5
×

Rhel5 essentials preview

1,623 views
1,597 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,623
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
119
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Rhel5 essentials preview

  1. 1. RHEL 5 EssentialsRed Hat Enterprise Linux 5Essentials 2
  2. 2. RHEL 5 EssentialsRed Hat Enterprise Linux 5 Essentials – First Edition© 2010 Payload Media. This eBook is provided for personal use only. Unauthorized use,reproduction and/or distribution strictly prohibited. All rights reserved.The content of this book is provided for informational purposes only. Neither the publisher northe author offers any warranties or representation, express or implied, with regard to theaccuracy of information contained in this book, nor do they accept any liability for any loss ordamage arising from any errors or omissions.Find more eBooks online at http://www.eBookFrenzy.com. 3
  3. 3. RHEL 5 EssentialsTable of ContentsChapter 1. About RHEL 5 Essentials .......................................................................................... 14Chapter 2. Installing RHEL 5 on a Clean Disk Drive ................................................................... 15 2.1 Obtaining the Red Hat Enterprise Linux Installation Media .......................................... 15 2.2 Installing Red Hat Enterprise Linux ................................................................................ 16 2.3 Partitioning a Disk for RHEL............................................................................................ 17 2.4 Configuring Networking Settings ................................................................................... 18 2.5 Timezone and the Root Password.................................................................................. 18 2.6 Package Selection ........................................................................................................... 19 2.7 The Physical Installation ................................................................................................. 20 2.8 Final Configuration Steps ............................................................................................... 20Chapter 3. Performing an RHEL 5 Network Installation ........................................................... 22 3.1 RHEL Network Installation Requirements ...................................................................... 22 3.2 Obtaining a Network Boot Image................................................................................... 22 3.3 Configuring the Network Installation ............................................................................. 23 3.4 Starting the Red Hat Enterprise Linux 5 Network Installation ....................................... 25Chapter 4. Installing RHEL 5 with Windows in Dual Boot Environment ................................... 26 4.1 Partition Resizing ............................................................................................................ 26 4.2 Shrinking a Windows XP Partition .................................................................................. 28 4.3 Choosing an Operating System at Boot Time ................................................................ 35 4.4 Editing the RHEL Boot Menu .......................................................................................... 35 4.5 Accessing the Windows Partition from RHEL ................................................................. 38Chapter 5. Allocating a Windows Disk Partition to RHEL 5 ...................................................... 40 5.1 Deleting the Windows Partition from the Disk .............................................................. 40 5.2 Formatting the Unallocated Disk Partition .................................................................... 43 5.3 Editing the Boot Menu ................................................................................................... 44 5.4 Mounting the New Partition .......................................................................................... 44Chapter 6. Logging into the RHEL 5 GNOME Desktop .............................................................. 46 4
  4. 4. RHEL 5 EssentialsChapter 7. Configuring RHEL 5 GNOME Screen Resolution and Multiple Monitors ................ 49 7.1 Configuring the RHEL Display Resolution ....................................................................... 49 7.2 Configuring Multiple Monitors....................................................................................... 50Chapter 8. A Guided Tour of the RHEL 5 GNOME Desktop ...................................................... 52 8.1 The RHEL 5 GNOME Desktop ......................................................................................... 52 8.2 The Desktop Background ............................................................................................... 53 8.3 The Desktop Panels ........................................................................................................ 54Chapter 9. Configuring the RHEL 5 GNOME Desktop Background ........................................... 56 9.1 Changing the RHEL 5 GNOME Desktop Background ...................................................... 56 9.2 Selecting a Background from the Wallpaper List ........................................................... 57 9.3 Creating a Solid or Graded Background ......................................................................... 57 9.4 Specifying a Background Image ..................................................................................... 58Chapter 10. Installing and Customizing RHEL 5 Desktop Themes .............................................. 59 10.1 What is a Desktop Theme? ............................................................................................ 59 10.2 Changing the RHEL 5 Desktop Theme ............................................................................ 59 10.3 Downloading and Installing a Theme ............................................................................. 60 10.4 Creating a Custom RHEL Theme Package ...................................................................... 61 10.5 Summary ........................................................................................................................ 62Chapter 11. Configuring RHEL 5 Desktop Fonts ......................................................................... 63 11.1 Font Options on RHEL .................................................................................................... 63 11.2 Changing Font Settings ................................................................................................... 63 11.3 Font Rendering Settings ................................................................................................. 65 11.4 RHEL Advanced Font Rendering ..................................................................................... 65 11.5 Accessing the System Font Folder.................................................................................. 67Chapter 12. Configuring the RHEL 5 GNOME Desktop Panels ................................................... 68 12.1 What are Desktop Panels ............................................................................................... 68 12.2 Changing the Position of a Panel ................................................................................... 68 12.3 Adding and Deleting Desktop Panels ............................................................................. 69 5
  5. 5. RHEL 5 Essentials 12.4 Changing the Appearance of a Desktop Panel ............................................................... 69 12.5 Adding Items to a RHEL 5 GNOME Desktop Panel ......................................................... 70 12.6 Adding Menus to a Panel ............................................................................................... 73 12.7 Changing the Number of RHEL Desktop Workspaces .................................................... 74Chapter 13. Configuring the RHEL 5 Desktop Menu System ...................................................... 75 13.1 Customizing an RHEL Desktop Menu ............................................................................. 75 13.2 Moving Menu Items ....................................................................................................... 76 13.3 Adding and Deleting a Menu Item ................................................................................. 76Chapter 14. Browsing My Computer, Files and Folders on the RHEL 5 Desktop ....................... 77 14.1 Accessing Nautilus .......................................................................................................... 77 14.2 Nautilus and the Computer Icon .................................................................................... 77 14.3 Adding Emblems to Files and Folders ............................................................................ 78 14.4 Changing File and Folder Permissions ............................................................................ 81 14.5 Renaming and Deleting Files and Folders ...................................................................... 83Chapter 15. Configuring the RHEL 5 File Manager ..................................................................... 84 15.1 Displaying Icons or Lists ................................................................................................. 84 15.2 Configuring the List View ............................................................................................... 85 15.3 Configuring the Icon View .............................................................................................. 86Chapter 16. RHEL 5 Desktop Startup Programs and Session Configuration .............................. 90 16.1 Session Managed and Non-Session Managed Programs ............................................... 90 16.2 Understanding Sessions ................................................................................................. 90 16.3 Creating a New Session .................................................................................................. 90 16.4 Configuring Session Preferences .................................................................................... 91 16.5 Configuring the Current Session .................................................................................... 92 16.6 Configuring Startup Programs ........................................................................................ 93Chapter 17. RHEL 5 Desktop Keyboard Shortcuts ...................................................................... 94 17.1 Viewing Keyboard Shortcuts .......................................................................................... 94 17.2 Changing a Shortcut ....................................................................................................... 95 6
  6. 6. RHEL 5 Essentials 17.3 Disabling a Keyboard Shortcut ....................................................................................... 95Chapter 18. Configuring RHEL 5 Runlevels and Services ............................................................ 96 18.1 Understanding RHEL Runlevels ...................................................................................... 96 18.2 Understanding RHEL Services ........................................................................................ 96 18.3 RHEL Runlevels Descriptions .......................................................................................... 96 18.4 Configuring the Default RHEL Runlevel .......................................................................... 97 18.5 Changing the Current Runlevel from within a Running RHEL System ........................... 98 18.6 Identifying Services that Start at Each Runlevel ............................................................ 98 18.7 Changing the Services for a Runlevel ............................................................................. 99Chapter 19. Managing RHEL 5 Users and Groups..................................................................... 100 19.1 Adding a New User to am RHEL System ....................................................................... 100 19.2 Editing the Properties of a User ................................................................................... 102 19.3 Deleting a User from an RHEL System ......................................................................... 102 19.4 Adding a New Group to an RHEL System ..................................................................... 102 19.5 Modifying an RHEL Group ............................................................................................ 104 19.6 Deleting a Group from an RHEL System ....................................................................... 105Chapter 20. Basic RHEL 5 Firewall Configuration ..................................................................... 106 20.1 Configuring a Basic RHEL 5 Firewall ............................................................................. 106 20.2 Enabling and Disabling the Firewall ............................................................................. 107 20.3 Configuring Firewall Port Settings ................................................................................ 107 20.4 Configuring Other Ports ............................................................................................... 108 20.5 Firewall Configuration from a Terminal using lokkit .................................................... 109 20.1 Trusted Interfaces ........................................................................................................ 111 20.2 Masquerading .............................................................................................................. 111Chapter 21. Remote Access to the RHEL 5 Desktop ................................................................. 112 21.1 Installing Remote Desktop Support ............................................................................. 112 21.2 Activating Remote Desktop Access .............................................................................. 113 21.3 Secure and Insecure Remote Desktop Access ............................................................. 114 7
  7. 7. RHEL 5 Essentials 21.4 Firewall Configuration .................................................................................................. 114 21.5 Accessing a Remote RHEL Desktop using vncviewer ................................................... 114 21.6 Accessing a Remote RHEL Desktop from a Windows System ...................................... 116 21.7 Establishing a Secure Remote Desktop Session ........................................................... 116 21.8 Establishing a Secure Remote Desktop Session from a Windows System .................. 117 21.9 Creating Additional Desktops ....................................................................................... 119 21.10 Shutting Down a Desktop Session ............................................................................ 120 21.11 Configuring the Remote Desktop Environment ....................................................... 120Chapter 22. Configuring RHEL 5 Remote Access using SSH ...................................................... 123 22.1 Installing SSH on an RHEL System ................................................................................ 123 22.2 Configuring the RHEL Firewall to Allow SSH Connections ........................................... 124 22.3 Using SSH on RHEL ....................................................................................................... 124 22.4 Copying files using SSH ................................................................................................. 125 22.5 Disabling the SSH Server .............................................................................................. 126Chapter 23. Displaying RHEL 5 Applications Remotely (X11 Forwarding) ................................ 128 23.1 Requirements for Remotely Displaying RHEL Applications ......................................... 128 23.2 Remotely Displaying an RHEL Application ................................................................... 128 23.3 Trusted X11 Forwarding ............................................................................................... 129 23.4 Compressed X11 Forwarding ....................................................................................... 129Chapter 24. Using NFS to Share RHEL 5 Folders with Remote Linux and UNIX Systems ......... 130 24.1 Ensuring NFS Services are Running on RHEL 5 ............................................................. 130 24.2 Configuring the RHEL Firewall to Allow NFS Traffic ..................................................... 132 24.3 Specifying the Folders to be Shared ............................................................................. 132 24.4 Accessing Shared RHEL Folders .................................................................................... 134 24.5 Mounting an NFS Filesystem on RHEL System Startup ................................................ 135 24.6 Unmounting an NFS Mount Point ................................................................................ 135Chapter 25. Sharing Files Between RHEL 5 and Windows Systems with Samba ..................... 136 25.1 Samba and Samba Client .............................................................................................. 136 8
  8. 8. RHEL 5 Essentials 25.2 Installing Samba on an RHEL System ........................................................................... 136 25.3 Starting the Samba Service on RHEL ............................................................................ 137 25.4 Configuring the RHEL Firewall to Enable Samba .......................................................... 138 25.5 Configuring Samba Users and Resource Sharing ......................................................... 138 25.6 Accessing Windows Shares from RHEL ........................................................................ 141Chapter 26. Configuring an RHEL 5 Based Web Server ............................................................ 144 26.1 Requirements for Configuring an RHEL 5 Web Server ................................................. 144 26.2 Installing the Apache Web Server on RHEL .................................................................. 144 26.3 Starting the Apache Web Server .................................................................................. 145 26.4 Testing the Web Server ................................................................................................ 146 26.5 Configuring the Apache Web Server for Your Domain ................................................ 147 26.6 Web Server and Firewall Issues ................................................................................... 148Chapter 27. Configuring an RHEL 5 Postfix Email Server .......................................................... 149 27.1 The structure of the Email System ............................................................................... 149 27.1.1 Mail User Agent .................................................................................................... 149 27.1.2 Mail Transfer Agent .............................................................................................. 149 27.1.3 Mail Delivery Agent............................................................................................... 150 27.1.4 SMTP ..................................................................................................................... 150 27.2 Configuring an RHEL Email System .............................................................................. 150 27.3 Postfix Pre-Installation Steps ....................................................................................... 150 27.4 Installing Postfix on RHEL ............................................................................................. 152 27.5 Configuring Postfix ....................................................................................................... 152 27.6 Starting Postfix on an RHEL System ............................................................................. 153Chapter 28. Installing and Configuring RHEL 5 Xen Virtualization ........................................... 154 28.1 Full Virtualization vs. Para-Virtualization ..................................................................... 154 28.2 Checking Xen Hardware Compatibility......................................................................... 155 28.3 Adding the Red Hat Enterprise Linux 5 Virtualization Channel to the System ............ 156 28.4 Preparing RHEL for Xen Virtualization.......................................................................... 158 9
  9. 9. RHEL 5 Essentials 28.5 Building an RHEL Xen Guest System ............................................................................ 160 28.6 Summary ...................................................................................................................... 165Chapter 29. Using Xen Full Virtualization to Run Windows on RHEL 5 .................................... 166 29.1 Hardware Requirements for Xen-based Full Virtualization on RHEL ........................... 166 29.2 Preparing the Installation Image .................................................................................. 166 29.3 Creating the New Virtual Machine ............................................................................... 167 29.4 Configuring Xen Virtualization Method ....................................................................... 167 29.5 Selecting Installation Media ......................................................................................... 168 29.6 Configuring Storage ...................................................................................................... 169 29.7 Configuring Network Access ........................................................................................ 169 29.8 CPU and Memory Allocation ........................................................................................ 170 29.9 Creating and Starting the New Xen Virtual Machine ................................................... 171Chapter 30. Managing and Monitoring RHEL 5 based Xen Guest Systems .............................. 173 30.1 Starting and Stopping Xen Guest Systems ................................................................... 173 30.2 Pausing an RHEL 5 Xen Guest Operating System ......................................................... 174 30.3 Changing Xen Guest Operating System Settings.......................................................... 174 30.4 Monitoring Virtual Machine Performance ................................................................... 176Chapter 31. Configuring a New RHEL 5 Xen Virtual Network ................................................... 179 31.1 RHEL Xen Guest Networking Options .......................................................................... 179 31.2 Identifying the Settings of an Existing RHEL Xen Virtual Network ............................... 179 31.3 Creating a New Xen Virtual Network on an RHEL Host................................................ 180 31.4 Assigning the New Virtual Bridge during Virtual Machine Creation ............................ 183 31.5 Changing an Existing Virtual Machine to Use a new Virtual Network ......................... 184Chapter 32. Managing Xen on RHEL 5 using the xm and virsh Command-line Tools .............. 187 32.1 xm Command-line vs virsh Shell .................................................................................. 187 32.2 Listing Guest System Status ......................................................................................... 191 32.3 Starting a Xen Guest System ........................................................................................ 192 32.4 Connecting to a Running Xen Guest System ................................................................ 192 10
  10. 10. RHEL 5 Essentials 32.5 Shutting Down a Guest System .................................................................................... 193 32.6 Pausing and Resuming a Guest System........................................................................ 193 32.7 Suspending and Resuming an RHEL Guest OS ............................................................. 194 32.8 Saving and Restoring Xen Guest Systems .................................................................... 194 32.9 Rebooting a Guest System ........................................................................................... 195 32.10 Configuring the Memory Assigned to a Xen Guest OS ............................................. 195 32.11 Migrating a Domain to a Different Host ................................................................... 195Chapter 33. Installing KVM Virtualization on RHEL 5 ............................................................... 197 33.1 KVM Hardware Requirements ..................................................................................... 197 33.2 32-bit Support for KVM on RHEL 5 ............................................................................... 198 33.3 Adding the Red Hat Enterprise Linux 5 Virtualization Channel to the System ............ 198 33.4 Preparing RHEL for KVM Virtualization ........................................................................ 200 33.5 Verifying the KVM Installation ..................................................................................... 201Chapter 34. Creating an RHEL 5 KVM Networked Bridge Interface ......................................... 204 34.1 RHEL 5 Virtual Networks and Network Bridges ........................................................... 204 34.2 Creating a Network Bridge ........................................................................................... 204 34.3 Configuring an RHEL 5 Firewall for a Network Bridge.................................................. 208 34.4 Configuring a Virtual Machine to use the Network Bridge .......................................... 208Chapter 35. Creating an RHEL 5 KVM Virtual Machine ............................................................ 210 35.1 Starting the Virtual Machine Manager ........................................................................ 210 35.2 Creating the New RHEL 5 based KVM Virtual Machine ............................................... 211 35.3 Configuring the Installation Method ............................................................................ 212 35.4 Configuring the KVM Virtual Storage ........................................................................... 213 35.5 Configuring KVM Network Settings.............................................................................. 213 35.6 Configuring KVM Virtual Machine Memory and CPU Settings .................................... 214 35.7 Starting the New KVM Virtual Machine ....................................................................... 215Chapter 36. Creating Xen and KVM RHEL 5 Virtual Machines from the Command-line (virt-install and virsh) .......................................................................................................................... 218 11
  11. 11. RHEL 5 Essentials 36.1 Running virt-install to build the Xen or KVM Guest System ........................................ 218 36.2 An Example RHEL 5 virt-install Command .................................................................... 224 36.3 Starting and Stopping a Virtual Machine from the Command Line ............................. 226 36.4 Creating a Virtual Machine from a Configuration File ................................................. 227Chapter 37. Managing and Monitoring RHEL 5 based KVM Guest Systems ............................ 230 37.1 Starting and Stopping RHEL based KVM Guest Systems .............................................. 230 37.2 Pausing a KVM Guest Operating System...................................................................... 231 37.3 Changing KVM Virtual Guest System Settings ............................................................. 231 37.4 Monitoring Virtual Machine Performance ................................................................... 233 37.5 Monitoring Host Performance ..................................................................................... 235Chapter 38. Adding a New Disk Drive to an RHEL 5 System ..................................................... 236 38.1 Mounted File Systems or Logical Volumes .................................................................. 236 38.2 Getting Started ............................................................................................................. 236 38.3 Finding the New Hard Drive in RHEL 5 ......................................................................... 236 38.4 Creating Linux Partitions .............................................................................................. 237 38.5 Creating a File System on an RHEL Disk Partition ........................................................ 239 38.6 Mounting a File System ................................................................................................ 240 38.7 Configuring RHEL 5 to Automatically Mount a File System ......................................... 241Chapter 39. Adding a New Disk to an RHEL 5 Volume Group and Logical Volume .................. 242 39.1 An Overview of Logical Volume Management (LVM) .................................................. 242 Volume Group (VG) ............................................................................................................. 242 39.1.1 Physical Volume (PV) ............................................................................................ 243 39.1.2 Logical Volume (LV)............................................................................................... 243 39.1.3 Physical Extent (PE) ............................................................................................... 243 39.1.4 Logical Extent (LE) ................................................................................................. 243 39.2 Getting Information about Logical Volumes ................................................................ 243 39.3 Adding Additional Space to an RHEL Volume Group from the Command Line ........... 247Chapter 40. Adding and Managing RHEL 5 Swap Space ........................................................... 250 12
  12. 12. RHEL 5 Essentials 40.1 What is Swap Space?.................................................................................................... 250 40.2 Recommended Swap Space for RHEL 5 ....................................................................... 250 40.3 Identifying Current Swap Space Usage ........................................................................ 250 40.4 Adding a Swap File to an RHEL System ........................................................................ 251 40.5 Adding Swap to an RHEL LVM Swap Volume ............................................................... 252 40.6 Adding Swap Space to the Volume Group ................................................................... 253Chapter 41. Related eBook Publications .................................................................................. 255 13
  13. 13. RHEL 5 EssentialsChapter 1. About RHEL 5 EssentialsArguably one of the most highly regarded and widely used enterprise Linux distributionsavailable today is Red Hat Enterprise Linux (RHEL). It is considered to be amongst the moststable and reliable operating systems and is backed by the considerable resources and technicalskills of Red Hat, Inc.RHEL 5 Essentials is designed to provide detailed information on the use and administration ofthe Red Hat Enterprise Linux 5 distribution. For beginners, the book covers the basics ofconfiguring the desktop environment, resolving screen resolution issues and configuring emailand web servers. Installation topics such as network installation and dual booting withMicrosoft Windows are covered together with all important security topics such as configuringa firewall and user and group administration.For the experienced user, topics such as remote access, logical volume management (LVM), diskpartitioning, swap management, Xen and KVM virtualization, Secure Shell (SSH) and file sharingusing both Samba and NFS are covered in detail to provide a thorough overview of thisenterprise class operating system. 14
  14. 14. RHEL 5 EssentialsChapter 2. Installing RHEL 5 on a Clean Disk DriveThe first step on the path to learning about Red Hat Enterprise Linux involves installing theoperating system. RHEL can be installed either in a clean disk environment (where an entiredisk is cleared of any existing partitions and dedicated entirely to RHEL) or in a dual bootenvironment where RHEL co-exists with another operating system on the disk (typically amember of the Microsoft Windows family of operating systems).In this chapter we will be covering the clean disk approach to installation. Dual boot installationwill be covered in Installing RHEL 5 with Windows in Dual Boot Environment.2.1 Obtaining the Red Hat Enterprise Linux Installation MediaAlthough RHEL is an open source operating system, and as such, the source code is freelydownloadable, the binary installation images are only available as part of a paid Red HatEnterprise Linux subscription. In addition to access to the installation images for RHEL, thissubscription also provides technical support for the operating system. If you already have a paidsubscription, log into your Red Hat account to download the operating system. If you would liketo try out RHEL before purchasing, Red Hat provides a 30-day trial. To register for a trial, visitthe Red Hat website at http://www.redhat.com/rhel/details/eval/ and complete theregistration process.The installation distribution can be downloaded as either six individual CDROM images or asingle DVD image. Unless you specifically need to use CD images the DVD installation image isstrongly recommended. The DVD image is named using the following convention:rhel-<variant>-<version>-<architecture>-bin-DVD.isoFor example, the RHEL 5.5 server DVD image for 64-bit systems is named as follows:rhel-server-5.5-x86_64-dvd.isoThe CDROM images, on the other hand, are named as follows:rhel—<variant>-<version>-<architecture>-bin-discn.isoHaving downloaded either DVD or CDROM images, either burn them to disk, configure yourvirtualization environment to treat them as DVD or CDROM drives or use the steps outlined inPerforming an RHEL 5 Network Installation to access the installation image over a network. 15
  15. 15. RHEL 5 Essentials2.2 Installing Red Hat Enterprise LinuxInsert either the RHEL DVD or disk 1 of the CDROM collection into the appropriate drive andpower on the system. If the system tries to boot from the hard disk drive you will need to enterthe BIOS set up for your computer and change the boot order so that it boots from the CD orDVD drive first. Once the system has booted you will be presented with the following screen:Installation may be performed using either the graphical or text mode installers. To install usingthe graphical installer, simply press the <Enter> key. To use the text installer type linux textfollowed by the <Enter> key.The RHEL installer will then provide the option to test the installation media for errors. Use thearrow keys to navigate between the options and make a selection with the <Enter> key. After ashort delay the first screen of the graphical installer will appear. Click on the Release Notesbutton if you would like to learn about any key features or problems that exist in this release ofRHEL. Navigate through the next few pages to configure your preferred language and keyboardtype until you reach the partitioning screen. During these steps you may be prompted to enteran Installation Number. If you have a subscription that includes additional packages, enter thatnumber here so that those packages may be accessed during the installation process. 16
  16. 16. RHEL 5 Essentials2.3 Partitioning a Disk for RHELWhen you reach the disk partitioning phase of the installation, the installer will present ascreen similar to the one illustrated in the following figure:The drop down menu provides a number of options in terms of how the disk will be used toaccommodate the RHEL installation:  Remove all partitions on selected drives and create default layout - The entire disk drive will be assigned to the RHEL installation. Any pre-existing partitions, together with any existing operating systems and associated data files contained therein will be deleted to make room for RHEL. This option should only be used if you are absolutely sure you no longer need anything that is currently stored on that disk, or have already backed up all user files.  Remove Linux partitions on selected drives and create default layout - If the drive was previously configured to support a Windows/Linux dual boot environment or was devoted entirely to another Linux installation, this option may be selected to instruct the installer to delete the pre-existing Linux partition and replace it with RHEL, leaving the non-Linux partitions intact. Once again, it is important to backup any user data that may still be needed. 17
  17. 17. RHEL 5 Essentials  Use free space on selected drives and create default layout - If the current partitions on the drive do not take up the entire disk space available, any unallocated space may be assigned to the RHEL installation using this option.  Create custom layout - When selected, this option displays the disk partitioning tool allowing each partition on the disk to be manually configured.For the purposes of this chapter we are assuming the entire disk is available to accommodatethe RHEL installation so select the Remove all partitions on selected drives and create defaultlayout menu option.Beneath the partition menu is the option to encrypt the system. The choice of whether to useencryption will depend on the purpose for which the system is being used, its physical locationand type of data it is going to store. Keep in mind that as with any form of encryption there areperformance overheads associated with selecting this option.Having made the partitioning selection, choose which disk drives detected on your system areto be used for the installation and click Next to begin the partitioning process.2.4 Configuring Networking SettingsAfter the disk partitioning and encryption decisions have been made the installer will promptfor some networking configuration information. If your system resides on a network served by aDHCP server (a server or device that automatically assigns network IP addresses to computerson the network) you should leave the default settings unchanged in the Network Devicessection of the screen. If you need to manually specify an IP address, select the network devicefrom the list and click on the Edit button to display the Edit Interface dialog and enter your IPaddress and netmask information, then close the dialog and enter the gateway and DNSsettings for your network into the Miscellaneous settings section of the main screen.If you manually specified your IP address, or have a DHCP server that does not automaticallyprovide clients with host names, select the option to manually specify the host name and enterit into the text box and click Next to proceed.2.5 Timezone and the Root PasswordOn the Timezone screen, make a selection corresponding to your geographical location. Theoption is also provided to use UTC which automatically adjusts the time to account for daylightsavings time. If the computer on which RHEL is being installed also runs another operatingsystem which already uses UTC (such as Windows), leave this option unselected. 18
  18. 18. RHEL 5 EssentialsOn the next screen, enter a password for the root account on the system. The root, or super-user account is a special user that has administrative privileges on the system. Whilst you willgenerally use your own account to log into the system, you will need to gain root privileges inorder to configure the system and to perform other administrative tasks.2.6 Package SelectionLinux is a modular operating system in that it provides a basic operating system kernel andinfrastructure upon which a range of different packages may be installed depending on yourspecific requirements for the system. If, for example, you plan on using the system as a webserver you would need to install the Apache web server package.At this point in the installation the installer needs us to decide which packages should beinstalled along with the base operating system and displays the screen shown in the followingfigure:The exact options displayed will depend in part on the specific RHEL installation image that wasdownloaded from the Red Hat web site.This screen allows you to make general choices about the type of functions you need thesystem to perform. 19
  19. 19. RHEL 5 EssentialsTo view or modify the specific package selections, make sure that the Customize Now option isselected before proceeding. You will then be provided a complete overview of which packagesare selected for installation and which are not together with the ability to make changes tothese selections. Don’t worry too much about getting this exactly right at this stage. Packagescan be added and removed at any time after the installation is complete by selecting thedesktop Applications -> Add/Remove Software menu option.2.7 The Physical InstallationHaving made the appropriate package selections, clicking Next will display a screen indicatingthat the installation will begin and that a log file and kickstart file can be found on the systemafter installation is complete. The log file will be useful to identify any errors that occurredduring the installation, and the kickstart file can be used to install RHEL on other systems usingthe exact same configuration created here.During the installation process, the installer will format and partition the disk drive, provide arunning commentary of the selected packages as they are installed and a progress bar. If youare installing from the 6 RHEL CDROM images as opposed to the single DVD you will need toinsert the additional CDs when prompted to do so. If you are using the DVD the installation willcomplete without further interaction. Once the installation process is complete a screen willappear containing a button to reboot the system. Remove the installation media and click thebutton.2.8 Final Configuration StepsAfter the system has started for the first time, the RHEL Setup Agent will appear with awelcome message. Click on the Forward button to display licensing information followed by theFirewall settings. By default all ports are closed on the firewall with the exception of the sshport which allows you to remotely log into the system. The topic of firewall configuration willbe covered in more detail in the chapter entitled Basic RHEL Firewall Configuration so for nowleave the default settings unchanged. Leave SELinux configured as Enforcing to ensure the mostsecure environment. Choose whether or not to enable Kdump support and then work throughthe remaining screens to create a user account for yourself and verify the date and time. If youwould like the date and time of your RHEL system to be synchronized with an external NetworkTime Protocol server, select the Synchronize date and time over network option beforeproceeding.On the Setup Software Updates screen, register the system with the Red Hat Network (RHN).This enables additional packages to be installed from the RHN repositories and also allows thesystem to receive software updates. In order to register the system, enter your RHN user login 20
  20. 20. RHEL 5 Essentialsand password when prompted. If you would prefer to register the system at a later time, do sosimply by running the rhn_register command from a terminal window.Having worked through all the set up pages, click Finish to exit the setup agent and log in usingyour newly created account credentials. 21
  21. 21. RHEL 5 EssentialsChapter 3. Performing an RHEL 5 Network InstallationIn addition to installing directly from the physical Red Hat Enterprise Linux 5 installation media(in the form of a CDROM or DVD) it is also possible to perform a network based RHELinstallation whereby the installation image is installed on a remote server and downloaded inpackages to the destination computer system during installation. RHEL currently supportsinstallation via HTTP, FTP and NFS. For the purposes of this tutorial we will focus on the use ofHTTP (in other words the installation image is available via a web server on a remote host)though the concepts are largely the same for the other network installation options.3.1 RHEL Network Installation RequirementsBefore a network installation of RHEL can be performed a number of items are required. Firstly,the RHEL installation image must be loaded onto the remote server and mounted. If theinstallation media is in the form a CDROM or DVD then the image can be read from that mediainto a disk based ISO image file using the dd command as follows:dd if=/dev/media of=/path/to/iso/file/rhel5-image.isoNote that in the above example, /dev/media would be replaced by the path to the CDROMdevice and /path/to/iso/file/ represents the path to a suitable location on the file system tocreate the image file. Also keep in mind that the installation media may comprise multiple diskimages, each of which will need to be imported into the server.Having created the ISO image file from the installation media, it now needs to be mounted in alocation that is accessible to the web server, ftp server or NFS mount point so that it isaccessible to the target system. This is achieved using the mount loopback interface:mount -o loop rhel5_image.iso /path/to/mount/pointIn this case, /path/to/mount/point is replaced by the full path to the location where the RHELinstallation image is to be mounted such that it can be accessed via the chosen networkinstallation method. For example, in the case of an HTTP based installation, the chosen mountpoint might be /var/www/html/rhel5. Note that the specified mount point directory mustalready exist before executing this command.3.2 Obtaining a Network Boot ImageOnce the remote server is configured with a copy of the RHEL 5 installation image, the next stepis to plan how the installation process will be initiated on the target system. Clearly we will stillneed to be able to boot from something locally to start the installation. One option is to boot 22
  22. 22. RHEL 5 Essentialsfrom disk 1 of the six set CDROM installation suite. Alternatively, take the boot.iso file from theimages subdirectory of either the disk 1 CDROM or the installation DVD and burn it to a CDROMor DVD and then boot from that.3.3 Configuring the Network InstallationWhen the installer has booted enter the following command at the boot: prompt and press theenter key:linux askmethodA sequence of screens will subsequently appear providing the opportunity to select a languageand keyboard type. Once these settings have been defined, a screen will appear requesting thelocation of the installation media:Depending on the method by which the installation images are being served by the remotesystem select either NFS image, FTP or HTTP. For the purposes of this tutorial we will assumethe use of HTTP.Once the installation method has been selected, click OK to proceed to the TCP/IP configurationscreen. If the computer has multiple network adaptors, select the one to be used during theinstallation. On the next screen, configure the required IPv4 and IPv6 settings for the networkto which the computer is attached: 23

×