322
◾
Linux with Operating System Concepts
Once selected, click the Next button. The next screen contains the keyboard format. U.S.
English is again the default. There are several versions that utilize English letters aside from
U.S. English such as U.S. International and U.K. English and several different versions of
French, German, Italian, and others. Click on Next for the next screen.
The next choice is the type of device(s) for your installation. You have two choices, basic
storage devices and specialized storage devices. The typical installation is the former as the
latter is primarily used for storage area networks. See Figure 8.6.
Having
selected basic storage, you are now given a storage device warning pop-up win-
dow. This will explain that expected partitions were not found on your default storage
FIGURE 8.3
CentOS installation menu.
FIGURE 8.4
Media test screen.
Installing Linux
◾
323
device and how to proceed. At this point, you will want to partition your hard disk. If you
are establishing a dual-boot computer, you will want to retain the current partition(s) such
as a Windows partition; otherwise, you can discard any found data files. See Figure 8.7.
Moving forward, you are next asked to provide a hostname for your computer. This host-
name will be used as your machine’s alias, appended by your network name. For instance,
if you name your machine linux1 and your network is known as somecomputer.com, then
the full IP alias for this machine would be linux1.somecomputer.com. By default, the host-
name is called localhost.localdomain. Obviously, this name is not sufficient if your com-
puter will play a significant role on the Internet. Also available at
this step is a button that
will allow you to configure your network connection. You can do this now or later.
Selecting this button brings up the Network Connections pop-up window as shown
on the left side of Figure 8.8. You will select your network interface(s) as wired, wireless,
mobile broadband, VPN, or DSL. In this case, the computer has a wired interface (an
Ethernet card). You might notice that this device is listed as never used. Selecting this
device and clicking on Edit… brings up the window on the right side of Figure 8.8. Here,
we can adjust its settings. For instance, you can change the name of this device although
eth0 is the default name and we will assume that you retain this name.
FIGURE 8.5
CentOS installation welcome screen.
FIGURE 8.6
Storage device selection.
324
◾
Linux with Operating System Concepts
Under the Wired tab, we see the device’s MAC address and its MTU size (defaulting to
automatically set). We can also set up its security and any IPv4 and IPv6 settings such as
whether this machine will receive an IP address from a DHCP server or have a static IP
address. You can also specify your default router(s). You might notice in Figure 8.8 that
the checkbox “Connect automatically” is not selected. This means that upon booting, your
network connection will be unavailable.
We want to make it available; so, select “Connect
automatically.” You should also make sure “Available to all users” is selected. When done,
click Apply… and then Close the Network Connections window.
FIGURE 8.7
Storage device warning.
FIGURE 8.8
Initializing your network connection.
Installing Linux
◾
325
Note that the steps described in the previous two paragraphs are not necessary at this
point. After successfully installing Linux, booting to Linux, and logging in, you can bring
up the same Configure Network window and perform these steps at that time.
At the next screen, you are asked to select your time zone. This will be used for estab-
lishing the date and time. The default is the eastern time zone in the United States (New
York). You can change the selection either through the drop down box or by clicking on
the desired city in the map provided. Additionally, you can select whether your com-
puter’s system clock will use UTC (the coordinated universal time) or not. It defaults to
using UTC.
At this point, you are asked to enter a root password. This
password will be used any
time anyone wishes to log in as root. The password should be a strong password, one that
you will remember and one that you probably do not want to tell other people about (except
for other people who will serve as system administrators on the same computer). You will
enter the password twice to confirm that you typed it in correctly. If your password is too
weak, you will be warned and asked if you want to use it anyway. Once done, click Next.
8.3.2 Disk-Partitioning Steps
We now reach the portion of installation where you are able to customize the installation
onto the disk. Your choices are to use all space on the storage device, replace an existing
Linux system, shrink the current system, use free space, or create a custom layout. If you
are setting up a dual-boot computer, you must select “Use Free Space” to retain the files
that already exist. If you are repairing or replacing your Linux system,
you would select
“Replace Existing Linux System(s).” Selecting this option would remove the Linux par-
titions that previously existed but does not remove non-Linux partitions. The selection
“Shrink Current System” performs repartitioning of your already-existing Linux system.
You would use this if your original partitioning has not worked out. We discuss partitions
in more detail below and again in Chapter 10.
For our selection, we will select “Use All Space” (if we are installing Linux in a VM or
on new hardware) or “Use Free Space” (if we are installing Linux as a dual-boot system
on a computer which already has an operating system installed). We make the assump-
tion that we can use all space here. You can either use the default-partitioning layout or
select your own. In most cases, as a system administrator, you will want to create your
own partitioning layout.
At the bottom of the current screen, you will find two checkboxes, “Encrypt system” and
“Review and modify partitioning layout.” We will do the latter (you can also encrypt the
system if you desire, but we will skip that step). Once the “Review
and modify partition-
ing layout” checkbox is selected, and having selected “Use All Space,” click on Next. This
brings up a warning pop-up window alerting you that you might be deleting or destroying
data files in changing the partitioning layout. Select “Write changes to disk” to continue.
This brings up a review of the default partitions, as shown in Figure 8.9.
Let us take a closer look at Figure 8.9. First, we see two different drives being represented,
the LVM Volume Groups and the Hard Drives. The Hard Drives list is of the physical hard
disk(s) available to us. We have one hard disk in this case, denoted as sda. This stands for
326
◾
Linux with Operating System Concepts
a SATA hard drive. An IDE hard drive would be denoted as hda. Under sda, which will be
denoted in Linux as /dev/sda, there are two file systems, sda1 and sda2. Thus, we would see
them in the /dev directory as /dev/sda1 and /dev/sda2. The first of
these file systems stores
the boot partition (containing the /boot directory), which is 500 MB in size. The /boot
directory contains the boot loader program (GRUB by default) and the Linux kernel stored
in a partially compressed form. The second file system stores VolGroup, a logical volume,
and is 9739 MB in size.
You might notice that VolGroup is defined itself as having two partitions, lv_root and
lv_swap of 7720 and 2016 MB, respectively (note that the disk sizes reflected here are of a
VM established with 10 GB of disk space, and you might find a much larger size during
your installation because you are using an entire or a large fraction of an internal hard
drive). The lv_root partition is denoted as / and stores the root of the Linux file system. In
essence, all subdirectories under / are stored in this partition with the exception of /boot.
The swap partition is treated separately from the rest of the file system. We will explore
swap later in this chapter. Notice that both / and /boot are of type ext4. This is one of the
most popular types for Linux file systems. We explore ext4 versus other types of file sys-
tems in Chapter 10. The swap file system is of type swap and VolGroup is of type LVM.
LVM is the
Do'stlaringiz bilan baham: