EX200日本語 無料問題集「RedHat Red Hat Certified System Administrator - RHCSA (EX200日本語版)」
システムには、commonという名前でVGSRVボリュームグループに属するローカル論理ボリュームがあり、/ commonディレクトリにマウントされます。サイズの定義は128 MBです。
要件:
データを失うことなく、論理ボリュームを190 MBに拡張します。サイズは、拡張後に160〜160 MBの間で許可されます。
要件:
データを失うことなく、論理ボリュームを190 MBに拡張します。サイズは、拡張後に160〜160 MBの間で許可されます。
正解:
lvextend -L 190M /dev/mapper/vgsrv-common resize2fs /dev/mapper/vgsrv-common
zshという名前のパッケージの1つは、/ pub / updatesディレクトリの下のftp://server1.example.comのダンプであり、FTPサーバーは192.168.0.254です。パッケージzshをインストールします。
正解:
rpm -ivh ftp://server1/example.com/pub/updates/zsh-*
or
Login to ftp server : ftp ftp://server1.example.com using anonymous user.
Change the directory: cd pub and cd updates
Download the package: mget zsh-*
Quit from the ftp prompt : bye
Install the package
rpm -ivh zsh-*
Verify either package is installed or not : rpm -q zsh
or
Login to ftp server : ftp ftp://server1.example.com using anonymous user.
Change the directory: cd pub and cd updates
Download the package: mget zsh-*
Quit from the ftp prompt : bye
Install the package
rpm -ivh zsh-*
Verify either package is installed or not : rpm -q zsh
システムにはローカルシュリンクボリュームがあり、その名前はシュリンクで指定され、VGSRVボリュームグループに属し、/ shrinkディレクトリにマウントされます。サイズの定義は320 MBです。
要件:
データを失うことなく、論理ボリュームを220 MBに減らします。サイズは、縮小後に200〜260 MBの間で許可されます。
要件:
データを失うことなく、論理ボリュームを220 MBに減らします。サイズは、縮小後に200〜260 MBの間で許可されます。
正解:
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
ファイル/ etc / testfileからabcdeを含む行を見つけて、ファイル/ tmp / testfileに書き込みます。シーケンスは/ etc / testfileと同じように要求されます。
正解:
# cat /etc/testfile | while read line;
do
echo $line | grep abcde | tee -a /tmp/testfile
done
OR
grep `abcde' /etc/testfile > /tmp/testfile
do
echo $line | grep abcde | tee -a /tmp/testfile
done
OR
grep `abcde' /etc/testfile > /tmp/testfile
文字列を検索する
/ usr / share / dict / words内に文字列seismicを含むすべての列を見つけ、元の順序でこれらすべての列を/root/lines.txにコピーします。空白行はありません。すべての列は、元の列。
/ usr / share / dict / words内に文字列seismicを含むすべての列を見つけ、元の順序でこれらすべての列を/root/lines.txにコピーします。空白行はありません。すべての列は、元の列。
正解:
grep seismic /usr/share/dict/words> /root/lines.txt
起動時に自動的に有効になる2Gスワップパーティションを作成します。元のスワップパーティションには影響しません。
正解:
# fdisk /dev/sda
p
(check Partition table)
n
(create new partition: press e to create extended partition, press p to create the main partition, and the extended partition is further divided into logical partitions) Enter
+2G t
8 I
82
W
partx -a /dev/sda
partprobe
mkswap /dev/sda8
Copy UUID
swapon -a
vim /etc/fstab
UUID=XXXXX swap swap defaults 0 0
(swapon -s)
p
(check Partition table)
n
(create new partition: press e to create extended partition, press p to create the main partition, and the extended partition is further divided into logical partitions) Enter
+2G t
8 I
82
W
partx -a /dev/sda
partprobe
mkswap /dev/sda8
Copy UUID
swapon -a
vim /etc/fstab
UUID=XXXXX swap swap defaults 0 0
(swapon -s)
あなたはシステム管理者です。システムの監視が非常に簡単なログファイルの使用。現在、メール、Web、プロキシ、DNSサービスなどとして実行されている50のサーバーがあります。すべてのサーバーからのログをLOGサーバーに集中化する必要があります。リモートホストからのログを受け入れるようにLOGサーバーをどのように構成しますか?
正解:
By default, system accept the logs only generated from local host. To accept the Log from other host configure:
vi /etc/sysconfig/syslog SYSLOGD_OPTIONS="-m 0 -r"
Where
-m 0 disables 'MARK' messages.
-r enables logging from remote machines
-x disables DNS lookups on messages received with -r
service syslog restart
vi /etc/sysconfig/syslog SYSLOGD_OPTIONS="-m 0 -r"
Where
-m 0 disables 'MARK' messages.
-r enables logging from remote machines
-x disables DNS lookups on messages received with -r
service syslog restart
ルートパスワードを設定する
node2 のルート パスワードを「redhat」に設定します。この操作を実行するには、システム アクセスを取得する必要があります。
node2 のルート パスワードを「redhat」に設定します。この操作を実行するには、システム アクセスを取得する必要があります。
正解:
***Restart the node2 machine and wait for the screen shown in Image 1.
Press "e" to enter the screen shown in Image 2. The original configuration is as shown in the image. Modify the original configuration to the part highlighted in red box, as shown in Image 2. Then press "Ctrl+X" to execute the following commands:
# chroot /sysroot
# echo redhat |passwd --stdin root
# touch /.autorelabel
# sync
# exit
# reboot
Press "e" to enter the screen shown in Image 2. The original configuration is as shown in the image. Modify the original configuration to the part highlighted in red box, as shown in Image 2. Then press "Ctrl+X" to execute the following commands:
# chroot /sysroot
# echo redhat |passwd --stdin root
# touch /.autorelabel
# sync
# exit
# reboot
パート1(Node1サーバー上)
タスク6 [Linuxファイルシステムへのアクセス]
ファイル/usr/share/mime/packages/freedesktop.org.xmlで、文字列ichを含むすべての行を検索します。
これらの行のコピーをファイル/ root / linesに元の順序で配置します。
/ root / linesには空の行が含まれていてはならず、すべての行は元の行の正確なコピーである必要があります。
/usr/share/mime/packages/freedesktop.org.xml
タスク6 [Linuxファイルシステムへのアクセス]
ファイル/usr/share/mime/packages/freedesktop.org.xmlで、文字列ichを含むすべての行を検索します。
これらの行のコピーをファイル/ root / linesに元の順序で配置します。
/ root / linesには空の行が含まれていてはならず、すべての行は元の行の正確なコピーである必要があります。
/usr/share/mime/packages/freedesktop.org.xml
正解:
* [root@node1 ~]# cat /usr/share/mime/packages/freedesktop.org.xml | grep ich > /root/lines
[root@node1 ~]# cat /root/lines
<comment xml:lang="ast">Ficheru codificau en BinHex de Machintosh</comment>
<comment xml:lang="fr">fichier code Macintosh BinHex</comment>
<comment xml:lang="gl">ficheiro de Macintosh codificado con BinHex</comment>
<comment xml:lang="oc">fichier encodat Macintosh BinHex</comment>
<comment xml:lang="pt">ficheiro codificado em BinHex de Macintosh</comment>
<comment xml:lang="fr">fichier boite aux lettres</comment>
[root@node1 ~]# cat /root/lines
<comment xml:lang="ast">Ficheru codificau en BinHex de Machintosh</comment>
<comment xml:lang="fr">fichier code Macintosh BinHex</comment>
<comment xml:lang="gl">ficheiro de Macintosh codificado con BinHex</comment>
<comment xml:lang="oc">fichier encodat Macintosh BinHex</comment>
<comment xml:lang="pt">ficheiro codificado em BinHex de Macintosh</comment>
<comment xml:lang="fr">fichier boite aux lettres</comment>
データグループの所有者にファイル/ディレクトリを作成する人は、自動的にデータと同じグループの所有者になる必要があります。
正解:
1. chmod g+s /data
2. Verify using: ls -ld /data
Permission should be like this: drwxrws--- 2 root sysadmin 4096 Mar 16 18:08 /data 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
2. Verify using: ls -ld /data
Permission should be like this: drwxrws--- 2 root sysadmin 4096 Mar 16 18:08 /data 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