RHCSA Sa1 2 EXAM Questions (1) 2
RHCSA Sa1 2 EXAM Questions (1) 2
RHCSA Sa1 2 EXAM Questions (1) 2
**********************************************
RHCSA-VM configuration:
*you have been provided a virtual box named as serverX.example.com (hint:where X is your domain
number)
* password for both virtual machine should be “Postroll”
*serverX.example.com provided with ip=172.25.X.11/255.255.255.0
*serverX.example.com are provided with gateway 172.25.254.254 & example.com dns domain with the
IP: 172.25.254.254
nmcli connection add con-name eth0 ifname eth0 type ethernet ip4 172.25.9.11/24 gw4
172.25.254.254
—————————-
* Set the Hostname
ping 172.25.9.11
ping 172.25.9.10
ping 172.25.254.254
ping example.com
* if the vm has set with multi-user.target then set it to graphical.target, but don’t forget to revert
back to multi-user.target
1) configure Selinux
vim /etc/selinux/config
Change this
SELINUX=enforcing
partx /dev/vdb
vim /etc/fstab --------> Create the mount point inside the fstab
fdisk /dev/vdb ----- > Create the Partition of 150M and set it's type 82 (which set
its the swap type partition)
partx /dev/vdb --- If you didn't get the partition, just reboot the system, don't get
panic
swapon /dev/vdb3
swapon -a
vim /etc/fstab --------> Create the mount point inside the fstab
Verify:
free -m
swapon -s
vim /etc/yum.repos.d/rhcsa.repo
[localrepo]
gpgcheck = 0
enabled = 1
Test:
yum repolist
groupadd sysgrp
useradd andrew
useradd susan
Verification:
# id andrew
# id susan
mkdir -p /redhat/sysgrp
Verification:
# ls -ld /redhat/sysgrp
vim /etc/yum.repos.d/rhcsa.repo
[kernelrepo]
baseurl =
[url="http://content.example.com/rhel7.0/x86_64/errata"]http://content.example.com/rh
el7.0/x86_64/errata[/url]
gpgcheck = 0
enabled = 1
yum repolist
uname -rms
After Kernel installation, reboot the system and run this command again
# uname -rms
vim /etc/sysctl.conf
net.ipv4.ip_forward = 1
Enable it using:
sysctl -p
9) The user andrew must configure a cron job that runs daily at 14:23 local time and executes –
/bin/echo hiya
23 14 * * * /bin/echo hiya
Verification:
10) Bind with LDAP used provided by classroom.example.com for userr authentication.
Note the following:-
–> The LDAP search base DN is dc=example,dc=com
–> The LDAP certificate file is
http://classroom.example.com/pub/EXAMPLE-CA-CERT
–>ldapuserX should be able to log into your system, whereX is your ServerX ((hint:where X is your
domain number),
but will not have a home directory, until you have completed the autofs requirement,below all
LDAP users have password of “password”
Verification:
#ssh ldapuser9@localhost
vim /etc/auto.master.d/home.autofs
/home/guests /etc/auto.home
vim /etc/auto.home
Verification:
#ssh ldapuser9@localhost
[ldapuser9@server9 ~]$ df -h
Filesystem Size
Used Avail Use% Mounted on
/dev/vda1 10G
3.4G 6.7G 34% /
devtmpfs 901M
0 901M 0% /dev
tmpfs 921M
0 921M 0% /dev/shm
tmpfs 921M
17M 904M 2% /run
tmpfs 921M
0 921M 0% /sys/fs/cgroup
/dev/vdb2 93M
1.6M 85M 2% /gluster
vim /etc/chrony.conf
Verification:
cp /etc/fstab /var/tmp/
chown root:root /var/tmp/fstab
Verification:
getfacl /var/tmp/fstab
# su - andrew
[andrew@server9 ~]$ vim /var/tmp/fstab ----> Try to write anything to the file and it
should be successful
logout
# su - susan
logout
umount /datasource
e2fsck f /dev/datacontainer/datacopy
mount a
Verification:
# id talusan
find the file which owned by user julice and copy the file into /root/findresults directory.
mkdir -p /root/findresults
16) create a new physical volume, create a new volume group in the name of datacontainer, vg
extent is 16.00MB
create a new logical volume in the name of datacopy with the size of 50 extents and file system
must vfat then
mount it under /datasource
fdisk /dev/vdb ----- > Create the Partition of 802M[ (16*50) + 2 ] and set it's type
8e (which is LVM type)
partx /dev/vdb --- If you didn't get the partition, just reboot the system, don't get
panic
pvcreate /dev/vdb5
vgdisplay -----> Check the vg extent size, its should be this (PE Size 16.00 MiB)
lvdisplay ------------> Check the size of extents and it should be(Current LE 50)
vim /etc/fstab --------> Create the mount point inside the fstab
mount -a
Verification:
17) create an archive file /root/local.tgz for /usr/local. it should be compressed by gzip.
18) search the string sarah in the /etc/passwd file and save the output in /root/lines
# cat lines
sarah:x:1004:1005::/home/sarah:/sbin/nologin