Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators
Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators
Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators
Ebook1,285 pages11 hours

Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators

Rating: 0 out of 5 stars

()

Read preview

About this ebook

The definitive guide to administering a Red Hat Enterprise Linux 6 network

Linux professionals who need a go-to guide on version 6 of Red Hat Enterprise Linux (RHEL) will find what they need in this comprehensive Sybex book. It covers RHEL administration in detail, including how to set up and manage web and mail services, use RHEL in enterprise environments, secure it, optimize storage, configure for virtualization and high availability, and much more. It also provides a great study aid for those preparing for either the RHCSA or RHCE certification exam.

  • Red Hat is the Linux market leader, and Red Hat administrators are in demand
  • This Sybex guide is a comprehensive resource on Red Hat Enterprise Linux administration and useful for those preparing for one of the Red Hat certification exams
  • Covers setting up and managing web and mail services, using RHEL in enterprise environments, securing RHEL, and optimizing storage to fit your environment
  • Explores advanced RHEL configurations, including virtualization and high availability

Red Hat Enterprise Linux 6 Administration is the guide Linux professionals and Red Hat administrators need to stay current on the newest version.

LanguageEnglish
PublisherWiley
Release dateJan 23, 2013
ISBN9781118421437
Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators

Read more from Sander Van Vugt

Related to Red Hat Enterprise Linux 6 Administration

Related ebooks

Operating Systems For You

View More

Related articles

Reviews for Red Hat Enterprise Linux 6 Administration

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Red Hat Enterprise Linux 6 Administration - Sander van Vugt

    Red Hat® Enterprise Linux® 6 Administration

    Real World Skills for Red Hat Administrators

    Title Page

    Sander van Vugt

    Title Page

    Senior Acquisitions Editor: Jeff Kellum

    Development Editor: Gary Schwartz

    Technical Editors: Floris Meester, Erno de Korte

    Production Editor: Rebecca Anderson

    Copy Editor: Kim Wimpsett

    Editorial Manager: Pete Gaughan

    Production Manager: Tim Tate

    Vice President and Executive Group Publisher: Richard Swadley

    Vice President and Publisher: Neil Edde

    Book Designer: Judy Fung and Bill Gibson

    Proofreaders: Louise Watson and Jennifer Bennett, Word One New York

    Indexer: J & J Indexing

    Project Coordinator, Cover: Katherine Crocker

    Cover Designer: Ryan Sneed

    Cover Image: © Jacob Wackerhausen / iStockPhoto

    Copyright © 2013 by John Wiley & Sons, Inc., Indianapolis, Indiana

    Published simultaneously in Canada

    ISBN: 978-1-118-30129-6

    ISBN: 978-1-118-62045-8 (ebk.)

    ISBN: 978-1-118-42143-7 (ebk.)

    ISBN: 978-1-118-57091-3 (ebk.)

    No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

    Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.

    For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.

    Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.

    Library of Congress Control Number: 9781118301296

    TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Red Hat is a registered trademark of Red Hat, Inc. Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

    Dear Reader,

    Thank you for choosing Red Hat Enterprise Linux 6 Administration: Real World Skills for Red Hat Administrators. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.

    Sybex was founded in 1976. More than 30 years later, we're still committed to producing consistently exceptional books. With each of our titles, we're working hard to set a new standard for the industry. From the paper we print on to the authors we work with, our goal is to bring you the best books available.

    I hope you see all that reflected in these pages. I'd be very interested to hear your comments and get your feedback on how we're doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at [email protected]. If you think you've found a technical error in this book, please visit http://sybex.custhelp.com. Customer feedback is critical to our efforts at Sybex.

    sign

    To Florence, my loving wife of 20 years who supports me and believes in everything I do. Chérie, I'm looking forward to spending the next 60 years of our lives together.

    About the Author

    Sander van Vugt is an author of more than 50 technical books. Most of these books are in his native language of Dutch. Sander is also a technical instructor who works directly for major Linux vendors, such as Red Hat and SUSE. He specializes in high availability and performance issues in Linux. He has also built up a lot of experience in securing servers with SELinux, especially on platforms that don't support it natively. Sander has applied his skills in helping many companies all over the world who are using Linux. His work has taken him to amazing places like Greenland, Utah, Malaysia, and more.

    When not working, Sander likes to spend time with his two sons, Franck and Alex, and his beautiful wife, Florence. He also likes outdoor sports, in particular running, hiking, kayaking, and ice-skating. During these long hours of participating in sports, he thinks through the ideas for his next book and the projects on which he is currently working, which makes the actual writing process a lot easier and the project go more smoothly.

    Acknowledgments

    Books of this size and depth succeed because of all the hard work put in by a team of professionals. I'm grateful for all the hard work put in by several people at Sybex on this project. Gary Schwartz was a great developmental editor. He helped keep things on track and provided excellent editorial guidance. The technical editors, Floris Meester and Erno de Korte, provided insightful input throughout the book. I appreciated the meticulous attention to detail provided by Rebecca Anderson, the production editor for this book. Last, but certainly not least, I want to thank Jeff Kellum, the acquisitions editor, for having the faith in me to write this book for Sybex.

    Table of Exercises

    Introduction

    Red Hat is the number-one Linux vendor on the planet. Even though official figures have never been released, as the first open source, one-billion dollar company, Red Hat is quite successful in enterprise Linux. More and more companies are installing Red Hat servers every day, and with that, there's an increasing need for Red Hat skills. That is why I wrote this book.

    This book is a complete guide that contains real-world examples of how Red Hat Enterprise Linux should be administered. It targets a broad audience of both beginning and advanced Red Hat Enterprise Linux administrators who need a reference guide to learn how to perform complicated tasks.

    This book was also written as a study guide, which is why there are many exercises included in the book. Within each chapter, you'll find step-by-step exercises that lead you through specific procedures. Also, in Appendix A at the end of the book, you'll find lab exercises that help you wrap up everything you've learned in the chapter.

    Red Hat offers two certifications that are relevant for system administrators: Red Hat Certified System Administrator (RHCSA) and Red Hat Certified Engineer (RHCE). This book does not prepare for either the Red Hat RHCSA or RHCE exams, but it does cover most of the objectives of both exams. For those interested in taking RHCSA and RHCE exams, it is recommended that you also attend a Red Hat training course, where the learner risks meeting the author of this book who has been a Red Hat Certified Instructor for many years now.

    Who Should Read This Book?

    This book was written for Red Hat administrators. The book is for beginning administrators as well as those who already have a couple of years of experience working with Red Hat systems. For the advanced administrators, it is written as a reference guide that helps them set up services such as web servers, DNS and DHCP, clustering, and more. It also contains advanced information, such as a long chapter on performance optimization.

    What You Need

    To work with this book, you need a dedicated computer on which you can install Red Hat Enterprise Linux. If this is not feasible, a virtual machine can be used as an alternative, however this is absolutely not recommended, as you won't be able to do all the exercises on virtualization. To install Red Hat Enterprise Linux and use it as a host for KVM virtualization, make sure that your computer meets the following minimum criteria:

    64-bit CPU with support for virtualization.

    At least 2GB of RAM is recommended. (It will probably work with 1GB, but this is not recommended.)

    A DVD drive.

    A hard disk that is completely available and at least 40GB in size.

    A network card and connection to a network switch.

    What Is Covered in This Book?

    Red Hat Linux Enterprise 6 Administration is organized to provide the knowledge that you'll need to administer Red Hat Enterprise Linux 6. It includes the following chapters:

    Part I: Getting Familiar with Red Hat Enterprise Linux

    Chapter 1, Getting Started with Red Hat Enterprise Linux  This chapter introduces Red Hat Enterprise Linux and explains its particulars. You'll also learn about the value added by this commercial Linux distribution as compared to free Linux distributions. In the second part of this chapter, you'll learn how to install Red Hat Enterprise Linux. You'll also get a quick introduction to the workings of the graphical user interface.

    Chapter 2, Finding Your Way on the Command Line  This chapter introduces you to working on the command line, the most important interface you'll use to manage your Red Hat Enterprise Linux server.

    Part II: Administering Red Hat Enterprise Linux

    Chapter 3, Performing Daily System Administration Tasks  In this chapter, you'll learn about some common system administration tasks. This includes mounting and unmounting file systems, setting up and managing a printing environment, and scheduling jobs with cron. You'll also learn how to do process administration and make backups.

    Chapter 4, Managing Software  In this chapter, you'll learn how to install software. You'll also read how to manage software, which includes querying software packages to find out everything you need to know about installed software. You'll also read how to set up the repositories that you'll need for an easy way to install and manage software.

    Chapter 5, Configuring and Managing Storage  This chapter teaches you how to set up storage. It includes information about managing partitions, logical volumes, and encrypted volumes. You'll also learn how to set up automatic mounting of volumes through fstab and how to create and manage swap space.

    Chapter 6, Connecting to the Network  Here you'll learn how to connect your server to the network. The chapter addresses setting up the network interface, both from the command line and from the configuration files. You'll set up normal network connections, and you will also learn how to create a bonded network interface. Finally, you'll learn how to test your network using common utilities such as ping and dig.

    Part III: Securing Red Hat Enterprise Linux

    Chapter 7, Working with Users, Groups, and Permissions  To manage who can do what on your system, you'll need to create users and put them in groups. In this chapter, you'll learn how to do that and how to add users to primary and secondary groups. You'll also learn how to work with basic and advanced permissions and set up access control lists.

    Chapter 8, Understanding and Configuring SELinux  This chapter teaches you how to make your Red Hat Enterprise Linux server really secure using SELinux. You'll learn about the different modes that are available and how to set file system context labels and Booleans to tune SELinux exactly to your needs.

    Chapter 9, Working with KVM Virtualization  Red Hat Enterprise Linux offers virtualization capabilities by default. In this chapter, you'll learn how to set these up using KVM virtualization. You'll learn what your server needs to be a KVM host, and you'll read how to create and manage virtual machines.

    Chapter 10, Securing Your Server with iptables  iptables is a kernel-provided firewall, which blocks or allows access to services configured to listen at specific ports. In this chapter, you'll learn how to set up the iptables firewall from the command line.

    Chapter 11, Setting Up Cryptographic Services  In this chapter, you'll learn how to set up cryptographic services on Red Hat Enterprise Linux. You'll learn how to configure SSL certificates and have them signed by a certificate authority. You'll also learn how to use GPG for file and email encryption and security.

    Part IV: Networking Red Hat Enterprise Linux

    Chapter 12, Configuring OpenLDAP  If you really need to manage more than just a few users, using a directory service such as OpenLDAP can be handy. In this chapter, you'll learn how to set up OpenLDAP on your server. You'll also learn how to add user objects to the OpenLDAP server and how to configure your server to authenticate on OpenLDAP.

    Chapter 13, Configuring Your Server for File Sharing  This chapter teaches you how to set up your server for file sharing. You'll learn about common file sharing solutions, such as FTP, NFS, and Samba. You'll also learn how to connect to servers offering these services from Red Hat Enterprise Linux.

    Chapter 14, Configuring DNS and DHCP  In this chapter, you'll read how to set up a Dynamic Host Configuration Protocol (DHCP) server to automate providing computers in your network with IP addresses and related information. You'll also learn how to set up Domain Name System (DNS) on your servers, configuring them as primary and secondary servers, as well as cache-only servers.

    Chapter 15, Setting Up a Mail Server  Postfix is the default mail server on Red Hat Enterprise Linux. In this chapter, you'll learn how to set up Postfix to send and receive email on your server. You'll also learn how to set up Dovecot to make email accessible for clients using POP or IMAP.

    Chapter 16, Configuring Apache on Red Hat Enterprise Linux  In this chapter, you'll learn how to set up Apache on your server. You'll learn how to configure basic hosts, virtual hosts, and SSL secured hosts. The chapter also teaches you how to set up file-based or LDAP-based user authentication.

    Part V: Advanced Red Hat Enterprise Linux Configuration

    Chapter 17, Monitoring and Optimizing Performance  For your server to function properly, it is important that it performs well. In this chapter, you'll learn how to analyze server performance and how to fix it if there are problems. You'll also read some hints about setting up the server in a way that minimizes the chance of having performance-related problems.

    Chapter 18, Introducing Bash Shell Scripting  Every Linux administrator should at least know the basics of shell scripting. This chapter teaches you how it works. You'll learn how to set up a shell script and how to use common shell scripting structures to handle jobs in the most ideal manner.

    Chapter 19, Understanding and Troubleshooting the Boot Procedure  Many tasks are executed sequentially when your server boots. In this chapter, you'll learn about everything that happens during server startup, including GRUB configuration and the way Upstart is used. You'll also learn how to troubleshoot common issues that you may encounter while booting your server.

    Chapter 20, Introducing High-Availability Clustering  In a mission-critical environment, the Red Hat High Availability add-on can be a valuable addition to your datacenter. In this chapter, you'll learn how to design and set up high availability on Red Hat Enterprise Linux.

    Chapter 21, Setting Up an Installation Server  In a datacenter environment, you don't want to set up every server manually. This is why it makes sense to set up an installation server. This chapter teaches you how to automate the installation of Red Hat Enterprise Linux completely. It includes setting up a network installation server and configuring a TFTP server that hands out boot images to clients that perform a PXE boot. You'll also learn how to create a kickstart configuration file, which passes all parameters that are to be used for the installation.

    Glossary   This contains definitions of the relevant vocabulary terms in this book.

    How to Contact the Author

    If you want to provide feedback about the contents of this book or if you're seeking a helping hand in setting up an environment or fixing problems, you can contact me directly. The easiest way to get in touch with me is by sending an email to [email protected]. You can also visit my website at www.sandervanvugt.com. If you're interested in the person behind the book, you're also more than welcome to visit my hobby site at www.sandervanvugt.org.

    Sybex strives to keep you supplied with the latest tools and information you need for your work. Please check their website at www.sybex.com, where we'll post additional content and updates that supplement this book if the need arises. Enter search terms in the Search box (or type the book's ISBN: 978-1-118-30129-6), and click Go to get to the book's update page.

    Part I

    Getting Familiar with Red Hat Enterprise Linux

    Chapter 1

    Getting Started with Red Hat Enterprise Linux

    Topics covered in this chapter:

    Linux, Open Source, and Red Hat

    Red Hat Enterprise Linux and Related Products

    Installing Red Hat Enterprise Linux Server

    Exploring the GNOME User Interface

    Red Hat Enterprise Linux is in use at most Fortune 500 companies, and it takes care of mission-critical tasks in many of them. This chapter introduces Red Hat Enterprise Linux. It begins with a brief history, where you'll learn about Linux in general and the role of Red Hat in the Linux story. Following that, it provides an overview of Red Hat Enterprise Linux (RHEL) and its related products. Finally, you'll learn how to install RHEL so that you can start building your RHEL skills.

    Linux, Open Source, and Red Hat

    If you want to work with Red Hat, it helps to understand a little bit about its background. In this introduction, you'll learn about the rise of UNIX, the Linux kernel and open source, and the founding of Red Hat.

    Origins of Linux

    The late 1960s and early 1970s were the dawn of the modern computing era. It was the period of proprietary stacks, where a vendor would build a closed computer system and create the operating software to run on it. Computers were extremely expensive and rare among businesses. In that period, scientists were still looking for the best way to operate a computer, and that included developing the best programming language. It was normal for computer programmers to address the hardware directly, using very complex assembly programming languages.

    An important step forward was the development of the general-purpose programming language C by Dennis Richie at Bell Telephone Laboratories in 1969. This language was developed for use with the UNIX operating system.

    The UNIX operating system was the first operating system where people from different companies tried to work together to build instead of competing with each other, keeping their efforts secret. This spirit brought UNIX to scientific, government, and higher-education institutions. There it also became the basis for the rise of another phenomenon, the Internet Protocol (IP) and the Internet. One of the huge contributors to the success of UNIX was the spirit of openness of the operating system. Everyone could contribute to it, and the specifications were freely available to anyone.

    Because of the huge success of UNIX, companies started claiming parts of this operating system in the 1970s. They succeeded fairly well, and that was the beginning of the development of different flavors of UNIX, such as BSD, Sun Solaris, and HP AIX. Instead of working together, these UNIX flavors worked beside one another, with each sponsoring organization trying to develop the best version for a specific solution.

    As a reaction to the closing of UNIX, Richard Stallman of MIT announced in 1984 the GNU operating system project. The goal of this project was to develop a sufficient body of free software […] to get along without any software that is not free.

    During the 1980s, many common Unix commands, tools, and applications were developed until, in 1991, the last gap was filled in with the launch of the Linux kernel by a student at the University of Helsinki in Finland, Linus Torvalds. The interesting fact about the Linux kernel is that it was never developed to be part of the GNU project. Rather, it was an independent initiative. Torvalds just needed a license to ensure that the Linux kernel would be free software forever, and he chose to use the GNU General Public License (GPL) for this purpose. The GPL is a copyleft license, which means that derived works can be distributed only under the same license terms. Using GPL made it possible to publish open source software where others could freely add to or modify lines of code.

    Torvalds also made an announcement on Usenet, a very popular news network that was used to communicate information about certain projects in the early 1990s. In his Usenet message, Torvalds asked others to join him working on the Linux kernel, a challenge that was very soon taken up by many programmers around the world.

    Distributions

    With the adoption of the Linux kernel, finally everything that was needed to create a complete operating system was in place. There were many GNU utilities to choose from, and those tools, together with a kernel, made a complete operating system. The only thing enthusiastic users still needed to do was to gather this software, compile it from source code, and install the working parts on a computer. Because this was a rather complicated task, some initiatives started soon to provide ready-to-install Linux distributions. Among the first was MCC Interim Linux, a distribution made available for public download in February 1992, shortly after the release of the Linux kernel itself. In 1993, Patrick Volkerding released a distribution called Slackware, a distribution that could be downloaded to floppy disk images in the early days. It is still available and actively being developed today.

    In 1993, Marc Ewing and Bob Young founded Red Hat, the first Linux distributor operating as a business. Since then, Red Hat has acquired other companies to integrate specific Linux-related technologies.

    Red Hat went public in 1999, thus becoming the first Linux-based company on Wall Street. Because of the publicity stemming from its IPO, Red Hat and Linux received great exposure, and many companies started using it for their enterprise IT environments. It was initially used for applications, such as intranet web servers running Apache software. Soon Linux was also used for core financial applications.

    Today Linux in general and Red Hat Linux in particular is at the heart of the IT organization in many companies. Large parts of the Internet operate on Linux, using popular applications such as the Apache web server or the Squid proxy server. Stock exchanges use Linux in their real-time calculation systems, and large Linux servers are running essential business applications on top of Oracle and SAP. Linux has largely replaced UNIX, and Red Hat is a leading force in Linux.

    One reason why Red Hat has been so successful since the beginning is the level of support the company provides. Red Hat offers three types of support, and this gives companies the confidence they need to run vital business applications on Linux.

    The three types of Linux support provided by Red Hat are as follows:

    Hardware Support

    Red Hat has agreements with every major server hardware vendor to make sure that whatever server a customer buys, the hardware vendor will assist them in fixing hardware issues, when Red Hat is installed on it.

    Software Support

    Red Hat has agreements with every major enterprise software vendor to make sure that their software runs properly on top of the Red Hat Linux operating system and that the enterprise software is also guaranteed to run on Red Hat Linux by the vendor of the operating system.

    Hands-on Support

    This means that if a customer is experiencing problems accomplishing tasks with Red Hat software, the Red Hat Global Support organization is there to help them by fixing bugs and providing technical assistance.

    It is also important to realize that Red Hat is doing much more than just gathering the software pieces and putting them together on the installation media. Red Hat employs hundreds of developers who work on developing new solutions that will run on Red Hat Enterprise Linux in the near future.

    Fedora

    Even as Red Hat is actively developing software to be part of Red Hat Linux, it still is largely involved in the open source community. The most important approach to do this is by sponsoring the Fedora project. Fedora is a freely available Linux distribution that is completely comprised of open source software, and Red Hat is providing the funds and people to tackle this project. Both Red Hat and Fedora are free of charge; with Red Hat you pay only for updates and support.

    Fedora is used as a development platform for the latest and greatest version of Linux, which is provided free of charge for users who are interested. As such, Fedora can be used as a test platform for features that will eventually be included in Red Hat Enterprise Linux. If you want to know what will be included in future versions of Red Hat Linux, Fedora is the best place to look. Also, Fedora makes an excellent choice to install on your personal computer, because it offers all the functions you would expect from a modern operating system—even some functions that are of interest only to home users.

    Red Hat Enterprise Linux and Related Products

    Red Hat offers several products, of which Red Hat Enterprise Linux and JBoss are the most important solutions. There are other offerings in the product catalog as well. In the following sections, you can read about these products and their typical application.

    Red Hat Enterprise Linux Server Edition

    The core of the Red Hat offering is Red Hat Enterprise Linux. This is the basis for two editions: a server edition and a workstation edition. The RHEL Server edition is the highly successful Red Hat product that is used in companies around the globe.

    note

    At the time of this writing, the current RHEL release is version 6.2.

    With the Red Hat Enterprise Linux Server edition, there is a major new release about every three to four years. In between the major updates, there are minor ones, represented by the number after the dot in the version number. Apart from these releases, Red Hat provides patches to fix bugs and to apply security updates. Typically, these patches are applied by using the Red Hat Network, a certified collection of repositories where Red Hat makes patches available after verifying them.

    To download and install repositories from the Red Hat Network (RHN), a current subscription is required. Without a current subscription, you can still run RHEL, but no updates will be installed through RHN. As an alternative to connecting each server directly to RHN, Red Hat provides a solution called Satellite. Satellite works as a proxy to RHN, and just the Satellite server is configured to fetch updates from RHN, after which the Red Hat nodes in the network connect to Satellite to access their updates. Be aware that there is also a product called RHN Proxy, which is a real caching proxy, whereas Satellite is a versioning and deployment tool.

    Red Hat Enterprise Linux for Free

    If you want updates and support, you have to pay for Red Hat Enterprise Linux, so how come people have to buy licenses for GPL software that is supposed to be available for free? Well, the fact is that the sources of all the software in RHEL are indeed available for free. As with any other Linux vendor, Red Hat provides source code for the software in RHEL. What customers typically buy, however, is a subscription to the compiled version of the software that is in RHEL. In the compiled version, the Red Hat logo is included. This is more than just a logo; it's the guarantee of quality that customers expect from the leader in Linux software.

    Still, the fact is that the sources of the software contained in RHEL are available for free. Some Linux distributions have used these sources to create their own distributions. The two most important distributions are CentOS (short for Community Enterprise Operating System) and Scientific Linux. Because these distributions are built upon Red Hat Linux with the Red Hat logo removed, the software is basically the same. However, small binary differences do exist, such as the integration of the software with RHN. The most important difference, however, is that these distributions don't offer the same level of support as in in RHEL. So, you're better off going for the real thing.

    You can download a free version of RHEL with 30 days of access to RHN at www.redhat.com. Alternatively, you can download CentOS at www.centos.org or Scientific Linux at www.scientificlinux.org.

    Red Hat Enterprise Linux Workstation Edition

    The other product that falls under Red Hat Enterprise Linux is the Workstation edition. This solution is based on the same code as RHEL Server. Also, the same license conditions apply for RHEL Workstation as for RHEL Server, and you need a current subscription to access and install updates from RHN. To date, Red Hat Linux Workstation hasn't experienced the same level of success as Red Hat Linux Enterprise Server.

    Red Hat Add-Ons

    RHEL includes everything most people need to run a Linux server. Some components require an extra effort, though, and for that reason they are offered as add-ons in RHEL. The two most significant kinds of add-on are the Enterprise File System (XFS) and Red Hat Cluster Services.

    Enterprise File System (XFS)

    The Enterprise File System offers full scalability for large environments where many files or very large files have to be handled on large file systems. Even though ext4, the default file system in Red Hat Enterprise Linux, has been optimized significantly over time, it still doesn't fit well in environments that have very specific storage needs, such as the need to stream multimedia files or to handle hundreds of thousands of files per day.

    Red Hat Cluster Services (RHCS)

    RHCS offers high-availability clustering to vital services in the network. In an RHCS cluster, you run specialized cluster software on multiple nodes that are involved in the cluster, and that software monitors the availability of vital services. If anything goes down with such a service, Red Hat Cluster Services takes over and makes sure that the service is launched on another node.

    Red Hat Directory Server

    In a corporate environment where many user accounts have to be managed, it doesn't make sense to manage these accounts in stand-alone databases on individual servers. One solution is to have servers handle their authentication on external directory servers. An example of this approach is to connect RHEL to Microsoft Active Directory, an approach that is used frequently by many Red Hat customers. Another approach is to use Red Hat Directory Server, a dedicated LDAP directory service that can be used to store and manage corporate identities.

    Red Hat Enterprise Virtualization

    Red Hat Enterprise Virtualization (RHEV) provides a virtualization platform that can be compared with other solutions, such as VMware vSphere. In RHEV, several dedicated servers running the KVM hypervisor are managed through RHEV-M, the management server for the virtual environment. In the RHEV infrastructure, fully installed RHEL servers as well as dedicated on-iron hypervisors (the RHEV-H) can be used. A major reason why companies around the world are using RHEV is because it offers the same functionality as VMware vSphere, but for a fraction of the price.

    JBoss Enterprise Middleware

    JBoss Enterprise Middleware is an application layer that can be installed on top of any operating system, including RHEL. The platform is used to build custom-made applications which can offer their services to perform any tasks you can think of. JBoss is an open platform, and therefore its adoption level is high. Red Hat has had huge success selling JBoss solutions on top of Red Hat Enterprise Linux.

    Red Hat Cloud

    Red Hat Cloud is the solution where everything comes together. In the lower layers of the cloud infrastructure, Red Hat can offer Platform as a Service services that are based on RHEV or any other virtualization platform. At the PaaS layer, Red Hat Cloud helps deploy virtual machines on demand easily. In the higher layers of the cloud, combined with JBoss Enterprise Middleware, Red Hat Cloud delivers software as a service, thus helping customers build a complete cloud infrastructure on top of Red Hat software.

    Installing Red Hat Enterprise Linux Server

    There is a version of RHEL Server for almost any hardware platform. That means you can install it on a mainframe computer, a mid-range system, or PC-based server hardware using a 64- or 32-bit architecture. Currently, the 64-bit version of Red Hat Enterprise Linux is the most used version, and that is why, in this chapter, you can read about how to install this software version on your computer. The exact version you need is Red Hat Enterprise Linux Server for 64-bit x86_64. If you don't have the software yet, you can download a free evaluation copy at www.redhat.com.

    The ideal installation is on server-grade hardware. However, you don't have to buy actual server hardware if you just want to learn how to work with Red Hat Enterprise Linux. Basically, any PC will do as long as it meets the following minimum requirements:

    A CPU capable of handling 64-bit instructions

    1GB of RAM

    20GB of available hard disk space

    A DVD drive

    A network card

    note

    Make sure your computer meets these minimum requirements. To work your way through the exercises in this book, I'll assume you have a computer or virtual machine that meets them.

    You can run Red Hat Enterprise Linux with less than this, but if you do, you'll miss certain functionality. For instance, you can install RHEL on a machine that has 512MB of RAM, but you'll lose the graphical user interface. You could also install RHEL on a 32-bit CPU or on a VMware or VirtualBox virtual machine, but within these environments you cannot configure KVM virtualization. Because this book includes some exercises that work directly on the hard disk of your computer and you don't want to risk destroying all of your data by accident, it is strongly recommended that you do not install a dual-boot RHEL and other OS configuration.

    note

    If you don't have a dedicated computer on which to install RHEL, a virtual machine is the second-best choice. RHEL can be installed in most virtual environments. If you want to run it on your own computer, VMware Workstation (fee-based software) or VMware Player (free software but with fewer options) works fine. You can download this software from www.vmware.com. Alternatively, you can use VirtualBox, a free virtualization solution provided by Oracle. You can download it from www.virtualbox.org.

    You'll be working with Red Hat Enterprise Linux in a graphical environment in this book. RHEL offers some very good graphical tools, and for now, you'll need a graphical environment to run them. A typical Linux server that provides services in a datacenter does not offer a graphical environment. Rather, it runs in console mode. That is because servers in a datacenter normally are accessed only remotely. The administrator of such a server can still use graphical tools with it but will start them over an SSH session, accessing the server remotely. Later in this book, you will learn how to configure such an environment.

    In Exercise 1.1, you will install Red Hat Linux on your computer.

    Exercise 1.1

    Installing Linux on Your Machine

    This procedure describes how to install Red Hat Enterprise Linux on your computer. This is an important exercise, because you will use it to set up the demo system that you'll use throughout this book. It is important that you perform the steps exactly as described here, to match the descriptions in later exercises in this book.

    To perform this exercise successfully, you'll need to install on a physical computer that meets the following requirements:

    An entire computer that can be dedicated to using Red Hat Enterprise Linux

    A minimum of 1GB of RAM (2GB is recommended)

    A dedicated hard disk of 40GB or more

    A DVD drive

    A network card

    Apart from these requirements, other requirements relate to KVM virtualization as well. The most important of these is that the CPU on your computer needs virtualization support. If you can enable virtualization from the computer BIOS, you are probably OK. Read Chapter 6, Connecting to the Network, for more details about the requirements for virtualization.

    1. Put the RHEL 6 installation disc in the optical drive of your computer, and boot from the installation disc. If the DVD drive is not in the default boot order on your computer, you'll have to go into the setup and instruct your computer to boot from the optical drive. After booting from the installation DVD successfully, you'll see the Welcome to Red Hat Enterprise Linux screen.

    agr

    2.From the graphical installation screen, select Install Or Upgrade An Existing System. In case you're experiencing problems with the graphical display, you can choose to install using the basic video driver. However, in most cases that isn't necessary. The other options are for troubleshooting purposes only and will be discussed in later chapters in this book.

    3. After beginning the installation procedure, a Linux kernel is started, and the hardware is detected. This normally takes about a minute.

    4. Once the Linux kernel has been loaded, you will see a nongraphical screen that tells you that a disc was found. (Nongraphical menus like the one in the following image are referred to as ncurses interfaces. Ncurses refers to the programming library that was used to create the interface.)

    agr

    From this screen, you can start a check of the integrity of the installation media. Don't do this by default; the media check can easily take 10 minutes or more! Press the Tab key once to navigate to the Skip button, and press Enter to proceed to the next step.

    5. If the graphical hardware in your computer is supported, you'll next see a graphical screen with only a Next button on it. Click this button to continue. If you don't see the graphical screen at this point, restart the installation procedure by rebooting your computer from the installation disc. From the menu, select Install System With Basic Video Driver.

    agr

    6. On the next screen, you can select the language you want to use during the installation process. This is just the installation language. At the end of the installation, you'll be offered another option to select the language you want to use on your Red Hat server. Many languages are supported; in this book I'm using English.

    agr

    7.After selecting the installation language, on the next screen, select the appropriate keyboard layout, and then click Next to continue.

    agr

    8. Once you've selected the keyboard layout you want to use, you need to select the storage devices with which you are working. To install on a local hard drive in your computer, select Basic Storage Devices. If you're installing RHEL in an enterprise environment and want to write all files to a SAN device, you should select the Specialized Storage Devices option. If you're unsure about what to do, select Basic Storage Devices and click Next to proceed.

    9. After you have selected the storage device to be used, the installation program may issue a warning that the selected device may contain data. This warning is displayed to prevent you from deleting all the data on the selected disk by accident. If you're sure that the installer can use the entire selected hard disk, click Yes, and discard any data before clicking Next to continue.

    agr

    10. On the next screen, you can enter the hostname you want to use on the computer. Also on this screen is the Configure Network button, which you'll use to change the current network settings for the server. Start by entering the hostname you want to use. Typically, this is a fully qualified domain name that includes the DNS suffix. If you don't have a DNS domain in which to install the server, you can use example.com. This name is available for test environments, and it won't be visible to others on the Internet.

    11. After setting the hostname, you have to click the Configure Network button on the same screen to change the network settings. If you don't do this, your server will be configured to get the network configuration from a DHCP server. There's nothing wrong with that if you're installing a personal desktop where it doesn't matter if the IP address it is using changes, but for servers in general, it's better to work with a fixed IP address. To set this fixed address, click Configure Network now.

    agr

    12.You'll see the Network Connections window. This window comes from the NetworkManager tool, and it allows you to set and change all different kinds of network connections. In this window, select the Wired tab and, on that tab, click the System eth0 network card. Notice that depending on the hardware you are using, a different name may be used. Next click Edit to change its properties.

    agr

    13. You'll now see the properties of the eth0 network card. First make sure that the option Connect Automatically is selected. If it isn't, your network card won't be activated when you boot the server.

    agr

    14. Select the IPv4 Settings tab, and in the Method drop-down list, select Manual.

    15. Click Add to enter the IP address you want to use. You need at least an IP address and a netmask. Make sure that the address and netmask you're using here do not conflict with anything else that is in use on the network to which you are connecting. In this book I'll assume your server uses the IP address 192.168.0.70. If you want to communicate with other computers and the Internet, you'll have to enter the address of the gateway and the address of at least one DNS server. You need to consult the documentation of the network to which you're connecting to find out which addresses to use here. For the moment, you don't have to enter anything here.

    16. After entering the required parameters, click Apply to save and apply these settings.

    17. Click Close to close the NetworkManager window. Back on the main screen where you set the hostname, click Next to continue.

    18. At this point, you'll configure the time settings for your server. The easiest way to do this is just to click the city nearest to your location on the world map that is displayed. Alternatively, you can choose the city that is nearest to you from the drop-down list.

    agr

    19. You'll also need to specify whether your computer is using UTC for its internal clock. UTC is Coordinated Universal Time, a time standard by which the world regulates clocks and time. It is one of several successors to Greenwich Mean Time, without Daylight Saving Time settings. Most servers have their hardware clocks set to UTC, but most PCs don't. If the hardware clock is set to UTC, the server uses the time zone settings to calculate the local software time. If your computer has its hardware clock set to UTC, select the option System Clock Uses UTC, and click Next to continue. If not, deselect this option and proceed with the installation.

    20. Next you'll specify the password that is to be used by the user root. The root account is used for system administration tasks, and its possibilities are nearly unlimited. Therefore, you should set the root password to something that's not easy for possible intruders to guess.

    agr

    21. The next screen you'll see is used to specify how you'd like to use the storage devices on which you'll install Red Hat Enterprise Linux. If you want to go for the easiest solution, select Use All Space. This will remove everything currently installed on the selected hard disk (which typically isn't a bad idea anyway). Table 1.1 gives an overview of all the available options.

    agr

    Table 1.1 Available storage options

    22. To make sure you're using a setup that allows you to do all exercises that come later in this book, you'll need to select the Create Custom Layout option.

    23. After selecting the Create Custom Layout option, click Next to continue. You'll now see a window in which your hard drive is shown with a name like sda or hda on old IDE-based computers below it. Under that appears one more item with the name Free that indicates all available disk space.

    agr

    24. To configure your hard disk, you first have to create two partitions. Click Create to start the Create Storage interface. For the first partition, you'll select the Standard Partition option. Select this option, and click Create.

    agr

    25.You'll now see the Add Partition interface in which you have to specify the properties of the partitions you want to create. The first partition is a rather small one that is used for booting only. Make sure to use the following properties:

    Mount Point: /boot

    File System Type: ext4

    Size: 200 MB

    Additional Size Options: Fixed size

    Force to be a primary partition

    agr

    26. After creating the boot partition, you'll need to create a partition that's going to be used as an LVM physical volume. From the main partitioning screen, click Create, and in the Create Storage options box, select LVM Physical Volume. Next click Create.

    agrnote

    At this point, the purpose is to get you up and running as fast as possible. Therefore, you'll read how to configure your disk, without overwhelming you with too many details on exactly what it is you're doing. In Chapter 5, Configuring and Managing Storage, you'll read more about partitions and logical volumes and what exactly they are.

    27. In the Add Partition window, you now have to enter the properties of the physical volume you've just created. Use the following values:

    File System Type: Physical Volume (LVM)

    Size: 40000

    Additional Size Options: Fixed size

    Force to be a primary partition

    agr

    28. At this point, you have created an LVM physical volume, but you can't do anything useful with it yet. You now need to create a volume group on top of it. To do this, click Create, and under the Create LVM option, select LVM Volume Group. Next click Create.

    agr

    29.You'll now see the properties of the LVM volume group. The only relevant parameter is the name, which is set to vg_yourhostname, which is perfectly fine. Change nothing, and click Add to add logical volumes in the volume group. The logical volumes are what you're going to put your files on, and you'll need three of them:

    One 20GB volume that contains the root directory

    One 512MB volume to use for a swap

    One 2GB volume that contains the /var directory

    To start creating the logical volumes, click Add.

    agr

    30. You need to add three logical volumes using the following parameters:

    The root volume:

    Mount Point: /

    File System Type: Ext4

    Logical Volume Name: root

    Size: 20000

    The swap volume:

    File System Type: swap

    Logical Volume Name: swap

    Size: 512

    The var volume:

    Mount Point: /var

    File System Type: Ext4

    Logical Volume Name: var

    Size: 2000

    agr

    Once you've finished configuring storage devices on your computer, the disk layout should look like this:

    agr

    31.Now click Next to continue. In the Format Warning window that you now see, click Format to start the formatting process. Next, confirm that you really want to do this by selecting the Write Changes To Disk option.

    32. At this point, the partitions and logical volumes have been created, and you're ready to continue with the installation procedure. On the following screen, the installer asks what you want to do with the boot loader. Select the default option, which installs it on the master boot record of your primary hard drive, and click Next.

    33. You now have to specify what type of installation you want to perform. The only thing that counts at this moment is that you'll need to select the Desktop option. If you don't, you'll end up with a server that, by default, doesn't have a graphical environment, and that is hard to fix if you're just taking your first steps into the world of Red Hat Enterprise Linux. After selecting the Desktop option, click Next to continue.

    agr

    34. The installation process is now started, and the files will be copied to your computer. This will take about 10 minutes on an average system, so it's now time to have a cup of coffee.

    35. Once the installation has completed, you'll see the Congratulations message telling you that your server is ready. On this screen, click Reboot to stop the installation program and start your server.

    agr

    36. Once the server has successfully started for the first time, you'll see the Welcome screen that guides you through the remainder of the installation procedure. From this screen, click Forward. Next you'll see the License Information screen in which you have to agree to the license agreement. After doing so, click Forward to proceed.

    39. Now you'll see the Set Up Software Updates screen where you can connect to the Red Hat Network.

    a. If you have credentials for Red Hat Network, you can connect now.

    b. If you don't and just want to install a system that cannot download patches and updates from Red Hat Network, select the No, I Prefer To Register At A Later Time option, and click Forward.

    In this book, RHN access is not required, so select No, I Prefer To Register At A Later Time. You'll see a window informing you about all the good things you'll miss without RHN. In this window, click No Thanks, I'll Connect Later to confirm your selection. Now click Forward once more to proceed to the next step.

    agrnote

    If you don't connect your server to RHN, you cannot update it. This means it's not a good idea to use this server as a production system and provide services to external users; you'll be vulnerable if you do. If you need to configure a Red Hat system that does provide public services, you have to purchase a subscription to Red Hat Enterprise Linux. If you don't want to do that, use Scientific Linux or CentOS instead.

    40. At this point, you'll need to create a user account.

    Enjoying the preview?
    Page 1 of 1