Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
CentOS 6 Linux Server Cookbook
CentOS 6 Linux Server Cookbook

CentOS 6 Linux Server Cookbook: 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.

eBook
$22.99 $32.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

CentOS 6 Linux Server Cookbook

Chapter 2. Configuring CentOS

In this chapter, we will cover:

  • Changing the time zone and updating the hardware clock

  • Synchronizing the system clock with NTP

  • Setting a static IP address

  • Binding multiple IP addresses to a single Ethernet device

  • Bonding two Ethernet devices to increase bandwidth and improve performance

  • Changing the hostname and resolving a fully qualified domain name

  • Switching SELinux off

  • Disabling the IPv6 module

Introduction


This chapter is a collection of recipes that covers the practice of priming your server by changing the time zone and updating the hardware clock; synchronizing the system clock with NTP; setting a static IP address; binding multiple IP addresses to a single Ethernet device; bonding two Ethernet devices to increase bandwidth and improve performance; changing the hostname and resolving a fully qualified domain name; switching SELinux off; and disabling the IPv6 module.

Changing the time zone and updating the hardware clock


In this recipe we will introduce the concept of TZDATA in order that we can learn how to change a server's time zone and update the hardware clock.

Over the lifetime of your server, the need to change the time and date for one or more users may not happen very often but when it does the process of managing this modification can seem to be quite complicated. You may want to make this change for any number of reasons, you can even use this approach to implement an independent time zone solution for different users, but regardless as to the reason why, it is the purpose of this recipe to illustrate a series of best practices that can be applied to your server and provide you with the solution you need.

Getting ready

To complete this recipe, you will require a working installation of the CentOS 6 operating system with root privileges, a console-based text editor of your choice, and a connection to the Internet to facilitate the download...

Synchronizing the system clock with NTP


In this recipe, we will learn how to synchronize the system clock with an external time server using NTP.

Time remains an essential tool for your server because every aspect of managing, securing, running, and debugging a network involves determining when events happen or are about to take place. From the need to time stamp documents, e-mails, logfiles, or by simply interacting with shared devices and services, everything on your server is dependent on maintaining an accurate system clock and it is the purpose of this recipe to show you how to achieve this with the Network Time Protocol (NTP).

Getting ready

To complete this recipe you will require a working installation of the CentOS 6 operating system with root privileges, a console-based text editor of your choice, and a connection to the Internet to facilitate the download of additional packages.

How to do it...

If you are using the minimal installation recommended by this book, then the Network Time...

Setting a static IP address


In this recipe we will learn how to configure a static IP address for a new or existing CentOS server.

While a dynamically assigned IP address or DHCP reservation may be fine for most desktop and laptop users, if you are setting up a server it is often the case that you will require a static IP address. From web pages to e-mail, databases to file sharing, a static IP address will become a permanent location from which your server will deliver a range of applications and services, and it is the intention of this recipe to show you how easily it can be achieved.

Getting ready

To complete this recipe, you will require a working installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.

How to do it...

For the purpose of this recipe, you will be able to find all the relevant files in /etc/sysconfig/network-scripts/. But before making any changes to your original configuration, it is always a good idea to create a...

Binding multiple IP addresses to a single Ethernet device


In this recipe we will learn how to bind multiple IP addresses to a single Ethernet device in order to provide greater networking functionality to a new or existing CentOS server.

There are many advantages to using a static IP address, but combining this with the ability to use more than one will present you with a new range of configuration options. Clearly, the benefit of circumventing the need to purchase and install multiple Ethernet devices is obvious, but this approach will not only enable you to run multiple servers and websites, it can also enable you to create a private LAN using a local IP and have the alias hold your Internet IP. So with that in mind, it is the purpose of this recipe to show you how easily an IP-rich server can be achieved.

Getting ready

To complete this recipe, you will require a working installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice. It...

Bonding two Ethernet devices to increase bandwidth and provide redundancy


In this recipe we will learn how to combine the features of multiple network interfaces as a single device in an arrangement known as channel bonding with the intention of improving the overall performance of your server.

If your server has more than one Ethernet device, the process of channel bonding allows you to bind these interfaces together into a single channel in order to increase bandwidth and provide redundancy. It may sound complicated and finding the best settings will require some experimentation on your behalf or the support of specific network-based hardware, but it is the purpose of this recipe to provide a suitable starting point that enables you to take control and discover a network configuration that suits you best.

Getting ready

To complete this recipe, you will require a working installation of the CentOS 6 operating system with root privileges, a console-based text editor of your choice, and a connection...

Changing the hostname and resolving a fully qualified domain name


In this recipe we will learn how to change the hostname and resolve the Fully Qualified Domain Name (FQDN) of your server.

The process of setting the hostname is typically associated with the installation process but on many occasions there comes a time when the name used is either incorrect for a technical reason or you just don't like it any more. For some people the name of the server lacks importance, but for many others, a good server demands a good name and so it is the purpose of this recipe is to show you how quickly the hostname can be changed with the intention to revise and resolve the resulting fully qualified domain name.

Getting ready

To complete this recipe you will require a working installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.

How to do it...

To begin this recipe we shall start by accessing the system as root and opening the following file in...

Switching SELinux off


In this recipe we will consider the need to switch Security-Enhanced Linux (SELinux) off in order to ease the process of installing packages and managing your server.

Security-Enhanced Linux is a very robust security mechanism that is enabled by default. It is designed to improve the security of your server but on occasion it has been the case that you have been required to disable it in order to install a new package or to speed up the process of server management. This is not a decision you will make in haste, but it is the purpose of this recipe to show you how this can be achieved and this solution can be seen as both, temporary or permanent, depending on your needs.

Getting ready

To complete this recipe, you will require a working installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.

How to do it...

SELinux has three enforcement levels and in this recipe we will show you how to make a permanent change to the...

Disabling the IPv6 module


In this recipe we will consider the need to disable the IPv6 module on a CentOS server.

IPv6 was designed to solve the problems of IPv4, but it is an accepted fact that not everyone uses it and not all hardware supports it. The deployment of IPv6 is accelerating but for this reason it is also a possibility that some environments will expect that IPv6 has been disabled on the server. This is certainly not unusual, and in these circumstances, you may find that disabling IPv6 will not only speed up networking, but it will also serve to reduce an administrative overhead and improve your current level of security.

Getting ready

To complete this recipe you will require a working installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.

How to do it...

Before we start, you should be aware that this recipe is not advised if you are using or you are intending to use any IPv6-dependant features such as Bonding, Postfix,...

Left arrow icon Right arrow icon

Key benefits

  • 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.

Description

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.

Who is this book for?

"CentOS 6 Linux Server Cookbook"  is for those professionals, students and enthusiasts who want a down-to-earth or hands-on approach to installing, configuring and running a Centos 6 server. Where a new user may experience this book as a series of solutions, a more experienced user will find a basis on which you can develop your existing skills. So rest assured, there is something for everyone and regardless of your current level of experience, if you are interested in using CentOS 6, then this is the book that offers the insight you need to move forward and master your server.

What you will learn

  • Installing and validating CentOS 6 and adding a desktop environment
  • Configuring CentOS to allow you to manage time and multiple IP addresses
  • Managing log files by using logrotate, memory usage and databases
  • Managing Packages will show you how to manage the system with the Yum package manager
  • Administering CentOS through creating new administrative users and creating customized email reports
  • Securing your shell environment, ascending user privileges and building firewalls to prevent outside attacks
  • Building networks, domains and implementing the Apache web server.
  •  

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 18, 2013
Length: 374 pages
Edition : 1st
Language : English
ISBN-13 : 9781849519038
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Apr 18, 2013
Length: 374 pages
Edition : 1st
Language : English
ISBN-13 : 9781849519038
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 169.97
CentOS 6 Linux Server Cookbook
$54.99
Advanced Penetration Testing for Highly-Secured Environments: The Ultimate Security Guide
$65.99
Linux Shell Scripting Cookbook, Second Edition
$48.99
Total $ 169.97 Stars icon

Table of Contents

11 Chapters
Installing CentOS Chevron down icon Chevron up icon
Configuring CentOS Chevron down icon Chevron up icon
Working with CentOS Chevron down icon Chevron up icon
Managing Packages with Yum Chevron down icon Chevron up icon
Securing CentOS Chevron down icon Chevron up icon
Working with Samba Chevron down icon Chevron up icon
Working with Domains Chevron down icon Chevron up icon
Working with Databases Chevron down icon Chevron up icon
Providing Mail Services Chevron down icon Chevron up icon
Working with Apache Chevron down icon Chevron up icon
Working with FTP Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(10 Ratings)
5 star 70%
4 star 0%
3 star 20%
2 star 10%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Shawn C Jun 22, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been using Linux along time and this as someone said earlier is well worth the money.I found a lot clear and concise useful tips and short cuts that has already help me in my job.Spend the money give the author some love.
Amazon Verified review Amazon
L. Fesenden May 28, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
OH YEAH! Another book review, and one on one of my favorite Linux distributions too!Pakt Pub contacted me to do a review on their new CentOS 6 book, and boy was I excited at the chance. First of all, I generally like Pakt Pub`s books, and second I really dig CentOS! Even better is this is all about using CentOS as a server, and I just happen to use quite a lot of CentOS as my preferred home server platform. And why, you may ask? Well, it very closely mirrors another enterprise level Linux that I use heavily in my professional environment. It's good stuff.I found this book particularly reminiscent of a few books I studied from to get my RedHat certs. There is a good bit of material in there - most things that a budging server administrator would want to know how to do, and it is formatted in a "recipe" format, which makes it fairly easy for readers to piece mail through if they are looking to do something specific in a hurry. I really like that kind of format because, lets face it, most of us have precious little time these days and reading line by line though technical materials is not usually high on our lists of things to spend our time on. Thankfully, as I said before, it's easy to get to pertinent info here, and the writing is not really too dry or overly technical to begin with.The book starts right out where it should by helping you not only download CentOS (for free of course), but also gives you example and instruction on several different installation methods. This is particularly useful for more advanced users because there are significant time savers to be had by using minimal and text method installs that most Linux books leave out. From there we are off to recipes for basic configuration changes like changing SELinux, IP addresses, time zone settings and the like. This is followed by a bunch of basic administrative info like using cron, starting services, package management and helping to secure your environment, before really focusing on what I like to refer to as the big 5 applications: Samba, Bind, MySQL, Mail and Apache. These are all covered in their own chapters, giving them plenty of room to address common specific topics and options. The only thing I found at all out of place is the last chapter which deals with FTP. I might be a little jilted here but it has been my experience that ftp usage is being deprecated in most places. But for those of you who do actually use it, this book covers setting up and using VSFTP, which can be daunting to get going without a little well written help, which this chapter *does* provide.All in all, I find this a well written book covering what most system admins would really be looking for info on. In fact, this is one I really wish they had sent me in a paper edition so I could more easily loan it around to friends and coworkers whom, I am sure would find it helpful! At only $25.50 for the digital edition it would be silly for anyone new or unfamiliar with CentOS not to grab a copy before diving in. It will surely save you some time and aggravation and provide you with a good reference for future service additions and changes. It gets a nice thumbs up from me!CentOS 6 Linux Server Cookbook
Amazon Verified review Amazon
Robert Lupinek May 28, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
In my 12 years working with Linux I find myself constantly taking notes on the quickest way to do something in order to save myself the hassle of retracing my research steps.Within the pages of the CentOS 6 Linux Server Cookbook I found many of the tips and tricks already listed and better explained than I ever could have come up with.This book has great foundational knowledge that acts as a simple launch pad that quickly builds to some more obscure and interesting topics. My personal favorite is the initial introduction and implementation of fail2ban. That is an utility that I have intended to delve into for some time, so I was quite pleased to find it listed in the table of contents, and I was even more pleased to with the recipe.I am definitely keeping this book in ready reach.
Amazon Verified review Amazon
Z. Nop Jul 11, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been lucky enough to get my hands on this book at the right time, just a few weeks prior my RHCE course and exam. I have spent a fair bit of time on Chapter 9 - Mail Services and Chapter 10 - Apache CGI/SSL, areas in which I was pretty shaky prior the exam. I believe this book has actually helped me to understand these areas better & pass the exam.It is well sectioned and each time I thought "hmm this isn't there", I came to the "There's more" section at the end of chapter only to find what I was looking for!It's funny how everyone says "just Google it", unfortunately often it is quite difficult to get up to date and correct information about a whole topic - in one place. This great book accomplishes that for me and I would recommend it especially to all beginner to intermediate Linux users, who want to understand the whole topic thoroughly. Highly suggested to all aspiring RHCSA & RHCE students as this book pretty much covers all the RHCSA/RHCE topics even in more detail than the Red Hat courses themselves. CentOS 6 Linux Server Cookbook
Amazon Verified review Amazon
V. B. Rao Dec 07, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've read a handful of recipes and so far have learnt quite a bit. I'm not a newbie by any means.. The author has a very clear, consistent style, and he covers relevant scenarios /recipes.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.