10 years ago, Debian was not regarded as an easy-to-install distribution, and had a negative aura of exclusivity around it. And while the installation process is fairly simple, you would guess it's a pain to repeat it as is for tens or hundreds of servers.
There are several options for you to make the installation scale:
Rolling out your own installation media
Installing via the network
Installing via the imaging server
Preseeding the installation
Rolling out your own installation media (remastering) involves knowledge of APT repositories, ISO 9660 structures, and preseeding. The purpose of remastering is basically adding the packages you need and your initial configuration decisions, putting them together on a media that will save time during installation. As all these steps are beyond the scope of this book, we'll point you to helpers such as live-scripts and UCK.
The second option, installing via network, is covered in detail in the Debian Installation Guide and might save some time as per running around the datacenter with optical media. As per imaging servers, SystemImager and Clonezilla are popular solutions, especially when the hardware matches in terms of disk sizes, and so on. The idea here is to install the system first, configure it, and then create an image to replicate to other servers. With imaging, be aware that you need to change the hostname—in
/etc/hostname using the
hostname command—and any other system-specific data.
Preseeding is one of the faster ways to save time during Debian installation. As with remastering, you install one system, and you extract the answers to the configuration prompts handled through the
debconf program in order for them to be reused in a new installation.
You can also create your own preseed files by specifying as many answers as you need using standard tools:
apt-get install debconf-utils debconf-get-selections –installer >preseed.cfg
Inspect the contents of this file with your favorite editor (
editor preseed.cfg). You will find that questions that were asked on the installer are preceded by # and your answers are below. Some answers, such as password, are not included. Also, there are a lot of answers that you don't even remember to be asked about—those are defaults. Finally, you will notice that there is no answer for your partitioning elections, on the basis that you might have different servers with different hardware and different storage to address.
Once you have a preseed file that works, instead of selecting the Install option of Debian, you can choose Advanced options, and then Automated install to specify the URL of your preseed file. Probably, you will find the easiest way to do this is to serve it from another web server.
You can also feed broader choices, not only install-time choices, using
–installerflag. It is useful to capture these choices at the end of your configuration process (that is, when you're done with this book).
The output of these tools can be fed back to the installer or to the system at any moment with the preceding steps. Notice that there are some system aspects that are not necessarily controlled by
debconf options. For example, the contents of your Apache or MySQL configuration files are mostly edited manually and don't get registered in
Debian's online documentation and reference manual contain deep references to several preseeding options as well as large preseeding files that you can edit: