Book Image

CentOS 6 Linux Server Cookbook

By : Jonathan Hobson
Book Image

CentOS 6 Linux Server Cookbook

By: Jonathan Hobson

Overview of this book

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 (18 chapters)
CentOS 6 Linux Server Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Finishing the installation process with Firstboot


In this recipe we will learn how to finalize the installation process by enabling Firstboot, a simple application that enables you to manage the first-time installation of your server in a slightly less complicated way.

Firstboot can function in both the console and desktop environments and its intention is to activate the Setup agent. It has a single purpose that is often considered to be an optional extra, it isn't always going to be necessary, but for beginners and experienced users alike, it does provide instant access to a tried and tested process that will enable you to finalize the installation of any CentOS server in a fast and efficient manner.

Getting ready

To complete this recipe, you will require a minimal installation of the CentOS 6 operating system with root privileges and a connection to the Internet in order to facilitate the download of additional packages.

How to do it...

On a minimal installation Firstboot is not installed by default and for this reason we will begin this recipe by installing the necessary package and its related dependencies.

  1. To do this, log in as root and type the following command:

    yum –y install firstboot
    
  2. When the installation is finished, simply enable the package to run at boot by typing the following command:

    chkconfig firstboot on
    
  3. At a convenient time, simply reboot the system to access Firstboot by typing:

    reboot
    
  4. On a successful reboot, you will be presented with the Firstboot application. To begin, simply use the Up and Down arrow keys in conjunction with the Tab key to jump between the elements on the screen. Make the appropriate changes to your system and use the Return key to confirm your choices. On certain screens you are given the opportunity to use the Space bar in order to nominate or activate a particular setting. Choose Quit to exit Firstboot at any time.

  5. Having quit Firstboot, you will be invited to access your server in the usual way but remember, any permanent changes to your security settings may not take effect until you reboot your server. So if this is the case, return to your console and type:

    reboot
    

How it works...

Firstboot is a simple package with the sole purpose of activating the Setup agent. It is not intended to be complicated and for this reason you probably found that it was both easy to install and even easier to activate.

So what did we learn from this experience?

We start the recipe by installing the necessary packages. In this case, the target package was called Firstboot and so we issued the following command to the server:

yum –y install firstboot

The system then proceeded to install a number of different dependencies that includes many setup utilities, but as Firstboot runs as a service, to access these utilities you should ensure that the service is running. So our next step was to return to the console and type:

chkconfig firstboot on

Note

If you prefer to ensure that Firstboot will only launch with the desktop environment, simply modify the preceding command to read as follows:

chkconfig --level 5 firstboot on

Having done this, we then proceeded to reboot the system like so:

reboot

On a successful reboot, you are then invited to run the various tools associated with this service. Of course, a discussion regarding the actual settings you should employ is a subject we will return to later on in this book, but having successfully completed this recipe you now understand that this small addition does have specific uses that serve to simplify the process of finalizing the installation of any CentOS server.

On a console-based server, the act of running Firstboot will enable you to run a screen by screen setup process that covers the main aspects of a first-time installation. For experienced users, this can prove to be a welcome reminder, but for new users Firstboot can prove to be a useful introduction to CentOS by offering a one-stop, tried and tested starting point. It may not be a necessary feature, but this small tool does go some way to make CentOS a very easy experience.

There's more...

As the name implies, Firstboot will only run once. However, should you ever wish to return to this screen in the future, simply log in to your server as the root user and ensure the service is set to run at boot by typing:

chkconfig firstboot on

Now remove the following file by typing:

rm /etc/sysconfig/firstboot

You will be asked if removing this file is intended, so type y (yes) and press the Return key to confirm your decision like so:

rm: remove regular file 'etc/sysconfig/firstboot' ? y

Having done this Firstboot is now active and will be ready to run on your next reboot.