Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet122/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   118   119   120   121   122   123   124   125   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

modulename
as in 
modinfo ext4
to view information about the 
specified module. Information available includes the filename and location of the module 
(stored under 
/lib/modules/
version
/kernel
where 
version
is the version number 
for your version of Linux such as 2.6.32-279.el6.x86_64), the license, description, authors, 
version number, and other modules that depend on this module.
If you decide that a loaded module is not required, you can remove it from the kernel 
through 
rmmod
. To add a module to the kernel, use 
insmod
. Notice that these two com-
mands will alter the modules that are loaded when you next boot the system; they do not 
impact your system as it is currently running. You can however add a module on demand 
using 
modprobe
. The format of the command is 
modprobe 
modulename options
where 
options
are module specific. With this command, you can also remove a current 
module with the –r option, list the loaded modules with the –l option, and view dependen-
cies with the –D option.
We will explore the loading and initialization of the Linux kernel in Chapter 11. Next, 
we look at the installation of the Linux-operating system in two forms, CentOS 6.0 (Red 
Hat) and Ubuntu 12 (a variation of Debian Linux).
8.3 INSTALLING CENTOS 6
CentOS is a variation of the Red Hat Linux distribution. The CentOS 6 installation is very 
straightforward and fairly quick. The only difficult choice you will face comes when you 
must decide on the hard-disk partitioning.
8.3.1 The Basic Steps
To install CentOS in a VM, start your VM software and select the option to create a new 
VM. Insert the CentOS installation disk in the optical drive. If you are instead installing 
CentOS directly onto your hard disk, turn on your computer and as your system boots, 
enter the ROM BIOS selection (usually this requires hitting the F2 key). Insert the installa-
tion disk in the optical drive. Select the option to boot from optical disk rather than hard 
disk from the ROM BIOS menu. Whichever approach you use, the selection should result 
in the CentOS installation menu being displayed (see Figure 8.3).
You will want to select the first option “Install or upgrade an existing system.” The first 
step in the installation process asks if you want to test the media before installation. Testing 
the media will confirm that the optical disk is accessible and has an installation program 
on it. Skipping this test will save time and should be selected if you are certain that the 
media works. To skip the media test, press the key and then . See Figure 8.4.
You will then see the first installation screen, introducing CentOS 6 and your only 
choice is to click the Next button. See Figure 8.5.
You will then be taken to numerous screens to select installation options. These are as 
follows. Select the language. There are over 60 languages available. The default is English. 


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 

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   118   119   120   121   122   123   124   125   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish