CentOS System Administration Essentials

Book description

Become an efficient CentOS administrator by acquiring real-world knowledge of system setup and configuration

In Detail

CentOS is widely respected as a very powerful and flexible Linux distribution, and it can be used as a web server, file server, FTP server, domain server, or a multirole solution. It is designed to handle the more demanding needs of business applications such as network and system administration, database management, and web services. CentOS is self-sufficient and fast while working, with the added benefit of global acceptance as a large number of the world's web servers run on it.

This book not only concentrates on the basics, but also supplements your existing knowledge on subject areas that are important in the Enterprise market, such as directory services, security configuration management, and web-based architecture. By the end of this book, you will be able to manage an Enterprise Linux network focused on management-centralized configuration, user management, and filesystem enhancements by covering everything from the latest filesystem advances with BTRFS through to learning about the new web server on the block - Nginx.

What You Will Learn

  • Conquer the command line using shortcuts in the shell and within the editor Vim
  • Analyze the booting of CentOS utilizing MBR, GRUB, and Plymouth
  • Gain an understanding of the filesystem structure of hard links, inodes, and data using stat and ls
  • Manage your software installations with YUM
  • Handle your services as they begin to migrate from System V scripts
  • Establish centralized account information using openLDAP directory services
  • Centralize the configuration management of CentOS using Puppet, enabling updates from Puppet Master to be distributed to the clients

Table of contents

  1. CentOS System Administration Essentials
    1. Table of Contents
    2. CentOS System Administration Essentials
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the color images of this book
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Taming vi
      1. CLI trickery – shortcuts that you will love
      2. Vim and vi
      3. Getting the .vimrc setup the way you like
      4. Search and replace
      5. Learning to remove extraneous comments from a file with a few deft key strokes
      6. Summary
    9. 2. Cold Starts
      1. The GRUB and MBR
      2. When is the root filesystem not the root filesystem?
        1. Editing stanzas in GRUB
        2. Adding a root entry to a stanza
        3. Adding a kernel entry to a stanza
        4. Adding an initrd entry to a stanza
      3. Working on the GRUB console
      4. Protecting the GRUB menu with passwords
      5. Boot splashing with plymouth
        1. Applying different themes
      6. Summary
    10. 3. CentOS Filesystems – A Deeper Look
      1. A magician's secret
        1. Hard links
        2. Symbolic links
      2. Special permissions
        1. The SUID bit
        2. The SGID bit
        3. The sticky bit
      3. Naming your pipes
      4. Understanding the command stat
        1. The last access time
        2. The last modified time
        3. The last changed time
      5. Enterprise filesystem shootout
        1. What BTRFS has to offer
        2. Installing BTRFS
        3. Creating a BTRFS filesystem
        4. Expanding a BTRFS filesystem
        5. Volume management with BTRFS
        6. Balancing the filesystem
        7. Adding an entry to /etc/fstab
        8. Creating an RAID1 mirror
      6. Using BTRFS snapshots
      7. Summary
    11. 4. YUM – Software Never Looked So Good
      1. Managing software installation with RPM files
      2. Creating your own RPM file
        1. Creating the Plymouth theme
          1. tup.plymouth
          2. tup.script
        2. Creating the theme RPM
        3. Using YUM
        4. YUM plugins
      3. Creating a YUM Repository
        1. /etc/yum.repos.d/
      4. Summary
    12. 5. Herding Cats – Taking Control of Processes
      1. Managing services with Upstart
      2. Creating your own Upstart script
      3. Managing processes
        1. Using the pgrep command
        2. Using the pstree command
        3. Using the pkill command
        4. Using the pmap command
      4. Summary
    13. 6. Users – Do We Really Want Them?
      1. Managing public and private groups
        1. Linux groups
        2. Adding users to groups
        3. Evaluating private group usage
      2. Getent
      3. Quotas
        1. Setting quotas
      4. Scripting user creation
      5. Summary
    14. 7. LDAP – A Better Type of User
      1. LDAP concepts
      2. Installing 389-ds
        1. Configuring DNS or hostname records
        2. Setting TCP keepalives
        3. Setting file descriptors
        4. Creating the directory server user and group
        5. The EPEL repository
        6. Installing and configuring 389-ds
        7. Testing the installation
      3. LDAP user account management
        1. Adding users using the GUI console
        2. Adding users from the command line
      4. LDAP authentication
      5. Summary
    15. 8. Nginx – Deploying a Performance-centric Web Server
      1. Installing and configuring Nginx
        1. Installing Nginx
        2. Configuring Nginx
        3. Configuring a 404 Document Not Found Error page
      2. Installing PHP
      3. Installing MySQL
      4. Create dynamic web content
      5. Summary
    16. 9. Puppet – Now You Are the Puppet Master
      1. Installing the Puppet master
        1. Configuring the firewall
        2. DNS
        3. Network Time Protocol
        4. The Puppet lab repository
      2. Puppet resource
      3. Managing packages, services, and files
        1. Classes
        2. Resource definition
        3. Puppet facts
        4. Using include
        5. Creating and testing manifests
        6. Enrolling remote puppet agents
      4. Summary
    17. 10. Security Central
      1. Understanding PAM configuration files
        1. Type
        2. Control
        3. The module path
        4. Module arguments
      2. Limits of PAM
        1. Domain
        2. Type
        3. Item
      3. SELinux
        1. Reading the current SELinux mode
        2. Setting the SELinux mode
        3. Preventing mode changes from the command line
        4. Understanding SELinux contexts
        5. Troubleshooting SELinux
      4. Hardening Linux
        1. Password auditing
        2. Preparing a password file
        3. Cracking passwords
        4. Weakening the algorithm
        5. Hardening the password
      5. Summary
    18. 11. Graduation Day
      1. Securing remote access to your system
        1. The SSH public key
        2. Analyzing the risks of default settings
        3. Populating the keystore
        4. Public key authentication
        5. Root logins
        6. Conclusion
      2. Best practices of OpenLDAP
      3. Best practices of Nginx
      4. Mastering Puppet
      5. What's new in CentOS 7
        1. Locale
        2. Time and date information
        3. Managing services
        4. Additional ways to repair your machine than just using the single user mode
        5. Remote management
        6. Systemd and nonstandard subcommands
        7. The Samba 4.1 package
        8. Filesystem changes
        9. Password policies
      6. Summary
    19. Index

Product information

  • Title: CentOS System Administration Essentials
  • Author(s): Andrew Mallett
  • Release date: November 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781783985920