EX200 Korean試験無料問題集「RedHat Red Hat Certified System Administrator - RHCSA (EX200 Korean Version) 認定」
다음 요구 사항에 따라 로컬 디렉토리 /common/admin을 생성합니다.
이 디렉토리에는 admin 그룹이 있습니다.
이 디렉토리는 모든 관리자 그룹 구성원에게 읽기, 쓰기, 실행 권한을 부여합니다.
다른 그룹과 사용자에게는 아무런 권한이 없습니다.
/common/admin에서 생성된 모든 문서나 디렉토리는 자동으로 admin 그룹을 상속받습니다.
이 디렉토리에는 admin 그룹이 있습니다.
이 디렉토리는 모든 관리자 그룹 구성원에게 읽기, 쓰기, 실행 권한을 부여합니다.
다른 그룹과 사용자에게는 아무런 권한이 없습니다.
/common/admin에서 생성된 모든 문서나 디렉토리는 자동으로 admin 그룹을 상속받습니다.
正解:
mkdir -p /common/admin
chgrp admin /common/admin
chmod 2770 /common/admin
chgrp admin /common/admin
chmod 2770 /common/admin
시스템에 로컬 논리 볼륨이 있는데, shrink라는 이름이 붙었고 VGSRV 볼륨 그룹에 속하며 /shrink 디렉토리에 마운트합니다. 크기 정의는 320MB입니다.
요구 사항:
데이터 손실 없이 논리 볼륨을 220MB로 줄이십시오.
a. 축소 후 허용 크기는 200-260MB입니다.
요구 사항:
데이터 손실 없이 논리 볼륨을 220MB로 줄이십시오.
a. 축소 후 허용 크기는 200-260MB입니다.
正解:
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
autofs 구성
아래 설명된 대로 원격 사용자의 홈 디렉토리를 자동으로 마운트하도록 autofs를 구성합니다.
- materials.example.com(172.25.254.254)은 NFS를 통해 /rhome을 시스템으로 내보냅니다. 이 파일 시스템에는 사용자 remoteuser1에 대한 미리 구성된 홈 디렉토리가 포함되어 있습니다.
- remoteuser1의 홈 디렉토리는 materials.example.com:/rhome/remoteuser1입니다.
- remoteuser1의 홈 디렉토리는 자동으로 로컬 /rhome/remoteuser1에 마운트되어야 합니다.
- 홈 디렉토리는 사용자가 쓸 수 있어야 합니다.
- remoteuser1의 비밀번호는 "flectrag"입니다.
아래 설명된 대로 원격 사용자의 홈 디렉토리를 자동으로 마운트하도록 autofs를 구성합니다.
- materials.example.com(172.25.254.254)은 NFS를 통해 /rhome을 시스템으로 내보냅니다. 이 파일 시스템에는 사용자 remoteuser1에 대한 미리 구성된 홈 디렉토리가 포함되어 있습니다.
- remoteuser1의 홈 디렉토리는 materials.example.com:/rhome/remoteuser1입니다.
- remoteuser1의 홈 디렉토리는 자동으로 로컬 /rhome/remoteuser1에 마운트되어야 합니다.
- 홈 디렉토리는 사용자가 쓸 수 있어야 합니다.
- remoteuser1의 비밀번호는 "flectrag"입니다.
正解:
# Preparations (not required for the exam)
# Go back to foundation0, remote into classroom, create the remoteuser1 user and directory.
# This step is necessary to avoid issues with autofs mounting during testing.
[kiosk@foundation0 ~]$ ssh root@classroom 'useradd -u 1010 remoteuser1 && mkdir -p /rhome/remoteuser1 && chown remoteuser1: /rhome/remoteuser1'
# Install nfs-utils and autofs
[root@node1 ~]# yum -y install nfs-utils autofs
[root@node1 ~]# vim /etc/auto.master
/rhome /etc/auto.rhome
[root@node1 ~]# vim /etc/auto.rhome
remoteuser1 -rw materials.example.com:/rhome/remoteuser1
[root@node1 ~]# systemctl enable --now autofs
# Verification
[root@node1 ~]# ll /rhome/
[root@node1 ~]# ssh remoteuser1@localhost
remoteuser1@localhost\'s password: `flectrag`
$ pwd
/rhome/remoteuser1
$ touch my.file
$ mount | grep rhome
...
materials.example.com:/rhome/remoteuser1 on /rhome/remoteuser1 type nfs4 (`rw`,relatime,vers=4.2,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.25.250.100,local_lock=none,addr=172.25.254.254)
# Go back to foundation0, remote into classroom, create the remoteuser1 user and directory.
# This step is necessary to avoid issues with autofs mounting during testing.
[kiosk@foundation0 ~]$ ssh root@classroom 'useradd -u 1010 remoteuser1 && mkdir -p /rhome/remoteuser1 && chown remoteuser1: /rhome/remoteuser1'
# Install nfs-utils and autofs
[root@node1 ~]# yum -y install nfs-utils autofs
[root@node1 ~]# vim /etc/auto.master
/rhome /etc/auto.rhome
[root@node1 ~]# vim /etc/auto.rhome
remoteuser1 -rw materials.example.com:/rhome/remoteuser1
[root@node1 ~]# systemctl enable --now autofs
# Verification
[root@node1 ~]# ll /rhome/
[root@node1 ~]# ssh remoteuser1@localhost
remoteuser1@localhost\'s password: `flectrag`
$ pwd
/rhome/remoteuser1
$ touch my.file
$ mount | grep rhome
...
materials.example.com:/rhome/remoteuser1 on /rhome/remoteuser1 type nfs4 (`rw`,relatime,vers=4.2,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.25.250.100,local_lock=none,addr=172.25.254.254)
2부(Node2 서버)
과제 6 [고급 스토리지 기능 구현]
가상 머신에 10GiB 크기의 새 디스크를 추가합니다.
이 디스크에서 50GiB 크기의 VDO 볼륨을 생성하고 xfs 파일 시스템을 사용하여 /vbread에 영구적으로 마운트합니다.
과제 6 [고급 스토리지 기능 구현]
가상 머신에 10GiB 크기의 새 디스크를 추가합니다.
이 디스크에서 50GiB 크기의 VDO 볼륨을 생성하고 xfs 파일 시스템을 사용하여 /vbread에 영구적으로 마운트합니다.
正解:
* [root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdd 252:48 0 5G 0 disk
vde 252:64 0 10G 0 disk
[root@node2 ~]# yum install kmod-kvdo vdo
[root@node2 ~]# systemctl enable --now vdo
[root@node2 ~]# systemctl start vdo
[root@node2 ~]# systemctl status vdo
[root@node2 ~]# vdo create --name=vdo1 --device=/dev/vde --vdoLogicalSize=50G
[root@node2 ~]# vdostats --hu
Device Size Used Available Use% Space saving%
/dev/mapper/vdo1 10.0G 4.0G 6.0G 40% N/A
[root@node2 ~]# mkfs.xfs -K /dev/mapper/vdo1
* [root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vde 252:64 0 10G 0 disk
└─vdo1 253:4 0 50G 0 vdo
[root@node2 ~]# mkdir /vbread
[root@node2 ~]# blkid
/dev/mapper/vdo1: UUID="1ec7a341-6051-4aed-8a2c-4d2d61833227" BLOCK_SIZE="4096" TYPE="xfs"
[root@node2 ~]# vim /etc/fstab
UUID=1ec7a341-6051-4aed-8a2c-4d2d61833227 /vbread xfs defaults,x-systemd.requires=vdo.service 0 0
[root@node2 ~]# mount /dev/mapper/vdo1 /vbread/
[root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vdo1 xfs 50G 390M 50G 1% /vbread
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdd 252:48 0 5G 0 disk
vde 252:64 0 10G 0 disk
[root@node2 ~]# yum install kmod-kvdo vdo
[root@node2 ~]# systemctl enable --now vdo
[root@node2 ~]# systemctl start vdo
[root@node2 ~]# systemctl status vdo
[root@node2 ~]# vdo create --name=vdo1 --device=/dev/vde --vdoLogicalSize=50G
[root@node2 ~]# vdostats --hu
Device Size Used Available Use% Space saving%
/dev/mapper/vdo1 10.0G 4.0G 6.0G 40% N/A
[root@node2 ~]# mkfs.xfs -K /dev/mapper/vdo1
* [root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vde 252:64 0 10G 0 disk
└─vdo1 253:4 0 50G 0 vdo
[root@node2 ~]# mkdir /vbread
[root@node2 ~]# blkid
/dev/mapper/vdo1: UUID="1ec7a341-6051-4aed-8a2c-4d2d61833227" BLOCK_SIZE="4096" TYPE="xfs"
[root@node2 ~]# vim /etc/fstab
UUID=1ec7a341-6051-4aed-8a2c-4d2d61833227 /vbread xfs defaults,x-systemd.requires=vdo.service 0 0
[root@node2 ~]# mount /dev/mapper/vdo1 /vbread/
[root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vdo1 xfs 50G 390M 50G 1% /vbread
1. /etc 디렉토리에서 10k 파일이나 디렉토리의 모든 크기를 찾아 /tmp/findfiles 디렉토리로 복사합니다.
2. 소유자가 Lucy인 모든 파일이나 디렉토리를 찾아 /tmp/findfiles 디렉토리로 복사합니다.
2. 소유자가 Lucy인 모든 파일이나 디렉토리를 찾아 /tmp/findfiles 디렉토리로 복사합니다.
正解:
(1)find /etc -size 10k -exec cp {} /tmp/findfiles \;
(2)find / -user lucy -exec cp -a {} /tmp/findfiles \;
Note: If find users and permissions, you need to use cp - a options, to keep file permissions and user attributes etc.
(2)find / -user lucy -exec cp -a {} /tmp/findfiles \;
Note: If find users and permissions, you need to use cp - a options, to keep file permissions and user attributes etc.
시스템의 기본 소프트웨어 저장소를 구성합니다.
하나의 YUM이 이미 http://server.domain11.example.com/pub/x86_64/Server에서 시스템을 구성하도록 제공되었으며 정상적으로 사용할 수 있습니다.
하나의 YUM이 이미 http://server.domain11.example.com/pub/x86_64/Server에서 시스템을 구성하도록 제공되었으며 정상적으로 사용할 수 있습니다.
正解:
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.
작업 구성: 매일 14:23에 echo "file" 명령을 실행하도록 계획합니다.
正解:
(a) Created as administrator
# crontab -u natasha -e
23 14 * * * /bin/echo "file"
(b)Created as natasha
# su - natasha
$ crontab -e
23 14 * * * /bin/echo "file"
# crontab -u natasha -e
23 14 * * * /bin/echo "file"
(b)Created as natasha
# su - natasha
$ crontab -e
23 14 * * * /bin/echo "file"
작업 구성: 매일 14:23에 echo hello 명령을 실행하도록 계획합니다.
正解:
# which echo
# crontab -e
23 14 * * * /bin/echo hello
# crontab -l (Verify)
# crontab -e
23 14 * * * /bin/echo hello
# crontab -l (Verify)
귀하의 시스템은 172.24.0.0/16 및 172.25.0.0/16의 라우터로 사용됩니다. IP 전달을 활성화합니다.
1. echo "1" >/proc/sys/net/ipv4/ip_forward
2. vi /etc/sysctl.conf net.ipv4.ip_forward=1
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.
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.