Semester 5 - 2022 - November - Linux System Administration Cbcs
Semester 5 - 2022 - November - Linux System Administration Cbcs
MUQuestionPapers.com
• Basically, from the bash environment, an administrator is working
with commands. An example of such a command is ls, which can be
used to display a list of files in a given directory.
• Some shells offer the option to complete a command automatically.
It can also complete filenames and shell variables. To use this nice
features of completion,use the Tab key.
• For example, the cat command is used to display the contents of an
ASCII text file. The name of this file, which is in the current
directory, is this_is_a_file. To open this file, the user can type cat thi
and then immediately hit the Tab key. If there is just one file that
starts with thr letters this, Bash will complete the name of the current
directory there is a file with the name this_is_a_ text_file and
thisAlsoAFile. Since both files start with this, Bash completes only
up to this and doesn’t go any further. To display a list of possibilities,
you can then hit the Tab key again. This allows you to enter more
information manually. Of course, you can then use the Tab key to
use the completion feature again.
Q1c) Discuss the difference between piping and redirection with the
help of an example.
(5)
• The piping and redirection options are among the most powerful
features of the linux command line.Piping is used to send the result
of a command to another command, and redirection sends the output
of a command to a file.
• The Pipe is a command in Linux that lets you use two or more
commands such that output of one command serves as input to the
next. In short, the output of a process can be give as input to the next
one like a pipeline. The symbol 'I' denotes a pipe.
• Pipes help you mash-up two or more commands at the same time
and run them consecutively. You can use powerful commands which
can perform complex tasks in a second.
Let us understand this with an example.
• When you use 'cat' command to view a file which spans multiple
pages, the
MUQuestionPapers.com
• prompt quickly jumps to the last page of the file, and you do not see
the content in the middle.
• To avoid this, you can pipe the output of the 'cat' command to 'less'
whichwill show you only one scroll length of content at a time.
$cat /etc/passwd Scat /etc/passwd
| less | more
Output Redirection
• The '>' symbol is used for output (STDOUT) redirection
[Megabyte@pclDesktop]$ echo This is Megabytes> filel.txt
[Megabyte@pc1 Desktop]$ cat filel.txt This is Megabytes.
• Use the correct file name while redirecting command output to a file
there is an existing file with the same name, the redirected command
will dele the contents of that file and then it may be overwritten." If
you do not want a file to be overwritten but want to add more
content to an existing file, then you should use ‘>>’ operator.
Megabytepcl Desktops echs This is megaytes> file3.txt
Megabytepcl Desktop $ cat file3.txt
This is Megabytes
$ echo Welcome to megabytes>>file3.txt
Megabytepe Desktops $ cat file3.txt
This is megabytes
Welcome to megabytes
Input redirection
MUQuestionPapers.com
Megabyte@pc1 Desktop/s we-1 files.txt
files.txt
Megabytepc1 Desktop1s wel<files.txt
• Example: The mail program in Linux can help you send emails from
the Terminal.
• You can type the contents of the email using the standard device
keyboard But if you want to attach a File to email you can use the
input re-direction operator in the following format. mails "Subject"
to-address < Filename
• When using redirection, you should be aware that it is possible not
only toredirect STDOUT and STDIN. Commands can also produce
error output. Thiserror output is technically referred to as STDERR.
Q1d) With the help of an example, write the steps to mount a device
in linux .
(5)
MUQuestionPapers.com
GUI it will create a subdirectory under/media and its content will be
available under the subdirectory.
• MOUNTING USB TO SYSTEM STEPS:
1. Open a terminal and type su followed by root’s password to
gain root privilege.
2. Insert a USB flash drive in the USB port of your computer.
(USB should have fat format file system format usin g
windows computer).
3. Type of command to find the device name and partition with
the name of /dev/sdb1.
4. Create a mount point. #mkdir/mnt/test.
5. Use #mount –t vfat/dev/sdb1/mnt/test to mount the USB flash
drive on the /mnt/test directory.
6. Use #cel/mnt/test to go into the /mnt/test directory.
HARDLINK:
• If the original file is deleted, the file data can still be accessed
through other hardlinks.
• If the original file is moved, hard links still work.
• A hardlink can only refer to a file on the same file system.
• The inode and file data are permanently deleted when the number of
hard links is zero.
• A hardlink works by creating another filename that refers to the
inode data of the original file. This is similar to creating a copy of
the file.
• A hardlink preserves the contents of the file.
• A hardlink cannot be created for directories, and they cannot cross
filesystem boundaries or span across partitions.
• In hardlink, you can use any of the hardlink names created to
execute a program or script in same manner as the original name
given.
• A hardlink is a directory entry that associates a name with a file.
MUQuestionPapers.com
SOFTLINK:
• If the symbolic link file is deleted, the original data remains. If
the original file is moved or deleted, the symbolic link won’t work.
• A softlink can refer to a file on a different file system.
• Softlink are often used to quickly access a frequently used file
without typing the whole location.
• A softlink points to another entry somewhere in the file system.
• A softlink has the ability to link to directories, or to files on remote
computers networked through NFS.
• Deleting a target file for a symbolic link makes that link useless.
• Softlink is a term for any file or directory in the form of an absolute
or relative path and that affects pathname resolution.
Q1f) Explain the steps to create and manage your own repository in
yum.
(5)
• STEP 1:
‘Install createrepo utility.’
To create a yum repository we need to install additional software called
‘createrepo’
sudo yum install createrepo
• STEP 2:
‘Create a repository directory.’ you need to create a new directory
that will be the location of your yum repository and will hold the desired
rpm package files. So you should decide the location of this directory and
create it. mkdir<your_directory_name> as an example let’s use /opt/rpms
mkdir /opt/rpms
• STEP 3:
‘Put RPM files into the repository directory.’
You should just copy or download your RPMs into the new directory
• STEP 4:
‘Create the repository metadata.’
MUQuestionPapers.com
The createrepo command reads through the directory with rpm packages
and creates a new directory called “repodata” in it. This directory
contains the metadata information for the repository. Every time you add
additional rpm package files to your yum repository, you need to re-create
the repository metadata with the “createrepo” command. So to create the
repository you need to execute:
createrepo<path_to_your_directory_with_rpms
> example: createrepo /opt/rpms
If you already created the repository metadata and you are just adding new
packages to it you need to update the repo: createrepo --update /opt/rpms
STEP 5:
‘Create the repository configuration file.’
A yum repository has its own configuration file and there are a few rules
for it:It must be located in /etc/yum.repos.d/ directory. It must have
the .repo extension, to be recognized by yum File options are:
• Repository ID – One word unique repository ID (example:
[myrepo])
• Name – Human-readable name of the repository (example:
name=My Repository)
• Baseurl – URL to the repodata directory. You can use file://path if
repository is located locally or ftp://link, http://link, https://link if
repository is located remotely – HTTP Authentication available
http://user:password@www.
• Enabled – Enable repository when performing updates and installs
(example: enabled=1)
• Gpgcheck – Enable/disable GPG signature checking (example:
gpgcheck=1)
• Gpgkey – URL to the GPG key (example:
gpgkey=http://mirror.cisp.com/)
• Exclude – List of the packages to exclude
(example: exclude=httpd,mod_ssl)
• Includepkgs – List of the packages to include (example:
include=kernel)
Required yum repository configuration file options are:
• Repository ID
• Name
• Baseurl
MUQuestionPapers.com
• Enabled For example: INI
• [customrepo]
• name=CustomRepository
• baseurl=file:///opt/rpms
• enabled=1
• gpgcheck=0
MUQuestionPapers.com
Q2a)Explain the different kinds of partitions in linux and their
characteristics.
(5)
• There are three types of partitions in linux:
Primary partitions
Extended partition
Logical partition Primary partition:
This information is written in MBR. Maximum of four partitions can
be created even if disk space available. There's space for just four
partitions in the partition table and no more than four.Each hard disk
must have at least one primary partition where you can create a
logical volume. You can set only one partition as an active partition.
Primary partitions are assigned drive letters.
MUQuestionPapers.com
moved to the swap space.While swap space can help machines
with a small amount of RAM, it should not be considered a
replacement for more RAM.
• Swap space is located on hard drives, which have a slower access
time than physical memory.Swap space can be a dedicated swap
partition (recommended), a swap file, or a combination of swap
partitions and swap files.
• Use dd to create a file that is filled with all zeroes, which you can
use as a swap file:
STEP 1:
Use dd if=/dev/zero of=/swapfile bs=1M count=1024. This command
creates a 1GB swap file in the root directory of your server.
STEP 2:
Use mkswap /swapfile to mark this file as swap space.
STEP 3:
Type free -m to verify the current amount of swap space on your
server.This amount is expressed in megabytes(MB).
STEP 4:
Type swapon /swapfile to activate the swap file.
STEP 5:
Type free -m again to verify that you just added 1GB of swap space.
STEP 6:
Open /etc/fstab with an editor, and put in the following line:
/swapfile swap swap defaults 0 0
MUQuestionPapers.com
• Runlevel 0: The halt runlevel. This is the runlevel at which the
system shuts down. For obvious reasons it is unlikely you would
want this as
• Runlevel 1: Causes the system to start up in a single user mode
under your default runlevel. which only the root user can log in. In
this mode the system does not start any networking, X windowing or
multi-user services. This run level ideal for system administrators to
perform system maintenance or repair activities.
• Runlevel 2: Boots the system into a multi-user mode with text based
console login capability. This runlevel does not, however, start the
network.
• Runlevel 3: Similar to runlevel 2 except that networking services are
started. This is the most common runlevel for server based systems
that do not require any kind of graphical desktop environment.
• Runlevel 4: Undefined runlevel. This runlevel can be configured
provide a custom boot state.
• Runlevel 5: Boots the system into a networked, multi-user state with
XtoWindow System capability. By default the graphical desktop
environment will start at the end of the boot process. This is the most
common run level for desktop or workstation use.
• Runlevel 6: Reboots the system. Another runlevel that, for obvious
reasons, you are unlikely to want as your default
To manage service scripts, following two commands can be used:
1. service command:
Syntax:
#service service_name start/stop/restart status | some more option. This
command can manage scripts in the /etc/init.d directory.
MUQuestionPapers.com
Q2d)Discuss the steps to configure key based SSH authentication.
(5)
MUQuestionPapers.com
Q2e) Elaborate what basic permissions are and how they are
applied to files and directories in linux.
(5)
• Every file in Unix has the following attributes:
Owner permissions: The owner's permissions determine what
actions t owner of the file can perform on the file.
Group permissions: The group's permissions determine what actions
user, who is a member of the group that a file belongs to, can
perform on the file.
Other (world) permissions: The permissions for others indicate what
action all other users can perform on the file.
• File Access Modes-The basic of permissions are the read, write, and
execute permissionswhich have been described below
Read: Grants the capability to read, i.e., view the contents of the file.
Write: Grants the capability to modify or remove content of the file.
Execute: User with execute permissions can run a file as a program.
• Directory Access Modes-Directory access modes are listed and
organized in the same manner as anyother file. There are a few
differences that need to be mentioned. Read: Access to a directory
mea
ns that the user can read the contents. The user can look at the
filenames inside the directory.
Write: Access means that the user can add or delete files from the
directory.
Execute: Executing a directory doesn't really make sense, so think of
this as a traverse permission.
• Applying Read, Write, and Execute Permissions
To change the file or the directory permissions, you use the chmod
(changemode) command.
• The three users are represented using a single character:
Character User
u User or owner
gGroup user
o Other users
aAll three(user, group and other)
• Permission can also be represented using numeric value
MUQuestionPapers.com
Numeric value Permission
4 Read
2 Write
1 Execute
• Permission format for users: d - directory r,w,x - Owner permission
r,wx - Group permission r,w,x - Other user permission
• -rwxr--r--: means that owner has read, write and execute permission;
group user has only read permission; other users have only read
permission. Assign execute permission to all users on file fl
#chmod a+xfl
• Remove execute permission from other users on file fl
#chmod o-x fl. Assign read and write permission to owner and other
user.#chmod uo+rwf1
• Assign read, write and execute permission to user; read and write
permission to group user, execute permission to other user.
#chmod u+rwx,g+rw,0+x f1
• Assign read and write permission to all users
(rwx:110-6) to all users #chmod 666 fl
• Assign read, write and execute permission to user, read and write
permission to group user, execute permission to other user.
Userrwx:111-7); groupirs:110-6); other(--x:001-1) #chmod 761 fl
MUQuestionPapers.com
uid username's numeric UID (user ID)
gid username's numeric primary group ID (group ID)
gecosAn optional field used for informational purpose
homeusername's home directory
shellusername's login shell
• Only a root user can modify this file. Use vipw/etc/passwd to avoid
locking issues If an error is made, the consequences can be serious.
It can evenprevent logging in on a system.To check for error use
pwck command without any option.
• /etc/shadow. The encrypted user passwords are stored in /etc/shadow
Information relating to password expiry is also kept in this file
MUQuestionPapers.com
Q3 a) State the steps to setup a firewall that allows SSH packets.
(5) Step 1: Secure your firewall
If an attacker is able to gain administrative access to your firewall
it is “game over” for your network security. Therefore, securing
your firewall is the first and most important step of this process.
Never put a firewall into production that is not properly secured by
at least the following configuration actions:
• Step 2: Architect your firewall zones and IP addresses
In order to protect the valuable assets on your network, you should
first identify what the assets are (for example, payment card data
or patient data). Then plan out your network structure so that these
assets can be grouped together and placed into networks (or zones)
based on similar sensitivity level and function.
• Step 3: Configure access control lists
Now that you have established your network zones and assigned
them to interfaces, you should determine exactly which traffic needs
to be able to flow into and out of each zone.
MUQuestionPapers.com
• Step 4: Configure your other firewall services and logging
If your firewall is also capable of acting as a dynamic host
configuration protocol (DHCP) server, network time protocol
(NTP) server, intrusion prevention system (IPS), etc., then go
ahead and configure the services you wish to use. Disable all the
extra services that you don’t intend to use
• Step 5: Test your firewall configuration
In a test environment, verify that your firewall works as intended.
Don’t forget to verify that your firewall is blocking traffic that
should be blocked according to your ACL configurations. Testing
your firewall should include both vulnerability scanning and
penetration testing.
MUQuestionPapers.com
in to or out of the internal network.
Firewalls cannot secure the system which is already infected.
MUQuestionPapers.com
command creates a certificate which uses a 1024-bit RSA key with a
validity of 1 year: #openssl req -newkey md5:1024 -x509 -days 365.
Q3 d) List the steps to encrypt,share and decrypt files using GPG.
(5)
Note that GPG keys are always owned by a user account and not by
your entire system. To see the keys that are currently available, use
gpg --list-keys gpg --list-keys. When using the gpg --list-keys
command, one can see only public keys assigned to account. If one
wants to check other's private key, use gpg --list- secret-keys instead.
ENCRYPTING FILES WITH GPG
• GPG is commonly used to encrypt files. The base command to do
this is easy:
pg -e yourfile. The gpg command will next ask for a user ID. This is
the ID of he user to which you want to send the encrypted file.Using
GPG to encrypt a filegpg -e hosts
• The receiver of the encrypted file can decrypt it by using the
command gpg - To send it to a new file, make sure to use redirection
when specifying the target. The following command: “gpg-d
myfile.gpg>myfile”will extract the contents of the GPG encrypted
file to myfile.
SHARING FILES WITH GPG
• Signing GPG means data has been transmitted to the intended sender
which user's private key is used. This process adds a digital
signature tomessage or file. If the receiver of the message has the
public key of the sender in their GPG ring, this can automatically
prove that the message actually comes from the intended sender.
• The procedure of signing is frequently used in email
communications, butcan also be used to sign RPM files. To sign a
file, the basic command is gpg -s file. This command can also
becombined with -e to encrypt the file. Une gpg-e-s file if you want
to encrypt and sign a file at the same time. To open the received
signed file use gpg -d to open it.
SIGNING RPM FILES
• When signing RPM packages, the creator of the RPM package needs
to through a signing procedure.It results in a signature that can be
offered with the RPM package.
MUQuestionPapers.com
• This signature can then be checked against the GPG key, which
should be publicly available and imported by the person who wants
to install the
• package.If the signature matches this publicly available GPG key,
the person whodownloads the package indeed is guaranteed that the
package is signed bythe GPG key, which is joined with the package.
MUQuestionPapers.com
writable- yes
public - yes write
list +mygroup
In this example share, some options are added.
• First a comment is specified, which makes it easier for clients to
identify the share when they are browsing the network for available
services. Next allow hosts parameter restricts access to hosts that
have a starting with 192.168.3 only. The option public yes makes it a
public share that is accessible by anyos an IP addreswho has a
Samba account to authenticate to this server.
• It is also writable, which is indicated by the option writable - yes.To
write to the share, though, a user must be a member of the local Lin
group mygroup. When working with Samba, you can use different
security options. This option is set in the global section of the
/etc/samba/smb.conf file, and determines where Samba looks for
user authentication information.
• The default setting is security user, which means that Samba needs a
local Samba useaccount that is stored in a smbpasswd file.
• The following authentication options are available:
Security=share:When using this option, a user does not need to
sendusername and password to a share before connecting to it. One
can set it up that a user has to enter a password before connecting.
However, this would be share-level password that is used by every
user connecting to the share. Using can be beneficial on an
anonymous share, to where you want users to connect with limited
permissions. When using this option, use the guest only parameter in
the share. Never use it for shares that contain valuable data.
security = user: This is the default security option, where a user must
log to the share before getting access.
security = domain:This option works if your Samba server has been
added to a Windows domain.
security = server:This option uses an external server (such as anothe
Samba server) to handle Samba authentication requests.
Security=ads: This option makes Samba a member in a Windows
Active
Directory domain. It does not make it a domain controller but
integrates Sambain the AD domain, which makes it easier to access
MUQuestionPapers.com
resources in the AD domain orto set up access for AD users to
resources in Samba.
• Accessing Samba Shares- To access Samba Server from Windows,
one can set up a network share and point to the Samba server. To list
the Samba shares that are offered by a specie server, one can use
smbclient-L
• This shows the names of all shares that are offered, and it also
provides an
option to log in to the Samba server. When using smbclient -L to list
shares password is not necessary for listing. So if its asking for
password then just need to press Enter key.
MUQuestionPapers.com
called an email client (such as Mozilla Thunderbird, Microsoft
Outlook, Eudora Mail, Incredimail or Lotus Notes& Mutt Tool).
• When it is a web interface used for interacting with the incoming
mail server, it is called webmail.An MUA is a program that, at a
minimum, allows a user to read and compose email messages.
MTA(mail transfer agent):
• A mail transfer agent or mall relay transfers email messages from
onecomputer to another. An MTA is responsible for the core tasks
involved with delivering of email, including: queuing, throttling,
scheduling, connection management, data transfer, processing of
deferrals, bounce generation and tracking of delivery status.
• A Mail Transport Agent (MTA) transports email messages between
hosts using SMTP. A message may involve several MTAs as it
moves to its intended destination.
• The major functions of an MTA are:
Accepting messages originating from the user agent and forwarding
them totheir destination.
Receiving all messages that are transmitted from other user agents
for further transmission.
Keeping track of each and every activity and analyzing and storing
the recipient list to perform future routing functions.
Sending auto-responses about non-delivery when a message does
not reachits intended destination.
• Relaying is a hot item in email delivery. An MTA doesn't relay
messages for just anyone, but only for authenticated users or users
who are known in some other way. If messages were relayed for
everyone, this would likely mean that the MTA was being abused by
spammers on the Internet.
• Queuing means that the MTA stores the message in a local directory
and will try to deliver it again later. As an administrator, you can
flush the queues, which means that you can tell the MTA to send all
queued messages now.
• Upon delivery, it sometimes happens that the MTA, which contacted
an exterior MTA and delivered the message there, receives it back.
This process is referred to as bouncing.
• In general, a message is bounced if it doesn't comply with the rules
of the receiving MTA, but it can also be bounced if the destination
MUQuestionPapers.com
user simply doesn't exist. It also generate error message if it's not
successfully delivered.
• Red Hat Enterprise Linux offers two MTAs, Postfix and Sendmail,
email client programs are often not required to act as an MTA. Red
Hat Enterprise Linux also includes a special purpose MTA called
Fetchmail.
MDA(mail delivery agent):
• The recipient's MTA then delivers the email to the incoming mail
server (called the MDA, for Mail Delivery Agent), which stores the
email as it waits for the user to accept it. There are two main
protocols used for retrieving email on an MDA: POP3 (Post Office
Protocol), the older of the two, which is used for retrieving email
and, in certain cases, leaving a copy of it on the server; and IMAP
(Internet Message Access Protocol), which is used for coordinating
the status of emails (read, deleted, moved) across multiple email
clients. With IMAP, a copy of every message is saved on the server,
so that this synchronization task can be completed.
• MDAs act as mailboxes, which store messages (as much as their
volume will allow) until the recipients check the box. It is also called
as LDA (Local Delivery Agent).MDA is protected by a user name
called a login and by a password.
• Any program that actually handles a message for delivery to the
point where it can be read by an email client application can be
considered an MDA.
• MDAs do not transport messages between systems nor do they
provide a user interface; MDAs distribute and sort messages on the
local machine for an email client application to access
• The MDA delivers mail to the recipient's local message store, which
by default on Red Hat Enterprise Linux is the directory
/var/spool/mail/$USER. In the Postfix mail server, an MDA is
included in the form of the local program.
• To get their messages from a remote desktop you need a POP server
that allows users to download messages or an IMAP server that
allows users to connect to the mail server and read the messages
while they're online.
MUQuestionPapers.com
Q4 d) Explain the various parameters for secure internet
configuration of Postfix server.
(5)
• There are a few more steps to take to configure a mail server, which
is going to handle messages from the Internet. Most of the additional
tasks relate to security. You'll need to make sure your mail server has
at least a minimum level of protection against spam and other email
abuses. To make a secure Internet configuration, you need to set
some additional parameters. All of these will be set in the
/etc/postfix/main.cf file.
# vi /etc/postfix/main.cf
Myhostname=
inet_protocols Ipv4
inet interfaces all alias_maps hash:
/etc/aliases
mydestination=
mynetworks =
/etc/postfix/main.cf
The following are the relevant parameters:
• myhostname: This parameter specifies the internet hostname of this
maildaemon. The default is to use the fully-qualified domain name.
• mydestination: This parameter specifies which destinations this
machine will deliver locally. Use the configuration locally which has
been provided bydefault in the server and change the localhost to the
domain name.
• mynetworks: This line is a bit riskier. This entry will define
authorizeddestinations that mail can be relayed from. If you are
thinking to add yoursubnet here, there are partial chances of its
success.
• mydomain: This parameter specifies the domain of this host. If not
set, thedomain name part of the FQDN is used.
• myorigin: This parameter determines the domain seen by the email
recipient when receiving messages. The default is to use the FQDN
of this host. This means that if user tyit on server root.example.com
sends a message, the recipient will see a message coming in from
[email protected] append the domain name only and not
the entire FQDN, use myorigin. $mydomain.
MUQuestionPapers.com
• inet interfaces: This parameter specifies the IP addresses of the mail
server to which it binds. By default, it is set to localhost only, which
means that your mail server cannot receive messages from the
Internet. To enable all inet_interfaces using inet_interfaces all.
• relayhost: This parameter contains the name of a host that is used to
relay all messages to. For example, you want the mail server of your
ISP to take care of all message delivery.
• To change any of these parameters which is present in
/etc/postfix/main.cf you can change the configuration file by hand
and restart postfix afterdoing so.
• Alternatively, you can use the postconf command to monitor and set
parameters.
MUQuestionPapers.com
• In this line, the allow rules are read first and give access to any host
that has an IP address starting with 10.100.
• However, after reading the deny line that denies access to all, the site
wouldbe closed, even for devices that have an IP address starting
with 10.100.
• If you want to make sure that everyone is denied with the exception
of devices that have an IP address starting with 10.100, you should
rewrite the statement as follows: order deny, allow allow from
10.100
deny from all
MUQuestionPapers.com
Therearetwowaystosourceascript.Thesetwolinesshowyouho
wtosourceascriptthathasthenamesettings:
.
setting
ssourc
esettin
gs
Itdoesn’treallymatterwhichoneyouusebecausebotharecompl
etelyequivalent.
MUQuestionPapers.com
Q5 d)Discuss the steps to setup fencing. (5)
Fencing is what you need to maintain the integrity of the cluster.
Hardware fencing means that a hardware device is used to terminate a
failing node. Typically, a power switches or integrated management
card.
• To set up fencing, two steps are needed. First step is to configure the
fence devices, and then associate the fence devices to the nodes in
the network. To define the fence device, Fence Devices tab needs to
be opened in the Conga management interface.
• After clicking Add, a list of all available fence devices is displayed.
A popular fence device type is IPMI LAN. This fence device can
send instructions to many integrated management cards. After
selecting the fence device, its properties need to be defined.
• These properties are different for each fence device, but they
commonly include a username, a password, and an IP address. After
entering these parameters, the device to the configuration can be
submitted.
• After defining the fence devices, these are needed to connect to
nodes. From the top of the Luci management interface, click Nodes,
and then select the node to which fence device need to be added.
• Scroll down on the node properties screen, and click the Add Fence
Method button. Next, name is to be entered for the fence method to
be used and for each method, click Add Fence Instance to add the
fence device created here. Submit the configuration, and repeat this
procedure for all the nodes in your cluster.
MUQuestionPapers.com
• For example, if the kickstart file is copied to the
server1.example.com web
server document root, add the following line as a boot option while
installing from a DVD:
linuxks=http://server1.example.com/anaconda-ks.cfg
• To use a kickstart file in an automated installation from a TFTP
server, addition of the kickstart file to the section in the TFTP
default file that starts the installation is needed. 16.3.2 Modifying the
Kickstart File with system-config-kickstart
• In the previous exercise, kickstart installation was started based on
the kickstart file created after the installation of server finished. To
avoid the questions asked during installation it needs to fine-tune the
kickstart configuration file which can be done using system-
configkickstart and new kickstart files can be created.
• The system-config-kickstart interface looks like the one used to
install an RHEL server, and all options are offered in different
categories, which are organized similar to the screens that pose
questions during an installation of Red Hat Enterprise Linux. File →
Open option to can be used to read an existing kickstart file.
• Under Boot Loader Options, installation of a new boot loader can be
specified and where it has to be installed. If specific kernel
parameters are needed while booting, that also can be specified.
Kickstarts can be updated about the partitions to be created on the
server. By default, the Network Configuration option is empty.
• If networking is needed on the server, Add Network Device option
to be used indicating the name of the device and how it can obtain
its network configuration.The Authentication option offers tabs to
specify external authentication services such as NIS, LDAP,
Kerberos, and some others.
• If not specified any of these then default to the local authentication
mechanism that goes through /etc/passwd, which is fine for many
servers. If server is connected directly to the Internet, turn firewall
on and select all of the trusted services that can be allowed. For the
Display Configuration option, installer can be informed whether
server should install a graphical environment.
• An interesting option is Package Selection. This option allows
selecting package categories; however it does not allow selecting
MUQuestionPapers.com
individual packages. If individual packages need to be selected,
manual configuration is needed.
• Finally, there are the Pre-Installation Script and Post-Installation
Script options that allow adding scripts to the installation procedure
to execute specific tasks while installing the server.
Q5 f) List the steps to configure DHCP PXE boot. (5)
• PXE Boot allows booting a server need to install from the network
card of the server. The PXE server then hands out a boot image,
which the desired installation server uses to start the initial phase of
the boot.
• Two steps are involved:
1. Firstly TFTP server needs to be installed and have it provide a
boot image to PXE clients.
2. Second DHCP needs to be configured to talk to the TFTP
server to provide the boot image to PXE clients.
• Installing the TFTP Server
1. To install the TFTP server package using yum y installtftp-
server. TFTP is managed by the xinetd service, and /etc/xinetd.d/tftp
file needs to be opened to tell xinetd that it should allow access to
TFTP and change the disabled parameter from Yes to No.
2. Next, restart the xinetd service using service xinetd restart.
Also make sure to make xinetd on during boot time using
chkconfigtftp on.
3. TFTP server is configured and ready to use now. Next is to
configure DHCP to communicate with the TFTP server to hand out a
boot image to PXE clients.
• Configuring DHCP for PXE Boot, Modify the DHCP server
configuration so that it can hand out a boot image to PXE clients. To
do this, include the boot lines in /etc/dhcpd/dhcpd.conf file, and
restart the DHCP server.
• The most important part of the example configuration in the above
listing file is the class pxeclientsdefinition.The match line ensures
that all servers that are performing a PXE boot are recognized
automatically.
• This is done to avoid problems and to have DHCP hand out the PXE
boot image only to servers that truly want to do a PXE boot. Next,
the next-server statement refers to the IP address of the server that
MUQuestionPapers.com
hand out the boot image. This is the server that runs the TFTP server.
Finally, a file is handed out.
MUQuestionPapers.com