Correct Answer:A. Explanation:
[root@node1 ~]# vim /etc/yum.repos.d/redhat.repo
[BaseOS]
name=BaseOS
baseurl=http://utility.domain15.example.com/BaseOS
enabled=1
gpgcheck=1
gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
[AppStream]
name=AppStream
baseurl=http://utility.domain15.example.com/AppStream
enabled=1
gpgcheck=1
gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
[root@node1 ~]# yum clean all
[root@node1 ~]# yum repolist
repo id repo name
AppStream AppStream
BaseOS BaseOS
[root@node1 ~]# yum list all
Question 2
Part 2 (on Node2 Server)
Task 5 [Managing Logical Volumes]
Add an additional swap partition of 656 MiB to your system. The swap partition should automatically mount when your system boots
Do not remove or otherwise alter any existing swap partition on your system
Correct Answer:A. Explanation:
*
[root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdc 252:32 0 5G 0 disk
vdc1 252:33 0 4.1G 0 part
datavg-datalv 253:3 0 3.9G 0 lvm /data
vdd 252:48 0 5G 0 disk
vde 252:64 0 10G 0 disk
[root@node2 ~]# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 2097148 1548 -2
[root@node2 ~]# free -m
total used free shared buff/cache available
Mem: 1816 1078 104 13 633 573
Swap: 2047 1 2046
[root@node2 ~]# parted /dev/vdc print
Number Start End Size Type File system Flags
1 1049kB 4404MB 4403MB primary lvm
*
[root@node2 ~]# parted /dev/vdc mkpart primary linux-swap 4404MiB 5060MiB
[root@node2 ~]# mkswap /dev/vdc2
Setting up swapspace version 1, size = 656 MiB (687861760 bytes)
no label, UUID=9faf818f-f070-4416-82b2-21a41988a9a7
[root@node2 ~]# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 2097148 1804 -2
[root@node2 ~]# swapon /dev/vdc2
*
[root@node2 ~]# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 2097148 1804 -2
/dev/vdc2 partition 671740 0 -3
[root@node2 ~]# blkid
/dev/vdc2: UUID='9faf818f-f070-4416-82b2-21a41988a9a7' TYPE='swap' PARTUUID='0f22a35f-02'
[root@node2 ~]# vim /etc/fstab
UUID=9faf818f-f070-4416-82b2-21a41988a9a7 swap swap defaults 0 0
[root@node2 ~]# reboot
[root@node2 ~]# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 2097148 1804 -2
/dev/vdc2 partition 671740 0 -3
Question 3
Install the Kernel Upgrade.
Install suitable kernel update from:
http://server.domain11.example.com/pub/updates.
Following requirements must be met:
Updated kernel used as the default kernel of system start-up.
The original kernel is still valid and can be guided when system starts up.
Correct Answer:A. Explanation:
Using the browser open the URL in the question, download kernel file to root or home directory.
uname --r// check the current kernel version
rpm --ivh kernel-*.rpm
vi /boot/grub.conf// check
Some questions are: Install and upgrade the kernel as required. To ensure that grub2 is the default item for startup.
Yum repo : http://content.example.com/rhel7.0/x86-64/errata
OR
uname -r // check kernel
Yum-config-manager --add-repo=''http://content.example.com/rhel7.0/x86-64/ errata''
Yum clean all
Yum list kernel// install directly
Yum -y install kernel// stuck with it, do not pipe! Please do not pipe!
Default enable new kernel grub2-editenv list// check
Modify grub2-set-default ''kernel full name''
Grub2-mkconfig --o/boot/grub2/grub.cfg// Refresh
Question 4
Install a FTP server, and request to anonymous download from /var/ftp/pub catalog. (it needs you to configure yum direct to the already existing file server.)
Correct Answer:A. Explanation:
# cd /etc/yum.repos.d
# vim local.repo
[local]
name=local.repo
baseurl=file:///mnt
enabled=1
gpgcheck=0
# yum makecache
# yum install -y vsftpd
# service vsftpd restart
# chkconfig vsftpd on
# chkconfig --list vsftpd
# vim /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
Question 5
Configure a default software repository for your system.
One YUM has already provided to configure your system on http://server.domain11.example.com/pub/ x86_64/Server, and can be used normally.
Correct Answer:A. Explanation:
Yum-config-manager --add-repo=http://content.example.com/rhel7.0/x86-64/dvd'' is to generate a file vim content.example.com_rhel7.0_x86_64_dvd.repo, Add a line gpgcheck=0
Yumcleanall
Yumrepolist
Almost 4305 packages are right, Wrong Yum Configuration will lead to some following questions cannot be worked out.
Question 6
One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make successfully the size of that Logical Volume 500M without losing any dat
a. As well as size should be increased online.
Correct Answer:A. Explanation:
The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are set up in a bunch of equal sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system, let's start with some basic definitions:
Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical partition. It can also be a RAID array.
Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size. Different LV groups can have different sized PEs.
Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.
Logical Volume (LV) is composed of a group of LEs. You can mount a file system such as /home and /var on an LV.
Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a specific VG.
Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1
Verify the Size on mounted directory: df -h or df -h mounted directory name
Use: lvextend -L+400M /dev/vg0/lv1
ext2online -d /dev/vg0/lv1 to bring extended size online.
Again Verify using lvdisplay and df -h command.
Question 7
There is a server having 172.24.254.254 and 172.25.254.254. Your System lies on 172.24.0.0/16. Make successfully ping to 172.25.254.254 by Assigning following IP: 172.24.0.x where x is your station number.
Correct Answer:A. Explanation:
Use netconfig command
Enter the IP Address as given station number by your examiner: example: 172.24.0.1
Enter Subnet Mask
Enter Default Gateway and primary name server
press on ok
ifdown eth0
ifup eth0
verify using ifconfig
In the lab server is playing the role of router, IP forwarding is enabled. Just set the Correct IP and gateway, you can ping to 172.25.254.254.
Question 8
Create a user named alex, and the user id should be 1234, and the password should be alex111.
Correct Answer:A. Explanation:
# useradd -u 1234 alex
# passwd alex
alex111
alex111
OR
echo alex111|passwd -stdin alex
Question 9
Part 1 (on Node1 Server)
Task 5 [Controlling Access to Files with ACLs]
Copy the file /etc/fstab to /var/tmp. Configure the following permissions on /var/tmp/fstab.
The file /var/tmp/fstab is owned by root user
The file /var/tmp/fstab is belongs to the root group
The file /var/tmp/fstab should be executable by anyone
The user harry is able to read and write on /var/tmp/fstab
The user natasha can neither read or write on /var/tmp/fstab
All other users (Current or future) have the ability to read /var/tmp/fstab
One Logical Volume is created named as myvol under vo volume group and is mounted. The Initial Size of that Logical Volume is 400MB. Make successfully that the size of Logical Volume 200MB without losing any dat
a. The size of logical volume 200MB to 210MB will be acceptable.
Correct Answer:A. Explanation:
First check the size of Logical Volume: lvdisplay /dev/vo/myvol
Make sure that the filesystem is in a consistent state before reducing:
# fsck -f /dev/vo/myvol
Now reduce the filesystem by 200MB.
# resize2fs /dev/vo/myvol 200M
It is now possible to reduce the logical volume. #lvreduce /dev/vo/myvol -L 200M
Verify the Size of Logical Volume: lvdisplay /dev/vo/myvol
Verify that the size comes in online or not: df -h