EX200試験無料問題集「RedHat Red Hat Certified System Administrator - RHCSA 認定」

Find String
Find all lines containing the string "ng" in the file /usr/share/xml/iso-codes/iso_639_3.xml.
Save copies of all these lines to /root/list in the root directory.
/root/list must not contain empty lines, and all lines must be exact copies of the original lines in /usr/share/xml/iso-codes/iso_639_3.xml.
正解:
[root@node1 ~]# grep ng /usr/share/xml/iso-codes/iso_639_3.xml
[root@node1 ~]# grep ng /usr/share/xml/iso-codes/iso_639_3.xml > /root/list
# Verification
[root@node1 ~]# cat /root/list
A YUM source has been provided in the
http://instructor.example.com/pub/rhel6/dvd
Configure your system and can be used normally.
正解:
/etc/yum.repos.d/base.repo
[base]
name=base
baseurl=http://instructor.example.com/pub/rhel6/dvd
gpgcheck=0
yum list
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.
正解:
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.
Create the user named eric and deny to interactive login.
正解:
useradd eric
passwd eric
vi /etc/passwd
eric:x:505:505::/home/eric:/sbin/nologin
Which shell or program should start at login time is specified in /etc/passwd file? By default, Redhat Enterprise Linux assigns the /bin/bash shell to the users. To deny the interactive login, you should write /sbin/nologin or /bin/ false instead of login shell.
The firewall must be open.
正解:
/etc/init.d/iptables start
iptables -F
iptables -X
iptables -Z
/etc/init.d/iptables save
chkconfig iptables on
Who ever creates the files/directories on archive group owner should be automatically should be the same group owner of archive.
正解:
chmod g+s /archive
Verify using: ls -ld /archive Permission should be like:
drwxrws--- 2 root sysuser 4096 Mar 16 18:08 /archive
If SGID bit is set on directory then who every users creates the files on directory group owner automatically the owner of parent directory.
To set the SGID bit: chmod g+s directory
To Remove the SGID bit: chmod g-s directory
Your System is going use as a router for 172.24.0.0/16 and 172.25.0.0/16. Enable the IP Forwarding.
1. echo "1" >/proc/sys/net/ipv4/ip_forward
2. vi /etc/sysctl.conf net.ipv4.ip_forward=1
正解:
/proc is the virtual filesystem, containing the information about the running kernel.
To change the parameter of running kernel you should modify on /proc. From Next reboot the system, kernel will take the value from /etc/sysctl.conf.
The user authentication has been provided by ldap domain in 192.168.0.254. According the following requirements to get ldapuser.
-LdapuserX must be able to login your system, X is your hostname number. But the ldapuser's home directory cannot be mounted, until you realize automatically mount by autofs server.
- All ldap user's password is "password".
正解:
system-config-authentication &
Part 1 (on Node1 Server)
Task 13 [Archiving and Transferring Files & SELinux]
Create a backup file named /root/backup.tar.bz2. The backup file should contain the content of /usr/local and should be zipped with bzip2 compression format.
Furthermore, ensure SELinux is in enforcing mode. If it is not, change SELinux to enforcing mode.
正解:
* [root@node1 ~]# tar cvf /root/backup.tar /usr/local/
tar: Removing leading `/' from member names
/usr/local/
/usr/local/bin/
/usr/local/etc/
[root@node1 ~]# ls
backup.tar
[root@node1 ~]# file backup.tar
backup.tar: POSIX tar archive (GNU)
[root@node1 ~]# bzip2 backup.tar
[root@node1 ~]# ls
backup.tar.bz2
[root@node1 ~]# file backup.tar.bz2
backup.tar.bz2: bzip2 compressed data, block size = 900k
*
[root@node1 ~]# sestatus
SELinux status: enabled
[root@node1 ~]# cat /etc/selinux/config
SELINUX=enforcing
SELINUXTYPE=targeted
[root@node1 ~]# reboot
### For Checking ###
[root@node1 ~]# sestatus
SELinux status: enabled
Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.
正解:
Use fdisk /dev/hda ->To create new partition.
Type n-> For New partition
It will ask for Logical or Primary Partitions. Press l for logical.
It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.
Type the Size: +100M ->You can Specify either Last cylinder of Size here.
Press P to verify the partitions lists and remember the partitions name. Default System ID is 83 that means Linux Native.
Type t to change the System ID of partition.
Type Partition Number
Type 82 that means Linux Swap.
Press w to write on partitions table.
Either Reboot or use partprobe command.
mkswap /dev/hda? ->To create Swap File system on partition.
swapon /dev/hda? ->To enable the Swap space from partition.
free -m ->Verify Either Swap is enabled or not.
vi /etc/fstab/dev/hda? swap swap defaults 0 0
Reboot the System and verify that swap is automatically enabled or not.