EX 200 Answer
EX 200 Answer
EX 200 Answer
Answer:
# vim /etc/sysconfig/selinux
SELINUX=enforcing
# reboot (***MUST***)
# getenforce
Answer:
# fdisk /dev/vda
…
..
# partprobe /dev/vda
# mkfs.xfs /dev/vdaX [ Here X is your New Partition Number]
# mkdir /coss/new -p
#vim /etc/fstab
# mount –a
# df –h
Answer:
# df –h
Size: 250M (So need to reduce)
# lvdisplay
Path: /dev/vgsrv/lvm_1
# umount / testlvm
# e2fsck -f /dev/vgsrv/lvm_1
# resize2fs /dev/vgsrv/lvm_1 200M [always reach point]
# lvreduce -L 200M /dev/vgsrv/lvm_1
# mount –a
# df -h
Question 4: Extend or Resize the LVM partition /dev/vgdev/lvm into 250M from
the current size and mount the LVM /dev/vgdev/lvm to a mount point /devlv.
The extended partition size must be within approximately 220MB to 260MB and
useable.
Answer:
# df –h
Size: 200M
# lvdisplay
Path: /dev/vgdev/lvm
Answer:
Create a partition with size 32*20=640M more like 700 MB. And change type 8e
for linux lvm.
# pvcreate /dev/vda7
# vgcreate –s 32M department /dev/vda7
# lvcreate –l 20 –n engineering department.
# mkfs.ext4 /dev/department/engineering
# mkdir /testing
# mount /dev/department /testing
# vim /etc/fstab
Question 6: Install rpm on the examination system using the following source
for the Installation media:
Once your system is installed the distribution is available via YUM:
YUM http://content.example.com/pub/rhel7.0/x86_64/dvd
Answer:
# cd /etc/yum.repos.d/
# ls
# vim yum.repo
[Basic]
name=Yum Client
baseurl=http://content.example.com/pub/rhel7.0/x86_64/dvd
enabled=1
gpgcheck=0
Answer:
# yum install zsh* -y
Answer:
# useradd –u 1800 neo
# id neo
Answer:
# mkdir -p /shared/sysusers
# chgrp sysusers /shared/sysusers
# ls –ld /shared/sysusers [check]
# chmod 770 /shared/sysusers
# chmod 2770 /shared/sysusers
Question 11: Install the appropriate kernel update from
http://classroom.example.com/pub/update.
The updated kernel is the default kernel when the system is rebooted
The original kernel remains available and bootable on the system.
Answer:
# yum install kernel
# reboot
Question 12: The user robert must configure a cron job that runs daily at
15:25 local time and executes /bin/echo I got RHCE Certificate
Answer:
# man 5 crontab [crontab command manual]
# crontab –e –u Robert
25 15 * * * /bin/echo I got RHCE Certificate
# systemctl restart crond
# chkconfig enable crond
# crontab –l –u robert [check]
Question 13: Deny cronjob for user andrew so that other user for this system
are not effected for this cronjob.
Answer:
# vim /etc/cron.deny
andrew [insert into this file]
Question 14: Copy the file /etc/passwd to /var/tmp. Configure the permissions
of
/var/tmp/passwd so that:
Answer:
# yum install system-config-date chrony -y
# system-config-date
# Select Tab (Network Time Protocol)
# Check (Enable Network Time Protocol)
# Select +Add (classroom.example.com) then OK
Then
#
# systemctl enable chronyd
# systemctl restart chronyd.
# systemctl disable ntpd [ if any]
# hwclock --systohc
Question 16: Find all files owned by user brian and put them into /root/brian
Or
locate the files of owner "brian" and copy those files to the
/root/brian.
Answer:
# find / -user brian –exec cp –vrp {} /root/brian \;
Or
# find / -user brian
[ Then Copy the file manually]
Question 17: Download a file word.dict from http://172.25.254.254/pub Copy all the
lines from /root/word.dict files that contains the word "blue" and
put those lines in /root/sorted.dict
Answer:
# vim worddb.dict
Question 18: Configure server to get information about network users from a
LDAP Directory Server available to all machine in the classroom. Here is
information that was provided to you about LDAP.
OR
Answer:
# yum install authconfig-gtk sssd krb5-workstation
# systemctl isolate graphical.target
[ or if you from remote system do ssh –X [email protected]]
# system-config-authentication
# system-config-authentication
Question 19:
/home/guests /etc/ldap.auto
# vim /etc/auto.ldap
Download http://classroom.example.com/pub/rhce/stationX.html
Rename the download file to index.html
Copy this index.html to the DocumentRoot of your web server
Do NOT make any modifications to the content of index.html
Answer:
# yum install httpd* -y
# systemctl restart httpd
# systemctl enable httpd
Question 21: The user neo must confiure a cron job that runs daily at 15:25
local time and executes /bin/echo I got RHCE Certificate
Answer:
# crontab –e –u neo
# bzip2 /home/etc.tar.bz2
Method 2: