APPENDIX A

image

Installing Linux

In this appendix you’ll learn how to install Linux. We’re covering two popular distributions. You’ll first learn how to install CentOS; next you’ll read how to install the Ubuntu Server 14.04 LTS release on your computer.

While writing this book, I have primarily focused on CentOS 7.0 and Ubuntu Server 14.04 LTS. Of course you’re free to use any other Linux distribution, but you will notice that a larger amount of differences exists when using another distribution. I have tried to write the book in a manner that differences between Linux distributions don’t matter too much, but there will always be some items that don’t work as well when using another distribution.

Installation Requirements

To install Linux, you don’t need much advanced hardware. An amount of 512 MB RAM suffices, and apart from that, you’ll do well with as little as 4 GB of disk space. You will need a 64 bits platform though to run a modern Linux server operating system where all features are supported. This shouldn’t be a problem, because nearly all CPUs that have been released in the last decade offer support for 64 bits instructions.

To learn Linux and to be able to work through the exercises that are described in this book, I would recommend using virtualization software. A desktop virtualization solution such as VMware Workstation / Player for Windows or VMware Fusion for Apple will do well. An alternative solution is offered by Oracle VirtualBox. Most people like the VMware software better as it is well organized, but you will need to pay for it. Given the low hardware requirements, it will work well on older computer hardware also.

Installing CentOS

The following procedure walks you through a basic installation of CentOS with a configuration that works well for learning the items that are discussed in this book.

  1. Boot CentOS from the installation media. This will show you the screen in figure A-1. Select Install CentOS 7 and press enter to start the installation.

    9781430268307_FigAppA-01.jpg

    Figure A-1. Starting the CentOS installation

  2. Once the installation program has been loaded, you’ll see the Welcome to CentOS screen where you can select the language and keyboard settings. I recommend installing CentOS in English, but other languages are offered as well. After making your selection, press Continue to proceed.

    9781430268307_FigAppA-02.jpg

    Figure A-2. Selecting language and keyboard settings

  3. In the next screen you’ll see the installation summary (see figure A-3). From this screen you’ll make all required choices to start the installation of your Linux distribution.

    9781430268307_FigAppA-03.jpg

    Figure A-3. The installation summary screen gives access to all options that require configuration

  4. To start with, you can have a look at the software selection link. Click it, and it will open the screen that you can see in figure A-4. You can do very well with a minimal installation, which installs no graphical user interface and just a minimal set of packages. It is also perfectly fine to select the “Server with GUI” installation pattern. This does install a graphical user interface, which allows you to easily open multiple terminal windows on the same desktop. For this book both choices work well, so the choice is entirely up to you.

    9781430268307_FigAppA-04.jpg

    Figure A-4. Selecting the basic software installation pattern

  5. Next you must click the Installation Destination link. This will open the screen that you can see in Figure A-5. You just have to click the Done button from this screen to confirm that you really want to use the selected disk device for your Linux installation. You don’t have to do anything difficult with the hard disk, just select the default disk lay-out.

    9781430268307_FigAppA-05.jpg

    Figure A-5. Selecting the hard disk for installation

  6. The last step before starting the installation is the configuration of network and hostname. Click the link to ensure that the network card is enabled, and here also, you can leave all default settings, which configures your network to get an IP address from a DHCP server. Close this screen; at this point you can start the installation.

    9781430268307_FigAppA-06.jpg

    Figure A-6. Switch on the network card before starting the installation

  7. The installation will start immediately now (see Figure A-7). While packages are being installed, you can enter a root password and create a user as well.

    9781430268307_FigAppA-07.jpg

    Figure A-7. While the software packages are written to your system, you can set the root password and create a user

  8. In figure A-8 you see the screen where you have to enter a root password. Enter the same password twice to avoid any mistakes while typing the password and then click Done to write the configuration to disk. Optionally you can create a user account as well. If you don’t create a user now, that’s fine, you’ll be instructed how to do that while working through the chapters in this book.

    9781430268307_FigAppA-08.jpg

    Figure A-8. Enter the root password twice

  9. When the installation has finished, this will be indicated. At that point you can click Finish the installation to write the final configuration to disk. Next Reboot, to start working on your freshly installed system. That was all!

Installing Ubuntu Server

While the Ubuntu desktop edition was designed for being easy to use, the Ubuntu server edition is designed to be as efficient as possible. You won’t get a graphical interface at all, you’ll just get a text based interface that allows you what needs to be done on the server. This procedure describes how to install an Ubuntu Server that can be used to work your way through this book.

  1. Boot from the installation media. This will show the screen that you can see in Figure A-9, from which you can select the language that will be used in the enxt screen. I recommend using an English language installation.

    9781430268307_FigAppA-09.jpg

    Figure A-9. To start with, select the language that you want to be using for installation

  2. Next you’ll need to indicate what you want to do. Multiple options are suggested; select Install Ubuntu Server to start the installation procedure.

    9781430268307_FigAppA-10.jpg

    Figure A-10. Select Install Ubuntu Server

  3. You’ll now see another screen where you need to select the language and keyboard disposition. That may seem redundant, but in this screen you’ll determine the language the server will be installed in, as well as the keyboard layout that will be used.

    9781430268307_FigAppA-11.jpg

    Figure A-11. Selecting the language the server will be installed in

  4. Before the actual installation is started, you’ll need to make a couple more choices. To start with, you have to indicate your geographical area, which will be used to configure system time correctly.

    9781430268307_FigAppA-12.jpg

    Figure A-12. Selecting the geographical area

  5. In the next screen you can indicate how you want to define the keyboard on your system. To do so, you may just select the keyboard from a list, or you can press a couple of keys so that the installation program will detect the type of keyboard you are using for you. Personally, I think selecting the keyboard layout from a list is easier, so select No to display the list and select your keyboard type.

    9781430268307_FigAppA-13.jpg

    Figure A-13. Selecting the keyboard disposition

  6. After selecting the keyboard, additional components are loaded that are required to complete the installation. To load these additional components, you’ll need network access. So if you see something that doesn’t match the next figure at all, make sure you’re connected to the network and try again. Once that has been done, you’ll need to select a name for your system. If you don’t do anything, the system will be called ubuntu. It’s a good idea to change that name into something a bit more meaningful.

    9781430268307_FigAppA-14.jpg

    Figure A-14. Setting the system name

  7. On Ubuntu you’ll have to create a user, because root login is disabled by default. In the next screen you can enter the desired user name. This user will automatically be created as the administrative user, which means that this user account will have sudo access to all administrator commands.

    9781430268307_FigAppA-15.jpg

    Figure A-15. Creating the admin user

  8. After choosing the user name, you’ll have to enter a password. Do this twice, to prevent any typos from locking you out from the system.
  9. The last part of the user-related configuration asks you if you want to encrypt the contents of your home directory. While this is a good idea for a typical laptop user to prevent unauthorized access to personal files, on a server it’s not really necessary to use an encrypted home directory.

    9781430268307_FigAppA-16.jpg

    Figure A-16. On a server there’s no real need to use an encrypted home directory

  10. In the next screen, you’ll be prompted to confirm the time zone that is selected. Select yes if it is correct to move on to the next screen.
  11. You’ll now be asked how you want to organize disk lay-out (see Figure A-17). For an easy configuration of partitions on your hard disk, select the Guided - use entire disk and set up LVM option.

    9781430268307_FigAppA-17.jpg

    Figure A-17. The Guided LVM option allows you to configure disk usage in an easy way

  12. The screen that you can see in Figure A-18 shows which disk will be used. Make sure that you’re using the right disk, and if that is the case, press Enter to continue.

    9781430268307_FigAppA-18.jpg

    Figure A-18. Make sure you’re using the right disk before moving on

  13. Before the configuration is actually written to disk, you need to confirm three more times in three different screens. Do this, which allows your disk to be formatted and a first set of files to be copied to disk.
  14. You can now indicate if a proxy needs to be used for Internet access. For a simple home configuration, typically no proxies are used, so you can leave this field empty and just select Continue to move on.
  15. In the next screen (see Figure A-19) you can indicate how you want to update your system. By default no automatic updates will be done, which is fine for what you need to do with Ubuntu server in this book. On a real server you might want to consider installing at least security updates automatically.

    9781430268307_FigAppA-19.jpg

    Figure A-19. Defining how you want to deal with automatic updates

  16. You now can install some additional services as well. It is a good idea at least to install the SSH Server, everything else can be installed later as well.

    9781430268307_FigAppA-20.jpg

    Figure A-20. Selecting additional software packages for installation

  17. After the installation of selected packages, the installer will ask if you want to install the Grub 2 boot loader to disk (see Figure A-21). Select Yes and press Enter to confirm. Once that has been done, you’ll see the Installation Complete message. Press enter one more time and your newly installed Ubuntu server will start booting.

    9781430268307_FigAppA-21.jpg

    Figure A-21. Confirm that you want to write the Grub 2 boot loader to disk

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.195.128