Book Image

Mastering Linux Network Administration

By : Jay LaCroix
Book Image

Mastering Linux Network Administration

By: Jay LaCroix

Overview of this book

Linux is everywhere. Whether you run a home office, a small business, or manage enterprise systems, Linux can empower your network to perform at its very best. Armed with the advanced tools and best practice guidance of this practical guide, you'll be able to mold Linux networks to your will, empowering your systems and their users to take advantage of all that Linux-based networks have to offer. Understand how Linux networks function and get to grips with essential tips and tricks to manage them - whether you're already managing a networks, or even just starting out. With Debian and CentOS as its source, this book will divulge all the details you need to manage a real Linux-based network. With detailed activities and instructions based on real-world scenarios, this book will be your guide to the exciting world of Linux networking.
Table of Contents (17 chapters)
Mastering Linux Network Administration
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Acquiring and installing Debian 8


In order to install Debian, we first need to acquire an ISO image file. To do that, go the following URL:

http://www.debian.org/distrib/netinst

There will be several options for download, but the netinst ISO will be our target. For most computers, the 64-bit (amd64) version should suffice—unless you know for sure that your computer doesn't support 64-bit. The main difference between the netinst and the complete installation image is that the netinst version will download what it needs from Debian's servers over the Internet. As long as you're not within a bandwidth-constrained area, this should not be an issue.

Of course, the ISO file by itself is not useful unless you're attaching it to a virtual machine. If you are, then you're ready to go. If you're setting up a physical machine, you'll need to either create a bootable CD with a disc mastering utility of your choice, or create a bootable flash drive.

Note

Because there is a multitude of different disc mastering utilities available, a complete walkthrough of how to create a bootable CD in your environment is not possible. In most cases, your utility should have an option to burn an ISO image in its menu. The disc will not function as Debian installation media if you simply create a data disc.

The steps for installing Debian 8 are as follows:

  1. In a Linux system, you can create a bootable Debian flash drive with the following command:

    # cp name-of-debian.iso /dev/sd? && sync
    
  2. Essentially, we're copying the downloaded ISO image directly to a flash drive. Of course, change the file name and target to what is relevant on your system. To determine the device node to use, execute the following command:

    # fdisk -l
    
  3. Within the output, you should see the node designation of your flash drive. The output of that command will look like this:

    Device     Boot Start      End  Sectors  Size Id Type
    /dev/sdb1        2048 60563455 60561408 28.9G 83 Linux
    
  4. Then, /dev/sdb would be the device to use to create the flash drive. Putting it all together, we would create the flash drive with the following command:

    # cp name-of-debian.iso /dev/sdb && sync
    

    Tip

    Downloading the example code

    You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

  5. Once you have created bootable media, insert it into your computer and follow your computer's specific directives to access the boot menu and select your Debian media. After it finishes loading, the first screen will ask you to select your language. Choose your language, then click on Continue.

    The Debian installer's language selection screen

  6. After selecting your language, the next screen will have you choose your location. Select it and then click on Continue.

    Language selection in the Debian installer

  7. Similarly, choose a keymap that fits your keyboard and click on Continue.

    The Debian installer's keyboard selection screen

  8. At this point, the Debian installer will detect your hardware, and then allow you to configure your host name. For this option, choose a unique host name that will identify your device on the network. When finished, click on Continue.

    Choosing a hostname during installation of Debian

  9. The installer will then ask for your domain name. Enter your domain name here if you have one; otherwise, just leave it blank. Click on Continue.

    Domain name configuration while installing Debian

  10. Next, you'll be asked to set a password for the root account. For this, you should create a unique (and preferably randomly generated) password. As you probably know, the root account has full access to the system. After setting the password, click on Continue.

    Root password entry during Debian installation

  11. In the next three screens, you'll set up your user account. First, you'll enter your first and last name, and then click on Continue.

    First screen of setting up primary user account

  12. Then, type in username and click on Continue.

    Creating a username

  13. The final portion of the user setup section will ask you to create a password. When done, click on Continue again.

    Setting the password for the primary user

  14. Next, Debian will try to use Network Time Protocol (NTP), if available, to configure your clock. Then, you'll be presented with a screen to select your time zone. Make sure your time zone is highlighted, and click on Continue.

    Configuring your location, for the time zone

  15. Now, we'll partition our disk. Feel free to partition your disk any way you want, as there are no partitioning requirements as far as this book is concerned. For the sake of this instruction, Guided - use entire disk, the default for Debian, is chosen. If you have a preferred partitioning scheme, feel free to use it. When finished, click on Continue.

    First screen of the partitioning portion of the Debian installation

  16. Next, you'll have to select the hard disk on which to install Debian. In this example, there is only one hard disk available in the VM that was used to capture the procedure. If you have more than one disk, select the appropriate disk for installation and click on Continue.

    Selecting the target disk for Debian

  17. In the next section, the Debian installer will ask if you would like to have a separate /home partition (recommended if you wish to retain files between installations), separate /home, /var, and /tmp partitions, or all files in one partition. This book has no partitioning requirements, so choose the one that best fits your preference. When you've made your selection, click on Continue.

    Disk partitioning selection

  18. Next, Debian will display a summary of the changes it's about to make. If these changes look good to you, ensure Finish partitioning and write changes to disk is highlighted and click on Continue.

    Partitioning overview

  19. Then, you'll have to confirm the details again. Select Yes and then click on Continue.

    Confirmation of changes to partitioning

  20. The base system will be installed next; this might take a little while depending on the speed of your computer and hard disk. Afterwards, you'll be presented with a screen where you'll select the country nearest you in order to set up Debian's package manager.

    Choosing a location for the package manager

  21. Next, you'll select a mirror for Debian's package archives. In most cases, the default selection is usually accurate. So unless it guessed incorrectly, leave the default selection as-is and click on Continue.

    Choosing a mirror for Debian's package archives

  22. In the next screen, Debian will give you a chance to configure an HTTP proxy, if you have one. If not, leave it blank.

    HTTP proxy configuration

  23. Next, Debian will configure your package manager and update your sources. After a few progress bars scroll by, you'll see a new screen asking you whether or not you'd like to submit usage statistics to Debian. This information is helpful to Debian's developers, but it's not required. Make your choice and click on Continue.

    Choosing whether to provide anonymous statistics to Debian developers

    The next screen will offer us additional packages that we can add to our system, but these aren't required (it's a good idea to leave standard system utilities enabled, though). Most of the options presented allow us to choose a desktop environment, but you are not required to install one. Typically, servers are not installed with a desktop environment. However, if you are setting up a workstation PC, it may be of benefit.

    • GNOME: It is the default desktop environment for Debian. GNOME is state of the art, and offers a unique paradigm for interacting with your computer. GNOME uses virtual workspaces heavily, which allows you to split your workflow between several desktops. Unfortunately, GNOME has relatively modest hardware acceleration requirements; this means if you don't have a modern video card, it won't function properly.

    • Xfce: It is a very lightweight alternative to GNOME, and it has been around for a long time. Xfce is great for computers with lower end processing capabilities. Nowadays, Xfce doesn't see much active development, so it doesn't change much. This means that it is more stable in quite a few cases, though it may not interest those who prefer something with modern features.

    • KDE: It is a modern desktop environment like GNOME, but it resembles the user interface of Windows. Like GNOME, KDE also has relatively modest hardware requirements, though not quite as bad as GNOME. KDE features the Dolphin file manager, which is respected by Linux users.

    • Cinnamon: It was originally created as a fork of GNOME, but it has evolved into its own desktop environment with little GNOME dependencies. Cinnamon offers a more traditional style of desktop, with the modern feel of GNOME.

    • MATE: It is a continuation of the older 2.x versions of GNOME. As such, MATE runs well on older machines and sees more development than Xfce. It may not be as stable as Xfce, but it is close.

    • LXDEL: It is also a good choice for older computers, and it is similar to Xfce but not as popular.

    Other than the desktop environment choice, it's recommended to select SSH server from this list. Web server can also be chosen, but you may as well wait until we come to the part of the book in which Apache is discussed, as we'll walk through the installation.

    Debian software selection

  24. Make your selections and then wait for the rest of the installation procedure to finish, as Debian installs the software you selected in the previous step. Then, it's time to configure GRUB. GRUB is an acronym for Grand Unified Bootloader and is necessary in order for us to boot our system. You'll be asked whether you'd like to install GRUB into the master boot record (which you more than likely will want to do), so ensure the Yes radio box is checked and click on Continue.

    GRUB configuration

  25. Next, select a target on which GRUB should be installed. In most cases, this will be /dev/sda.

    GRUB target selection

  26. Whew! We are finally ready to reboot into our new Debian environment. Click on Continue one last time and we're off to the races!

    The final screen of the Debian installation process