Introduction

Why should you learn about Linux? It's a fast-growing operating system, and it's inexpensive and flexible. Linux is also a major player in the small and mid-sized server field, and it's an increasingly viable platform for workstation and desktop use as well. By understanding Linux, you'll increase your standing in the job market. Even if you already know Windows or Mac OS and your employer uses these systems exclusively, understanding Linux will give you an edge when you're looking for a new job or when you're looking for a promotion. For instance, this knowledge will help you make an informed decision about if and when you should deploy Linux.

The Linux Professional Institute (LPI) has developed its LPI-2 certification as an intermediate certification for people who want to further their careers involving Linux. The exam is meant to certify that an individual has the skills necessary to install, operate, and troubleshoot a Linux system and is familiar with Linux-specific concepts and basic hardware.

The purpose of this book is to help you pass both of the LPI-2 exams (201 and 202). Because these exams cover the Linux kernel, system startup, filesystems, disk devices, network options, system maintenance, DNS servers, Web servers, file servers, email servers, network client management, security, and troubleshooting, those are the topics that are emphasized in this book. You'll learn enough to manage a Linux system and how to configure it for many common tasks. Even after you've taken and passed the LPI 201 and 202 exams, this book should remain a useful reference.

What Is Linux?

Linux is a clone of the Unix operating system (OS) that has been popular in academia and many business environments for years. Formerly used exclusively on large mainframes, Unix and Linux can now run on small computers—which are actually far more powerful than the mainframes of just a few years ago. Because of its mainframe heritage, Unix (and hence also Linux) scales well to perform today's demanding scientific, engineering, and network server tasks.

Linux consists of a kernel, which is the core control software, and many libraries and utilities that rely on the kernel to provide features with which users interact. The OS is available in many different distributions, which are collections of a specific kernel with specific support programs.

Why Become LPI Certified?

Several good reasons to get your LPI certification exist. The LPI Web site suggests four major benefits:

Relevance LPI's exams were designed with the needs of Linux professionals in mind. This was done by performing surveys of Linux administrators to learn what they actually need to know to do their jobs.

Quality The LPI exams have been extensively tested and validated using psychometric standards. The result is an ability to discriminate between competent administrators and those who must still learn more material.

Neutrality LPI is a nonprofit organization that doesn't itself market any Linux distribution. This fact removes the motivation to create an exam that's designed as a way to market a particular distribution.

Support The LPI exams are supported by major players in the Linux world. LPI serves the Linux community.

How to Become LPI Certified

The LPI certification is available to anyone who passes the test. You don't have to work for a particular company. It's not a secret society.

To take an LPI exam, you must first register with LPI to obtain an ID number. You can do this online at https://www.lpi.org/caf/Xamman/register. Your ID number will be emailed to you. With the ID number in hand, you can register for the exams with either of the two firms that administer them: Thomson Prometric and Pearson VUE. The exams can be taken at any Thomson Prometric or Pearson VUE testing center. If you pass, you'll get a certificate in the mail saying that you've passed. To find the Thomson Prometric testing center nearest you, call (800) 294-3926. Contact (877) 619-2096 for Pearson VUE information. Alternatively, register online at http://securereg3.prometric.com for Thomson Prometric or http://www.vue.com/lpi/ for Pearson VUE. However you do it, you'll be asked for your name, mailing address, phone number, employer, when and where you want to take the test (that is, which testing center), and your credit card number (arrangement for payment must be made at the time of registration).

Who Should Buy This Book

Anybody who wants to pass the LPIC-2 exams may benefit from this book. You should already be familiar with Linux and the material covered by the LPIC-1 exams. If you're not, you should start with my LPIC-1 Study Guide before tackling this book. This book picks up where my LPIC-1 Study Guide left off, providing the knowledge you need up to a proficiency level sufficient to pass the LPIC-2 201 and 202 exams. If you're already familiar with the Linux topics covered in this book, it can serve as a review and as a refresher course for information with which you may not be completely familiar. In either case, reading this book will help you pass the LPIC-2 exams.

Even if you don't plan to take the LPIC-2 exams, this book can be a useful tutorial and reference for intermediate Linux topics. Use it as you would any other computer book, ignoring the end-of-chapter material—or using it, if you like.

This book is written with the assumption that you know a moderate amount about Linux. You should be familiar with command-line use of the OS, including staple commands such as mv, cp, ls, cat, less, ps, free, and uptime, to name but a few. You should be comfortable with at least one Linux text editor, such as Vi, Emacs, or NEdit. You should be able to bring up a network interface and understand the principles of server configuration, even if the details for specific servers remain foggy.

As a practical matter, you'll need a Linux computer with which to practice and learn in a hands-on way. You can install any of the many personal Linux distributions, such as Fedora, Ubuntu, OpenSUSE, Mandriva, Debian, Slackware, or Gentoo. Consult http://distrowatch.com for information on and links to these and other distributions. Be aware that some of the LPIC-2 material describes configuration file locations that vary from one distribution to another. Picking a popular distribution, such as Fedora or Ubuntu, increases the odds that your system will be similar to what the LPIC-2 exam developers used.

How This Book Is Organized

This book consists of 12 chapters plus supplementary information: this introduction, the assessment test after the introduction, and a glossary. The chapters are as follows:

  • Chapter 1, “System Startup and Advanced System Management,” covers Linux's boot process, including interacting with boot loaders and configuring startup scripts. It continues with information on how to compile software from source code and providing information to your users.
  • Chapter 2, “Linux Kernel Configuration,” describes how to compile and install a Linux kernel from source code, as well as how to adjust kernel options once you've done so.
  • Chapter 3, “Basic Filesystem Management,” focuses on creating, using, and maintaining filesystems, including hard disk filesystems, optical disc filesystems, and the udev filesystem that manages access to hardware.
  • Chapter 4, “Advanced Disk Management,” covers advanced disk access methods, including RAID, LVM, disk hardware tuning, and backup software and procedures.
  • Chapter 5, “Networking Configuration,” describes tools used to bring up and manage a network, including wireless (Wi-Fi) tools, basic routing options, VPN configuration, and network diagnostics.
  • Chapter 6, “DNS Server Configuration,” describes how to set up and manage a DNS server, including caching-only configurations, managing zone files, running a slave server, and DNS security considerations.
  • Chapter 7, “Advanced Network Configuration,” describes miscellaneous network servers and tools, including DHCP server configuration, use of an LDAP server, NAT and firewall features, and SSH server setup.
  • Chapter 8, “Configuring File Servers,” focuses on the Samba and NFS servers for Linux, which are used to serve files primarily to Windows and Unix/Linux systems, respectively. This chapter also covers the cross-platform FTP server.
  • Chapter 9, “Configuring Web and Email Servers,” covers these two important types of servers, including the Apache Web server, Web proxy servers, the sendmail and Postfix SMTP servers, the Procmail utility, and the Courier and Dovecot POP/IMAP servers.
  • Chapter 10, “Security,” covers the PAM authentication system, TCP Wrappers, tools to protect ports and manage network packets, and security information resources.
  • Chapter 11, “System Troubleshooting I: Boot and Kernel Problems,” covers tools and techniques to resolve problems involving the boot loader, the kernel, and miscellaneous software problems.
  • Chapter 12, “System Troubleshooting II: System Resources and the User Environment,” covers problems late in the system startup process, difficulties with accounts and shells, tools for studying running processes, and the cron system for running programs in the future.

Chapters 1 through 6 cover the LPIC 201 exam, and Chapters 7 through 12 cover the LPIC 202 exam. These make up Part I and Part II of the book, respectively.

Each chapter begins with a list of the LPIC objectives that are covered in that chapter. The book doesn't cover the objectives in order. Thus, you shouldn't be alarmed at some of the odd ordering of the objectives within the book. At the end of each chapter, you'll find a couple of elements you can use to prepare for the exam:

Exam Essentials This section summarizes important information that was covered in the chapter. You should be able to perform each of the tasks or convey the information requested.

Review Questions Each chapter concludes with 20 review questions. You should answer these questions and check your answers against the ones provided after the questions. If you can't answer at least 80 percent of these questions correctly, go back and review the chapter, or at least those sections that seem to be giving you difficulty.

images The review questions, assessment test, and other testing elements included in this book and on the accompanying CD-ROM are not derived from the LPI exam questions, so don't memorize the answers to these questions and assume that doing so will enable you to pass the exam. You should learn the underlying topic, as described in the text of the book. This will let you answer the questions provided with this book and pass the exam. Learning the underlying topic is also the approach that will serve you best in the workplace—the ultimate goal of a certification like LPI's.

To get the most out of this book, you should read each chapter from start to finish and then check your memory and understanding with the chapter-ending elements. Even if you're already familiar with a topic, you should skim the chapter; Linux is complex enough that there are often multiple ways to accomplish a task, so you may learn something even if you're already competent in an area.

Bonus CD-ROM Contents

This book comes with a CD-ROM that contains several additional elements. Items available on the CD-ROM include the following:

Sybex Test Engine All the questions in this book appear on the CD-ROM—including the 30-question assessment test at the end of this introduction and the 240 questions that make up the 20-question review question sections for each chapter. In addition, there are two 50-question bonus practice exams, exclusive to the CD.

Electronic “Flashcards” The CD-ROM includes 120 questions in “flashcard” format (a question followed by a single correct answer). You can use these to review your knowledge of the LPIC exam objectives.

Glossary as a PDF File The book's glossary is available as a fully searchable PDF that runs on all Windows platforms as well as on Linux.

images The CD-ROM is compatible with both Linux and Windows.

Conventions Used in This Book

This book uses certain typographic styles in order to help you quickly identify important information and to avoid confusion over the meaning of words such as on-screen prompts. In particular, look for the following styles:

  • Italicized text indicates key terms that are described at length for the first time in a chapter. (Italics are also used for emphasis.)
  • A monospaced font indicates the contents of configuration files, messages displayed at a text-mode Linux shell prompt, filenames, text-mode command names, and Internet URLs.
  • Italicized monospaced text indicates a variable—information that differs from one system or command run to another, such as the name of a client computer or a process ID number.
  • Bold monospaced text is information that you're to type into the computer, usually at a Linux shell prompt. This text can also be italicized to indicate that you should substitute an appropriate value for your system. (When isolated on their own lines, commands are preceded by non-bold monospaced $ or # command prompts, denoting regular user or system administrator use, respectively.)

In addition to these text conventions, which can apply to individual words or entire paragraphs, a few conventions highlight segments of text:

images A note indicates information that's useful or interesting but that's somewhat peripheral to the main text. A note may be relevant to a small number of networks, for instance, or it may refer to an outdated feature.

images A tip provides information that can save you time or frustration and that may not be entirely obvious. A tip may describe how to get around a limitation or how to use a feature to perform an unusual task.

images Warnings describe potential pitfalls or dangers. If you fail to heed a warning, you may end up spending a lot of time recovering from a bug, or you may even end up restoring your entire system from scratch.

Sidebars

A sidebar is like a note but longer. The information in a sidebar is useful, but it doesn't fit into the main flow of the text.

Real-World Scenarios

A real-world scenario is a type of sidebar that describes a task or example that's particularly grounded in the real world. This may be a situation I or somebody I know has encountered, or it may be advice on how to work around problems that are common in real, working Linux environments.

EXERCISES

An exercise is a procedure you should try on your own computer to help you learn about the material in the chapter. Don't limit yourself to the procedures described in the exercises, though! Try other commands and procedures to really learn about Linux.

The Exam Objectives

Behind every computer industry exam, you can be sure to find exam objectives—the broad topics in which exam developers want to ensure your competency. The official LPI objectives for the LPIC 201 and 202 exams are listed here. (They're also printed at the start of the chapters in which they're covered.)

images Exam objectives are subject to change at any time without prior notice and at LPI's sole discretion. Please visit the LPIC Certification page of LPI's Web site (http://wiki.lpi.org/wiki/LPIC-2_Objectives) for the most current listing of exam objectives.

The objectives list at the beginning of this book and at the beginning of each chapter includes only the basic objective titles. You should consult the complete LPI exam list to learn what commands, files, and procedures you should be familiar with before taking the exam.

The LPIC-201 Exam

Topic 201: Linux Kernel

  • 201.1 Kernel components
  • 201.2 Compiling a kernel
  • 201.3 Patching a kernel
  • 201.4 Customize, build, and install a custom kernel and kernel modules
  • 201.5 Manage/query kernel and kernel modules at runtime

Topic 202: System Startup

  • 202.1 Customizing system startup and boot processes
  • 202.2 System recovery

Topic 203: Filesystem and Devices

  • 203.1 Operating the Linux filesystem
  • 203.2 Maintaining a Linux filesystem
  • 203.3 Creating and configuring filesystem options
  • 203.4 udev device management

Topic 204: Advanced Storage Device Administration

  • 204.1 Configuring RAID
  • 204.2 Adjusting storage device access
  • 204.3 Logical Volume Manager

Topic 205: Networking Configuration

  • 205.1 Basic networking configuration
  • 205.2 Advanced network configuration and troubleshooting
  • 205.3 Troubleshooting network issues
  • 205.4 Notify users on system-related issues

Topic 206: System Maintenance

  • 206.1 Make and install programs from source
  • 206.2 Backup operations

Topic 207: Domain Name Server

  • 207.1 Basic DNS server configuration
  • 207.2 Create and maintain DNS zones
  • 207.3 Securing a DNS server

The LPIC-202 Exam

Topic 208: Web Services

  • 208.1 Implementing a web server
  • 208.2 Maintaining a web server
  • 208.3 Implementing a proxy server

Topic 209: File Sharing

  • 209.1 SAMBA server configuration
  • 209.2 NFS server configuration

Topic 210: Network Client Management

  • 210.1 DHCP configuration
  • 210.2 PAM authentication
  • 210.3 LDAP client usage

Topic 211: E-Mail Services

  • 211.1 Using e-mail servers
  • 211.2 Managing local e-mail delivery
  • 211.3 Managing remote e-mail delivery

Topic 212: System Security

  • 212.1 Configuring a router
  • 212.2 Securing FTP servers
  • 212.3 Secure shell (SSH)
  • 212.4 TCP Wrapper
  • 212.5 Security tasks

Topic 213: Troubleshooting

  • 213.1 Identifying boot stages and troubleshooting bootloaders
  • 213.2 General troubleshooting
  • 213.3 Troubleshooting system resources
  • 213.4 Troubleshooting environment configurations
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset