EX200試験無料問題集「RedHat Red Hat Certified System Administrator - RHCSA 認定」
Your System is configured in 192.168.0.0/24 Network and your nameserver is 192.168.0.254. Make successfully resolve to server1.example.com.
正解:
nameserver is specified in question,
1. Vi /etc/resolv.conf
nameserver 192.168.0.254
2. host server1.example.com
1. Vi /etc/resolv.conf
nameserver 192.168.0.254
2. host server1.example.com
Your System is going to use as a Router for two networks. One Network is 192.168.0.0/24 and Another Network is 192.168.1.0/24. Both network's IP address has assigned. How will you forward the packets from one network to another network?
正解:
echo "1" >/proc/sys/net/ipv4/ip_forward
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To enable on running session just set value 1 to
/proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To enable on running session just set value 1 to
/proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.
One Logical Volume named /dev/test0/testvolume1 is created. The initial Size of that disk is 100MB now you required more 200MB. Increase the size of Logical Volume, size should be increase on online.
正解:
lvextend -L+200M /dev/test0/testvolume1 Use lvdisplay /dev/test0/testvolume1) ext2online -d /dev/test0/testvolume1 lvextend command is used the increase the size of Logical Volume. Other command lvresize command also here to resize. And to bring increased size on online we use the ext2online command.
Configure a HTTP server, which can be accessed through http://station.domain40.example.com.
Please download the released page from http://ip/dir/example.html.
Please download the released page from http://ip/dir/example.html.
正解:
# yum install -y httpd
# chkconfig httpd on
# cd /var/www/html
# wget http://ip/dir/example.html
# cp example.com index.html
# vim /etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.0.254:80
<VirtualHost 192.168.0.254:80>
DocumentRoot /var/www/html/
ServerName station.domain40.example.com
</VirtualHost>
# chkconfig httpd on
# cd /var/www/html
# wget http://ip/dir/example.html
# cp example.com index.html
# vim /etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.0.254:80
<VirtualHost 192.168.0.254:80>
DocumentRoot /var/www/html/
ServerName station.domain40.example.com
</VirtualHost>
Configure a user account.
Create a user iar,uid is 3400. Password is redhat
Create a user iar,uid is 3400. Password is redhat
正解:
useradd -u 3400 iar
passwd iar
passwd iar
Create a Shared Directory.
Create a shared directory /home/admins, make it has the following characteristics:
/home/admins belongs to group adminuser
This directory can be read and written by members of group adminuser Any files created in /home/ admin, group automatically set as adminuser.
Create a shared directory /home/admins, make it has the following characteristics:
/home/admins belongs to group adminuser
This directory can be read and written by members of group adminuser Any files created in /home/ admin, group automatically set as adminuser.
正解:
mkdir /home/admins
chgrp -R adminuser /home/admins
chmodg+w /home/admins
chmodg+s /home/admins
chgrp -R adminuser /home/admins
chmodg+w /home/admins
chmodg+s /home/admins
There is a local logical volumes in your system, named with shrink and belong to VGSRV volume group, mount to the /shrink directory. The definition of size is 320 MB.
Requirement:
Reduce the logical volume to 220 MB without any loss of dat
a. The size is allowed between 200-260 MB after reducing.
Requirement:
Reduce the logical volume to 220 MB without any loss of dat
a. The size is allowed between 200-260 MB after reducing.
正解:
cd;umount /shrink
e2fsck -f /dev/mapper/vgsrv-shrink
resize2fs /dev/mapper/vgsrv-shrink 220M
lvreduce -L 220M /dev/mapper/vgsrv-shrink
mount -a
e2fsck -f /dev/mapper/vgsrv-shrink
resize2fs /dev/mapper/vgsrv-shrink 220M
lvreduce -L 220M /dev/mapper/vgsrv-shrink
mount -a
Configure a task: plan to run echo hello command at 14:23 every day.
正解:
# which echo
# crontab -e
23 14 * * * /bin/echo hello
# crontab -l (Verify)
# crontab -e
23 14 * * * /bin/echo hello
# crontab -l (Verify)
Find Files
Find all files belonging to the user "jacques" and move them to the directory /root/findfiles under the root directory.
Find all files belonging to the user "jacques" and move them to the directory /root/findfiles under the root directory.
正解:
[root@node1 ~]# mkdir /root/findfiles
[root@node1 ~]# find / -user jacques
[root@node1 ~]# find / -user jacques -exec cp -a {} /root/findfiles \;
# Verification
[root@node1 ~]# ll /root/findfiles/
[root@node1 ~]# find / -user jacques
[root@node1 ~]# find / -user jacques -exec cp -a {} /root/findfiles \;
# Verification
[root@node1 ~]# ll /root/findfiles/
Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.
正解:
# cd /home/
# mkdir admins /
# chown .admin admins/
# chmod 770 admins/
# chmod g+s admins/
# mkdir admins /
# chown .admin admins/
# chmod 770 admins/
# chmod g+s admins/