Module 4 Linux Installation How To
Module 4 Linux Installation How To
• Linux is available in a wide variety of flavors called distributions. One of the key
parts of your deployment plan is specifying which of these distributions you will use
on your system.
• Which one is best? That depends on your preferences and what you want to the
system to do. Here are some guidelines you can use to select the right distribution:
Will the system function as a workstation or a server?
• Most Linux distributions, on the other hand, can be used in either role.
• However, be aware that there are Linux distributions available that are specifically
designed and optimized to function as servers, and others as workstations. For
example, Red Hat provides two distributions that are designed for providing
network services:
• Red Hat Enterprise Linux ES This distribution is designed for servers in medium
organizations that will be placed under moderate workload.
• Red Hat Enterprise Linux AS This distribution is designed for very large organizations
that will place a very heavy load on their server systems.
• Red Hat also provides two distributions that are designed specifically
for use in desktop systems:
• Red Hat Desktop This distribution is designed for use by the average
end user on desktop systems used to complete day-to-day work.
• Red Hat Enterprise Linux WS This distribution is intended for use by
high-end users, such as engineers or graphic designers, who use high-
end desktop hardware to complete more advanced computing tasks.
• Does the distribution offer support?
• Some vendors offer technical support for their Linux distributions
while others offer limited support or no support at all.
• If the system will be used in a corporate environment, you should
seriously consider implementing a well-supported distribution.
Verifying System Requirements and Hardware
Compatibility
• It is a very good idea to check the Web site for your distribution and
verify that your system’s hardware is listed on the distribution’s
Hardware Compatibility List (HCL). Even though hardware support for
Linux has become much better in the last decade, there are still
devices that aren’t supported. You can use your distribution’s HCL to
check and see if it will support your system’s devices.
• HCLs are usually available in two locations. First, most distributions
include a list of supported hardware in a text file on the first
installation CD or DVD. However, you should rarely use this version of
the HCL. Because it’s a static document on disc, it hasn’t been
updated since the disc was burned. If a device in your computer was
released at some point after the disc was burned, you have no idea if
it’s supported or not.
Verifying System Requirements
ext3(third extended file system) file system is an updated version of ext2. the ext3 file
system offers one key advantage that makes it highly preferable over ext2: journaling.
Since key disadvantage of ext2 is the fact that it must check the entire file system if the system
goes down uncleanly. Journaling eliminates this problem. However, because it does a better
job of ensuring data integrity and does it faster, most system administrators prefer ext3 over
ext2 in spite of the decreased performance
Weakness: A disadvantage of ext3 is the fact that the journaling process uses up more system
memory and slows down disk I/O operations
Reiser- This is an alternative file system to the ext3 file system which like ext3,utilizes
journaling to make crash recovery very fast. However, Reiser file system is different from
ext2 and ext3, because it uses a dramatically different internal structure which allows it to
support a larger maximum file size of 8TB and maximum volume size of 16TB.
Installation of Linux
Linux is the foundation of thousands of open source operating systems
designed as an alternative to Windows and Mac OS. Because it is open
source, there are a variety of different versions, or distributions,
available developed by different groups.
Mentioned in WEEK 1
• To fully understand how the command-line interface works under Linux, you need to
understand the concept of a shell. A shell is a command interpreter that allows you
to type commands from the keyboard to interact with the operating system kernel.
• Linux also uses command-line shells. However, unlike DOS, you have a choice of
which shell you want to use. As with many other aspects of Linux, you can try out
several of different command-line shells and choose the one that you like the best.
Some of the more popular shells include the following:
■ sh (Bourne Shell) The sh shell was the earliest shell, being developed for UNIX back in the late
1970s. While not widely used on Linux systems, it is still very widely used on UNIX systems.
■ bash (Bourne-Again Shell) The bash shell is an improved version of the sh shell and is one of
the most popular shells today. It’s the default shell used by most Linux distributions.
Linux Shells
■ csh (C Shell) The csh shell was originally developed for BSD UNIX. It uses a syntax that is very similar to C
programming.
■ tsch The tsch shell is an improved version of the C Shell. It is the default shell used on FreeBSD systems.
• It prints a listing of files and directories within the current directory on screen
Running Commands at the Shell Prompt
• There is one issue here you need to be aware of. That is the fact that
Linux handles the path to the executable you want to run in a different
manner than Windows or DOS.
Running Commands at the Shell
Prompt
• Even if the executable in question resides in the current directory,
Linux won’t be able to find it if the current directory is not in the PATH
variable. Instead, the shell will return an error. For example, in the
next illustration, an executable file named runme.pl is located in the
home directory of the rtracy user. This has been verified using the ls
command.
Running Commands at the Shell
Prompt
• However, when runme.pl is entered at the shell prompt, the shell can’t find the file because
rtracy’s home directory (/home/rtracy) is not listed within the PATH environment variable.
• There are two ways to deal with this. First, you can enter the full path to the executable file.
For the example shown above, you could enter /home/rtracy/runme.pl at the shell prompt
to execute the file. Second, you can switch to the directory where the executable file
resides. Then add ./ to the beginning of the command. In the above example, you would
first verify that the current directory is /home/rtracy; then you could enter ./runme.pl at
the shell prompt.
• The ./ characters denote the current directory. By adding them to the beginning of a
command, you tell the shell to look for the specified file in the command in the current
directory.
Running Commands at the Shell
Prompt
• There’s one other issue that you need to be aware of when working with Linux
shells. Linux file names and directory names are case-sensitive! That means
Linux commands are also case-sensitive.
• As you gain experience with Linux you’ll discover that it includes some very
powerful commands and utilities that you will use over and over. These include
the following:
• halt This command shuts down the operating system, but can only be run by
the root user.
• reboot This command shuts down and restarts the operating system. It also can
only be run by root.
• init 0 This command also shuts down the operating system, and can only be run
by your root user.
• init 6 This command also shuts down and restarts the operating system. It also
can only be run by root.
Commonly Used CLI Commands and Utilities
• man This command opens the manual page for the command or utility
specified. The man utility is a very useful tool. If you are unsure how to use any
command, use man to access its manual page. For example, you could enter
man ls at the shell prompt to learn how to use the ls utility.
• info The info utility also displays a help page for the indicated command or
utility. The information displayed tends to be more in-depth than that
displayed in the man page for the same command.
• su This command switches the current user to a new user account. For
example, if you’re logged in as rtracy and need to change to user account
dcoughanour, you can enter su dcoughanour at the shell prompt. This
command is most frequently used to switch to the superuser root account.
Commonly Used CLI Commands and Utilities
• env This command displays the environment variables for the currently logged-in user.
• echo This command is used to echo a line of text on the screen. It’s frequently used to
display environment variables. For example, if you wanted to see the current value of
the PATH variable, you could enter echo $PATH.
• top This command is a very useful command that displays a list of all applications and
processes currently running on the system. You can sort them by CPU usage, memory
usage, process ID number, and which user owns them..
• which This command is used to display the full path to a shell command or utility. For
example, if you wanted to know the full path to the ls command, you would enter
which ls. The full path to ls will be displayed on screen.
Commonly Used CLI Commands and Utilities
• whoami This command displays the username of the currently logged-in user.
• netstat This command displays the status of the network, including current
connections, routing tables, etc.
• route This command is used to view or manipulate the system’s routing table.
• SPECIFIC OBJECTIVES: Learn how to: Use man Pages, Use info, Use
Other Documentation and Troubleshooting Resources
Getting help
• One of the great things about Linux is that documentation and help
information are abundantly available for your use. Pick any Linux operating
system task or utility and you can probably find documentation that will teach
you how to accomplish what you need to do.
In this UNIT, we’ll introduce you to the various sources for getting help when
working with Linux. The following topics will be covered:
■ Using man pages
■ Using info
■ Using other documentation and troubleshooting resources
Getting help
• One of the primary means used by the Linux operating system to maintain
system documentation is through the use of manual (man) pages.
• These manual pages contain documentation about the operating system itself
as well as any applications installed on the system. These man pages are
viewed using a utility called man.
• You simply enter man followed by the name of the command, utility, service,
or file you need to learn about.
Use info
• In addition to man, you can also use the info utility to view documentation for
commands, utilities, services, and files on your Linux system.
• You might be asking, “Why do I need info if I’ve already got man?” The two
utilities do serve a similar purpose; however, they do it in a different way.
• Man pages are packed with information, but they aren’t really instructional in
nature. Essentially, man says, “Here’s the utility and its syntax. You go figure out
how to use it.”
• The info utility, on the other hand, is more of a learning utility. Most info nodes
contain the same information as a man page.
• However, info nodes are usually more verbose and can actually teach you how
to use a particular Linux tool.
Self Test Exercises
1. When conducting a needs assessment, what questions should you ask? (Choose two.)
A. What problem will this installation fix?
B. Which distribution should I use?
C. Where can I get the best price on a new server?
D. Who is requesting the new systems?
2. Which of the following is a properly stated goal in a needs assessment?
A. Mike’s boss wants a new server, so we’re gong to install it.
B. We’re going to install Linux.
C. We need a new Linux system.
D. The new Linux system will provide a network database to increase the
documentation team’s productivity by an anticipated 20 percent.
Self Test Exercises
3. Suppose Karen from Customer Service approaches you and asks for a new Linux server for
her team. Who else should you talk to as a part of your needs assessment? (Choose two.)
A. Karen’s boss
B. Karen’s co-workers
C. The Technical Support supervisor
D. Your hardware vendor
4. Which of the following are components of your project scope? (Choose two.)
A. Customer demands
B. Management decision-making
C. Schedule
D. Scale
5. You’re responsible for implementing five new Linux servers in your
organization’s Technical Support department. The Technical Support
supervisor has asked that four additional servers be added to the project.
Due to time constraints, he won’t allow you to adjust the original schedule to
accommodate the additional servers. Which of the following is the most
appropriate response?
A. Ignore the request.
B. Inform the supervisor that additional resources will have to be added to
the project.
C. Resign in protest.
D. Cheerfully agree to the request and then miss the deadline.