EX200日本語試験無料問題集「RedHat Red Hat Certified System Administrator - RHCSA (EX200日本語版) 認定」
パート1(Node1サーバー上)
タスク2 [ソフトウェアパッケージのインストールと更新]
この場所をデフォルトのリポジトリとして使用するようにシステムを構成します。
http://utility.domain15.example.com/BaseOS
http://utility.domain15.example.com/AppStream
また、この場所を使用するようにGPGキーを構成します
http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
タスク2 [ソフトウェアパッケージのインストールと更新]
この場所をデフォルトのリポジトリとして使用するようにシステムを構成します。
http://utility.domain15.example.com/BaseOS
http://utility.domain15.example.com/AppStream
また、この場所を使用するようにGPGキーを構成します
http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
正解:
* [root@node1 ~]# vim /etc/yum.repos.d/redhat.repo
[BaseOS]
name=BaseOS
baseurl=http://utility.domain15.example.com/BaseOS
enabled=1
gpgcheck=1
gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
[AppStream]
name=AppStream
baseurl=http://utility.domain15.example.com/AppStream
enabled=1
gpgcheck=1
gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
[root@node1 ~]# yum clean all
[root@node1 ~]# yum repolist
[root@node1 ~]# yum list all
[BaseOS]
name=BaseOS
baseurl=http://utility.domain15.example.com/BaseOS
enabled=1
gpgcheck=1
gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
[AppStream]
name=AppStream
baseurl=http://utility.domain15.example.com/AppStream
enabled=1
gpgcheck=1
gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release
[root@node1 ~]# yum clean all
[root@node1 ~]# yum repolist
[root@node1 ~]# yum list all
共同ディレクトリを作成する
次の特性を持つ共有ディレクトリ /home/managers を作成します。
- /home/managers のグループ所有権は sysmgrs です。
- ディレクトリは、sysmgrs グループのメンバーによって読み取り、書き込み、および実行可能である必要がありますが、他のユーザーには読み取りまたは書き込み権限が付与されてはなりません (もちろん、root ユーザーはすべてのファイルとフォルダーにアクセスできます)。
- /home/managers 内に作成されたファイルは、sysmgrs グループに設定されたグループ所有権を自動的に継承します。
次の特性を持つ共有ディレクトリ /home/managers を作成します。
- /home/managers のグループ所有権は sysmgrs です。
- ディレクトリは、sysmgrs グループのメンバーによって読み取り、書き込み、および実行可能である必要がありますが、他のユーザーには読み取りまたは書き込み権限が付与されてはなりません (もちろん、root ユーザーはすべてのファイルとフォルダーにアクセスできます)。
- /home/managers 内に作成されたファイルは、sysmgrs グループに設定されたグループ所有権を自動的に継承します。
正解:
[root@node1 ~]# mkdir /home/managers
[root@node1 ~]# chgrp sysmgrs /home/managers
[root@node1 ~]# chmod 2770 /home/managers
# Verification
[root@node1 ~]# ll -d /home/managers
[root@node1 ~]# chgrp sysmgrs /home/managers
[root@node1 ~]# chmod 2770 /home/managers
# Verification
[root@node1 ~]# ll -d /home/managers
次のユーザー、グループ、およびグループメンバーシップを作成します。
adminuserという名前のグループ。
セカンダリグループとしてadminuserに属するユーザーnatashaセカンダリグループとしてadminuserにも属するユーザーharry
システム上の対話型シェルにアクセスできず、adminuser、natasha、harry、およびsarahのメンバーではないユーザーsarahには、すべてredhatのパスワードが必要です。
adminuserという名前のグループ。
セカンダリグループとしてadminuserに属するユーザーnatashaセカンダリグループとしてadminuserにも属するユーザーharry
システム上の対話型シェルにアクセスできず、adminuser、natasha、harry、およびsarahのメンバーではないユーザーsarahには、すべてredhatのパスワードが必要です。
正解:
groupadd sysmgrs
useradd -G sysmgrs Natasha
We can verify the newly created user by cat /etc/passwd)
# useradd -G sysmgrs harry
# useradd -s /sbin/nologin sarrh
# passwd Natasha
# passwd harry
# passwd sarrah
useradd -G sysmgrs Natasha
We can verify the newly created user by cat /etc/passwd)
# useradd -G sysmgrs harry
# useradd -s /sbin/nologin sarrh
# passwd Natasha
# passwd harry
# passwd sarrah
論理ボリュームvoとそのファイルシステムのサイズを290 MBに変更します。ファイルシステムの内容が損なわれていないことを確認してください。
注:パーティションが要求されるサイズとまったく同じになることはめったにないため、260 MBから320 MiBの範囲内のサイズが許容されます。
注:パーティションが要求されるサイズとまったく同じになることはめったにないため、260 MBから320 MiBの範囲内のサイズが許容されます。
正解:
df -hT
lvextend -L +100M /dev/vg0/vo
lvscan
xfs_growfs /home/ // home is LVM mounted directory
Note: This step is only need to do in our practice environment, you do not need to do in the real exam resize2fs /dev/vg0/vo // Use this comand to update in the real exam df -hT OR e2fsck -f/dev/vg0/vo umount /home resize2fs /dev/vg0/vo required partition capacity such as 100M lvreduce -l 100M /dev/vg0/vo mount /dev/vg0/vo /home df -Ht
lvextend -L +100M /dev/vg0/vo
lvscan
xfs_growfs /home/ // home is LVM mounted directory
Note: This step is only need to do in our practice environment, you do not need to do in the real exam resize2fs /dev/vg0/vo // Use this comand to update in the real exam df -hT OR e2fsck -f/dev/vg0/vo umount /home resize2fs /dev/vg0/vo required partition capacity such as 100M lvreduce -l 100M /dev/vg0/vo mount /dev/vg0/vo /home df -Ht
論理ボリュームを作成する
必要に応じて新しい論理ボリュームを作成します。
論理ボリュームにデータベースとして名前を付け、ボリュームグループのデータストアに属します。サイズは50 PEです。
ボリュームグループデータストアの各ボリュームの拡張サイズは16MBです。
ext3を使用してこの新しい論理ボリュームをフォーマットします。この論理ボリュームは自動的に/ mnt / databaseにマウントされます
必要に応じて新しい論理ボリュームを作成します。
論理ボリュームにデータベースとして名前を付け、ボリュームグループのデータストアに属します。サイズは50 PEです。
ボリュームグループデータストアの各ボリュームの拡張サイズは16MBです。
ext3を使用してこの新しい論理ボリュームをフォーマットします。この論理ボリュームは自動的に/ mnt / databaseにマウントされます
正解:
fdisk -cu /dev/vda// Create a 1G partition, modified when needed
partx -a /dev/vda
pvcreate /dev/vdax
vgcreate datastore /dev/vdax -s 16M
lvcreate- l 50 -n database datastore
mkfs.ext3 /dev/datastore/database
mkdir /mnt/database
mount /dev/datastore/database /mnt/database/ df -Th
vi /etc/fstab
/dev/datastore /database /mnt/database/ ext3 defaults 0 0 mount -a
Restart and check all the questions requirements.
partx -a /dev/vda
pvcreate /dev/vdax
vgcreate datastore /dev/vdax -s 16M
lvcreate- l 50 -n database datastore
mkfs.ext3 /dev/datastore/database
mkdir /mnt/database
mount /dev/datastore/database /mnt/database/ df -Th
vi /etc/fstab
/dev/datastore /database /mnt/database/ ext3 defaults 0 0 mount -a
Restart and check all the questions requirements.
パート1(Node1サーバー上)
タスク15 [コンテナの実行]
レジストリregistry.domain15.example.com:5000から見つかったイメージrhel8 / rsyslogを使用して、logserverという名前のコンテナーを作成します。コンテナーは、ルートレスユーザーshangrilとして実行する必要があります。パスワードとしてredhatを使用する[sudouser]再起動後も永続化できるように、サービス名「container-logserver」を使用して、systemdサービスを使用するコンテナーをshangrilaユーザーとして構成します。
ユーザー名としてadminを使用し、イメージレジストリのクレデンシャルとしてadmin123を使用します。
タスク15 [コンテナの実行]
レジストリregistry.domain15.example.com:5000から見つかったイメージrhel8 / rsyslogを使用して、logserverという名前のコンテナーを作成します。コンテナーは、ルートレスユーザーshangrilとして実行する必要があります。パスワードとしてredhatを使用する[sudouser]再起動後も永続化できるように、サービス名「container-logserver」を使用して、systemdサービスを使用するコンテナーをshangrilaユーザーとして構成します。
ユーザー名としてadminを使用し、イメージレジストリのクレデンシャルとしてadmin123を使用します。
正解:
* [root@workstation ~]# ssh shangrila@node1
[shangrila@node1 ~]$ podman login registry.domain15.example.com:5000
Username: admin
Password:
Login Succeeded!
[shangrila@node1 ~]$ podman pull registry.domain15.example.com:5000/rhel8/rsyslog
[shangrila@node1 ~]$ podman run -d --name logserver registry.domain15.example.com:5000/rhel8/rsyslog
021b26669f39cc42b8e94eab886ba8293d6247bf68e4b0d76db2874aef284d6d
[shangrila@node1 ~]$ mkdir -p ~/.config/systemd/user
[shangrila@node1 ~]$ cd ~/.config/systemd/user
* [shangrila@node1 user]$ podman generate systemd --name logserver --files --new
/home/shangrila/.config/systemd/user/container-logserver.service
[shangrila@node1 ~]$ systemctl --user daemon-reload
[shangrila@node1 user]$ systemctl --user enable --now container-logserver.service
[shangrila@node1 ~]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d9f7a8a4d63 registry.domain15.example.com:5000/rhel8/rsyslog:latest /bin/rsyslog.sh 2 seconds ago logserver
[shangrila@node1 ~]$ sudo reboot
[shangrila@node1 ~]$ cd .config/systemd/user
[shangrila@node1 user]$ systemctl --user status
[shangrila@node1 ~]$ podman login registry.domain15.example.com:5000
Username: admin
Password:
Login Succeeded!
[shangrila@node1 ~]$ podman pull registry.domain15.example.com:5000/rhel8/rsyslog
[shangrila@node1 ~]$ podman run -d --name logserver registry.domain15.example.com:5000/rhel8/rsyslog
021b26669f39cc42b8e94eab886ba8293d6247bf68e4b0d76db2874aef284d6d
[shangrila@node1 ~]$ mkdir -p ~/.config/systemd/user
[shangrila@node1 ~]$ cd ~/.config/systemd/user
* [shangrila@node1 user]$ podman generate systemd --name logserver --files --new
/home/shangrila/.config/systemd/user/container-logserver.service
[shangrila@node1 ~]$ systemctl --user daemon-reload
[shangrila@node1 user]$ systemctl --user enable --now container-logserver.service
[shangrila@node1 ~]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d9f7a8a4d63 registry.domain15.example.com:5000/rhel8/rsyslog:latest /bin/rsyslog.sh 2 seconds ago logserver
[shangrila@node1 ~]$ sudo reboot
[shangrila@node1 ~]$ cd .config/systemd/user
[shangrila@node1 user]$ systemctl --user status
alexという名前のユーザーを作成します。ユーザーIDは1234で、パスワードはalex111である必要があります。
正解:
# useradd -u 1234 alex
# passwd alex
alex111
alex111
OR
echo alex111|passwd -stdin alex
# passwd alex
alex111
alex111
OR
echo alex111|passwd -stdin alex
autofsを構成します。
必要に応じて、autofsがLDAPのホームディレクトリに自動的にマウントされるように設定します。
server.domain11.example.comは、NFSを使用してホームをシステムと共有します。このファイルシステムには、ユーザーldapuserXのホームディレクトリが事前に構成されています。
ldapuserXのホームディレクトリは次のとおりです。
server.domain11.example.com / home / guests / ldapuser
ldapuserXのホームディレクトリは、ローカルの/ home / guestsのldapuserXに自動的にマウントする必要があります。ホームディレクトリの書き込み権限は、ユーザーが使用できる必要がありますldapuser1のパスワードはpasswordです
必要に応じて、autofsがLDAPのホームディレクトリに自動的にマウントされるように設定します。
server.domain11.example.comは、NFSを使用してホームをシステムと共有します。このファイルシステムには、ユーザーldapuserXのホームディレクトリが事前に構成されています。
ldapuserXのホームディレクトリは次のとおりです。
server.domain11.example.com / home / guests / ldapuser
ldapuserXのホームディレクトリは、ローカルの/ home / guestsのldapuserXに自動的にマウントする必要があります。ホームディレクトリの書き込み権限は、ユーザーが使用できる必要がありますldapuser1のパスワードはpasswordです
正解:
yum install -y autofs
mkdir /home/rehome
/etc/auto.master
/home/rehome/etc/auto.ldap
Keep then exit
cp /etc/auto.misc /etc/auto.ldap
/etc/auto.ldap
ldapuserX -fstype=nfs,rw server.domain11.example.com:/home/guests/
Keep then exit
systemctl start autofs
systemctl enable autofs
su - ldapuserX// test
If the above solutions cannot create files or the command prompt is -bash-4.2$, it maybe exist multi-level directory, this needs to change the server.domain11.example.com:/home/guests/ to server.domain11.example.com:/home/guests/ldapuserX. What is multi-level directory? It means there is a directory of ldapuserX under the /home/guests/ldapuserX in the questions. This directory is the real directory.
mkdir /home/rehome
/etc/auto.master
/home/rehome/etc/auto.ldap
Keep then exit
cp /etc/auto.misc /etc/auto.ldap
/etc/auto.ldap
ldapuserX -fstype=nfs,rw server.domain11.example.com:/home/guests/
Keep then exit
systemctl start autofs
systemctl enable autofs
su - ldapuserX// test
If the above solutions cannot create files or the command prompt is -bash-4.2$, it maybe exist multi-level directory, this needs to change the server.domain11.example.com:/home/guests/ to server.domain11.example.com:/home/guests/ldapuserX. What is multi-level directory? It means there is a directory of ldapuserX under the /home/guests/ldapuserX in the questions. This directory is the real directory.
172.24.254.254および172.25.254.254を持つサーバーがあります。システムは172.24.0.0/16にあります。次のIPを割り当てることにより、172.25.254.254に正常にpingを実行します:172.24.0.x(xはステーション番号)。
正解:
Use netconfig command
Enter the IP Address as given station number by your examiner: example: 172.24.0.1 Enter Subnet Mask Enter Default Gateway and primary name server press on ok ifdown eth0 ifup eth0 verify using ifconfig In the lab server is playing the role of router, IP forwarding is enabled. Just set the Correct IP and gateway, you can ping to 172.25.254.254.
Enter the IP Address as given station number by your examiner: example: 172.24.0.1 Enter Subnet Mask Enter Default Gateway and primary name server press on ok ifdown eth0 ifup eth0 verify using ifconfig In the lab server is playing the role of router, IP forwarding is enabled. Just set the Correct IP and gateway, you can ping to 172.25.254.254.