CentOS 6 Linux Server Cookbook

Book description

An all-in-one guide to installing, configuring, and running a Centos 6 server. Ideal for newbies and old-hands alike, this practical tutorial ensures you get the best from this popular, enterprise-class free server solution.

  • Delivering comprehensive insight into CentOS server with a series of starting points that show you how to build, configure, maintain and deploy the latest edition of one of the world’s most popular community based enterprise servers.
  • Providing beginners and more experienced individuals alike with the opportunity to enhance their knowledge by delivering instant access to a library of recipes that addresses all aspects of CentOS server and put you in control.
  • Giving you immediate access to a thriving knowledge base that illustrates just how quickly you can master CentOS server with a whole host of tricks of the trade thrown in for good measure.

In Detail

CentOS is a community-based enterprise class operating system and this book will provide a series of practical solutions that will not only show you how to install and maintain CentOS as a server, but to explore this well-known Linux distribution with the intention of tackling many common issues by providing some tricks of the trade in order to simplify the task of building a server.

"CentOS 6 Linux Server Cookbook" is a practical guide to installation, configuration, administration, and maintenance. This is a one-stop-shop to all things CentOS, so regardless as to whether you need a mail server, web server, database server, domain server or a file sharing platform, this book provides a comprehensive series of starting points that will give you direct access to the inner workings of this open source, community-based enterprise server.

"CentOS 6 Linux Server Cookbook" is a practical guide to the complete installation, configuration, administration, and maintenance of one of the world’s most popular community-based enterprise servers.

From installation to configuration, this book of recipes will take you on a journey to explore inner workings of CentOS server. Within this book you will learn how to install CentOS in variety of settings, enhance your installation with the correct tools of the trade and prepare your server to fulfil almost any role you could ever need.

By discovering more about time, networking, package management, system management and security, this book will serve to show you how to get the very best from this freely available, open source server by presenting a series of solutions that will enable you to master the art of building your very own web, database, mail, domain name, file sharing services.

CentOS 6 Linux Server Cookbook is a hands-on approach to installing, configuring and managing this ever popular community based enterprise server. By taking you from installation to customization this book will serve all Linux professionals and enthusiasts alike by providing you with a practical guide to using CentOS as a world-class server solution that is capable of delivering your mail, web, ftp, domain and file sharing services.

Table of contents

  1. CentOS 6 Linux Server Cookbook
    1. Table of Contents
    2. CentOS 6 Linux Server Cookbook
    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. Errata
        2. Piracy
        3. Questions
    8. 1. Installing CentOS
      1. Introduction
      2. Downloading CentOS and confirming the checksum on a Windows desktop
        1. Getting ready
        2. How to do it...
        3. How it works…
        4. See also
      3. Performing an installation of CentOS using the graphical installer
        1. Getting ready
        2. How to do it...
        3. How it works…
        4. See also
      4. Running a netinstall over HTTP
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      5. Installing CentOS in Text Mode and building a minimal installation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Re-installing the boot loader
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Updating the installation and enhancing the minimal install with additional administration and development tools
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      8. Finishing the installation process with Firstboot
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      9. Adding the GNOME desktop environment, changing the runlevel, and installing additional software
        1. Getting ready
        2. How to do it...
        3. How it works...
    9. 2. Configuring CentOS
      1. Introduction
      2. Changing the time zone and updating the hardware clock
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Linking time and location
      3. Synchronizing the system clock with NTP
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Synchronizing multiple machines
          2. Modifying the logfile's location
          3. Fudging time
        5. See also
      4. Setting a static IP address
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Substituting the Netmask value with a prefix
          2. Finding your HWADDR/MAC address
      5. Binding multiple IP addresses to a single Ethernet device
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      6. Bonding two Ethernet devices to increase bandwidth and provide redundancy
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      7. Changing the hostname and resolving a fully qualified domain name
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      8. Switching SELinux off
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      9. Disabling the IPv6 module
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    10. 3. Working with CentOS
      1. Introduction
      2. Creating an administrative user and becoming root with the switch user command
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Introducing mailx and forwarding the root's e-mail to an external e-mail address
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Automating tasks with cron
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      5. Synchronizing files and directories with rsync and working towards a full system backup with cron
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      6. Issuing customized e-mail reports with Mutt
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      7. Using logrotate to manage logfiles
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      8. Extending log rotation by adding NTP to logrotate
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Using chkconfig to enable a custom service at boot
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      10. Evaluating current memory usage with the free and top commands and clearing the memory cache
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    11. 4. Managing Packages with Yum
      1. Introduction
      2. Updating the system with YUM
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      3. Cleaning the YUM cache
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      4. Automating Yum updates with Yum-cron
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      5. Installing packages with YUM
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      6. Removing packages with YUM
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      7. Finding packages with YUM
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      8. Installing Yum Priorities to support additional repositories
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      9. Enhancing CentOS with the EPEL and Remi repositories
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
    12. 5. Securing CentOS
      1. Introduction
      2. Escalating user privilege with sudo
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Change the default timeout
      3. Hardening the secure shell environment
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Changing the SSH port number of your server
          2. Limiting SSH access by user or group
        5. See also
      4. Configuring a firewall and working with IPTables
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Allowing an IP address
          2. Banning an IP address
        5. See also
      5. Protecting SSH with fail2ban
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      6. Preventing dictionary-based attacks with DenyHosts
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Unblocking an IP address
        5. See also
      7. Running antivirus scans with ClamAV
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also...
    13. 6. Working with Samba
      1. Introduction
      2. Configuring Samba as a standalone server and enabling home directories
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Disable printing support in Samba
          2. Relaxing the rules for SELinux
          3. Opening the firewall
          4. Assigning the master browser
        5. See also
      3. Adding, deleting, and disabling a Samba user
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Providing a network recycle bin for Samba
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      5. Hiding folders and files with Samba
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      6. Creating a custom share folder for a specific user or a group of users
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Controlling access and enabling a write list for specific users or groups
          2. Enabling guest-only access to a custom share folder
        5. See also
    14. 7. Working with Domains
      1. Introduction
      2. Building a caching-only nameserver with BIND
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Enabling access to a DNS server from behind a firewall
          2. Cleaning expired records
        5. See also
      3. Writing zone files for BIND
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      4. Adding zones to BIND and configuring a nameserver
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      5. Deploying a local nameserver with dnsmasq
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Logging events with dnsmasq and combining this with logrotate
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      7. Enabling domain name wildcards with dnsmasq
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      8. Hardening BIND with chroot and providing better security measures
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
    15. 8. Working with Databases
      1. Introduction
      2. Installing and hardening MySQL server with mysql_secure_installation
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      3. Creating a MySQL database, adding a MySQL user, and assigning user privilege from the command line
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Reviewing and revoking permissions or dropping a user
        5. See also
      4. Installing PostgreSQL, adding a user, and creating your first database
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Connecting to PostgreSQL
          2. Accessing a PostgreSQL database using psql
          3. Creating a copy of a database in PostgreSQL
        5. See also
      5. Configuring remote access to PostgreSQL
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
    16. 9. Providing Mail Services
      1. Introduction
      2. Enabling a domain-wide Mail Transport Agent (MTA) and testing your SMTP configuration with Telnet
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      3. Building a local POP3/SMTP server with Postfix and Dovecot
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Setting up e-mail software
        5. See also
      4. Closing the open relay, enabling SMTP authentication and dealing with Spam by configuring SASL, and enabling Postfix header and body checks
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Setting up e-mail software with SMTP authentication
        5. See also
      5. Using Postfix and Dovecot to serve e-mails across virtual domains
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Setting up a catch-all e-mail address for a virtual domain
        5. See also
    17. 10. Working with Apache
      1. Introduction
      2. Installing the Apache web server with CGI/Perl, PHP, configuring mod_perl, and preparing httpd for a production environment
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Running a CGI/Perl script
          2. Activating ModPerl::PerlRun
        5. See also
      3. Adding a secure connection to the Apache web server by creating a self-signed SSL certificate using OpenSSL
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      4. Hosting peers by enabling user directories on the Apache web server and troubleshooting suexec
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Reinstating suexec
        5. See also
      5. Configuring Apache name-based virtual hosting
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      6. Working with publishing directories, vhosts.d, error documents, directives, and the rewrite rule for virtual hosting with the Apache web server
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
    18. 11. Working with FTP
      1. Introduction
      2. Building a basic FTP service by installing and configuring VSFTP
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Changing the default time-out
          2. Banning a user from the FTP service
          3. Customizing the banner
        5. See also
      3. Providing a secure connection to VSFTP with SSL/TLS using OpenSSL encryption
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      4. Implementing virtual users and directories in standalone mode on VSFTP
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      5. Providing an anonymous upload and download or download only FTP server with VSFTP
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    19. Index

Product information

  • Title: CentOS 6 Linux Server Cookbook
  • Author(s): Jonathan Hobson
  • Release date: April 2013
  • Publisher(s): Packt Publishing
  • ISBN: 9781849519021