Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##### x200-1.txt
- ★管理Iでチェックしておいて欲しいところ★
- ■1〜4章
- ・ファイル、ディレクトリの操作
- ■5章
- ・ユーザーアカウントの作成1
- ユーザIDを指定してユーザ作成し、パスワード設定をする
- ・ユーザーアカウントの作成2
- グループを作成し、そのグループをセカンダリグループとして所属するユーザ1を作成する
- ユーザ2を作成するが、対話的なシェルの使用を禁止するようにする
- ■6章
- ・ファイルのパーミッションの設定
- XXユーザは、YYファイルの読み取りと書き込みができるようにする
- ■8章
- ・サービスの制御
- 特定のサービスを起動、永続化する
- ■9章
- ・SSHサービスの使用
- sshを使用して、リモートからコマンドの実行を行う
- ■10章
- ・NTP の設定
- あるシステムのNTPクライアントとなるように、システムを設定する
- ■11章
- ・静的ネットワーク設定
- DHCP構成から静的ネットワーク設定に変更する
- ■12章
- ・アーカイブの作成
- あるディレクトリをtarでアーカイブ化し、gzipで圧縮する
- ■13章
- ・リポジトリ設定
- yumコマンドでinstallやupdateができるようにする
- ・カーネルのアップデート
- yumリポジトリからカーネルのアップデートを行う
- ■14章
- ・ファイルの検索
- あるユーザが所有する全てのファイルを検索し、あるディレクトリにコピーする
- ##### x200-2.txt
- ★管理II でチェックしておいて欲しいところ★
- ■2章
- ・文字列の検索
- あるファイル内の XX という文字を含んだ全ての行を、YYファイルにコピーする
- ->条件を考えて試してみてください!
- ■4章
- ・cron ジョブの設定
- ユーザー XX の cron ジョブとして、 毎日 XX:XX に以下の ジョブが実行されるようにする
- ->条件を考えて試してみてください!
- ■6章
- ・ファイルのパーミッションの設定
- XXユーザは、YYファイルの読み取りと書き込みができるようにする
- ・共同作業用のディレクトリ作成
- ディレクトリを作成し、指定した所有者、所有グループ、パーミッションにする
- このディレクトリに作成されたファイルは、自動的に所属グループが同じになるようにする
- ■7章
- ・SELinux の設定
- XXモードで実行するように設定する
- ■8章
- ・外部認証サービスのバインド
- LDAPクライアント設定を行う
- ■9章
- ・swap パーティションの追加
- システムにサイズXXXのswapパーティションを追加する
- ■10章
- ・論理ボリュームの作成
- 新しい論理ボリュームを要件にそって作成する
- ・論理ボリュームのサイズ変更
- 既存の論理ボリュームのサイズを拡張する
- ■11章
- ・autofs の設定
- autofsで、LDAPユーザーのホームディレクトリのオートマウントを設定する
- ■13章
- rootのパスワードは不明だが、root パスワードを、redhatに設定する
- ##### x300_example.txt
- ★システム管理IIIでチェックしておいて欲しいところ★
- ■1章
- ・サービス起動と有効化
- -> P8~10
- ・デフォルトターゲットの変更、起動時のターゲット指定
- -> P15~16
- ■2章
- ・IPv6アドレスの追加
- -> P55~56
- ■3章
- ・ネットワークチーミングの設定
- -> P63~66
- ■4章
- ・条件に基づいたFW設定
- -> P94~96、P101、102
- ・ポート転送
- -> P106
- ・SELinux ポートラベル付け
- -> P110
- ■6章
- ・Nullクライアントの設定
- -> P163~165 または P166~170
- ■7章
- ・iSCSIターゲットの提供 + iSCSIストレージへのアクセス
- -> P196~200
- ■8章
- ・NFSファイルシステムのエクスポート
- -> P208~210
- ・NFSエクスポートの保護
- -> P215~218
- ・SMBファイル共有の提供
- -> P226~230
- ・マルチユーザーSMBマウントの実行
- -> P233~235
- ・上記すべての実習
- -> P236~245
- ■9章
- ・データベースのインストール
- -> P254~257
- ・ユーザの管理
- -> P272~274
- ・データベースのバックアップからの復元
- -> P280~281
- ・データベースの設定とクエリ
- -> P282~287
- ■10章
- ・webサーバの設定
- -> P296、297
- ・仮想ホストの設定
- -> P300~302
- ・TLSが有効な仮想ホストの設定
- -> P309~312
- ・動的webコンテンツの設定
- -> P321~323
- ■11章、12章
- ・基本的なシェルスクリプトの作成
- -> P326~327
- ・出力の表示
- -> P327~329
- ・位置パラメータ
- -> P350
- ・条件構造の使用
- -> P355~358
- ・ユーザアカウント作成の自動化
- -> P367~370
- ■上記以外に確認していただきたいもの(RHCSAの範囲)
- ・SELinuxのデフォルト変更
- -> /etc/selinux/configファイル内のSELinux=行を編集後、リブート
- ・yumのリポジトリ設定
- yumコマンドでinstallやupdateができるようにする
- -> /etc/yum.repos.d/*.repoをエディタで作成
- [updates]
- name=Red Hat Updates
- baseurl=http://host/rhel7.0/x86_64/errata
- enabled=1
- gpgcheck=0
- 以上
- ##### mariaDB.txt
- ■パッケージグループ
- mariadb
- mariadb-client
- ※ yum grouplist hidden idで確認
- ■セキュアインストール
- mysql_secure_installationコマンド
- -> すべてY
- ■設定ファイル
- /etc/my.cnf編集
- -> skip-networking=1
- ■ログイン
- mysql -u ユーザ名 -p
- mysql -u ユーザ名 -pパスワード
- ----------------------------------------------------
- ■データベース、テーブルの表示
- show databases
- show tables
- ■データベースに接続
- use DB名
- ■テーブルのフィールド表示
- describe テーブル名
- ■データ操作
- insert
- delete
- update
- select フィールド名,フィールド名 from テーブル名
- ■ユーザ作成/削除
- create user 'ユーザ名'@'ホスト名' identified by 'パスワード'
- drop user
- ■特権付与/取り消し
- grant 特権名,特権名 on DB名.テーブル名 to 'ユーザ名'@'ホスト名'
- revoke
- ※ help コマンド名; で入力形式は表示されます
- --------------------------------------------------------
- ■論理バックアップのリストア
- mysql -u root -p DB名 < バックアップファイル名
- ※DBは先に作成しておく create database DB名
- ##### webappX.conf
- <VirtualHost *:80>
- ServerName webappX.example.com
- RewriteEngine on
- RewriteRule ^(/.*)$ https://%{HTTP_HOST}$1 [redirect=301]
- </VirtualHost>
- <VirtualHost *:443>
- ServerName webappX.example.com
- SSLEngine on
- SSLProtocol all -SSLv2 -SSLv3
- SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
- SSLHonorCipherOrder on
- SSLCertificateFile /etc/pki/tls/certs/webappX.crt
- SSLCertificateKeyFile /etc/pki/tls/private/webappX.key
- SSLCertificateChainFile /etc/pki/tls/certs/example-ca.crt
- DocumentRoot /srv/webappX/www
- </VirtualHost>
- <Directory /srv/webappX/www>
- require all granted
- </Directory>
- ##### wwwX.conf
- <VirtualHost *:80>
- ServerName wwwX.example.com
- RewriteEngine on
- RewriteRule ^(/.*)$ https://%{HTTP_HOST}$1 [redirect=301]
- </VirtualHost>
- <VirtualHost *:443>
- ServerName wwwX.example.com
- SSLEngine on
- SSLProtocol all -SSLv2 -SSLv3
- SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
- SSLHonorCipherOrder on
- SSLCertificateFile /etc/pki/tls/certs/wwwX.crt
- SSLCertificateKeyFile /etc/pki/tls/private/wwwX.key
- SSLCertificateChainFile /etc/pki/tls/certs/example-ca.crt
- DocumentRoot /srv/wwwX/www
- </VirtualHost>
- <Directory /srv/wwwX/www>
- require all granted
- </Directory>
- ##### all imp
- ★システム管理IIIでチェックしておいて欲しいところ★
- ## 1章
- ・サービス起動と有効化
- -> P8~10
- ・デフォルトターゲットの変更、起動時のターゲット指定
- -> P15~16
- systemctl list-unit-files --type=service
- systemctl mask network
- systemctl list-dependencies graphical.target
- systemctl [gs]et-default
- cmd systemd.unit=rescue.target systemd.unit=emergency.target rd.break console=tty1
- systemctl isolate multi-user.target
- ## 2章
- ・IPv6アドレスの追加
- -> P55~56
- nmcli con
- nmcli dev
- nmcli con add con-name eno2 type ethernet ifname eno2
- nmcli con up eno2
- nmcli con show static-eth0
- nmcli con mod static-eth0 ipv4.addresses "192.160.0.1/24 192.160.0.254"
- nmcli con mod static-eth0 ipv4.method manual
- hostnamectl set-hostname fluxcoil.net
- man nmcli-examples <- teamd bridge
- man teamd.conf
- teamdctl team0 state
- ss -A inet -n
- ## 3章
- ・ネットワークチーミングの設定
- -> P63~66
- ## 4章
- ・条件に基づいたFW設定
- -> P94~96、P101、102
- firewall-cmd --get-default-zone
- firewall-cmd --get-active-zone
- firewall-cmd --list-all-zones
- firewall-cmd --zone=work --list-all
- firewall-cmd --set-default-zone=work
- firewall-cmd --permanent --zone=work --add-source=192.0.0.0/8
- firewall-cmd --permanent --zone=work --add-service=mysql
- firewall-cmd --permanent --zone=work --add-port=443/tcp
- firewall-cmd --reload
- firewall-config
- man firewalld.richlanguage
- firewall-cmd --permanent --zone=work --add-rich-rule='rule family=ipv4 source address=192.168.0.11/32 reject'
- firewall-cmd --add-rich-rule='rule service name=ftp limit value=2/m accept'
- ・ポート転送
- -> P106
- firewall-cmd --permanent --add-rich-rule 'rule family=ipv4 source address=172.25.7.10/32 forward-port port=443 protocol=tcp to-port=22' # local portforward 443 -> 22
- ・SELinux ポートラベル付け
- -> P110
- semanage port -l
- semanage port -a -t http_port_type -p tcp 81
- curl http://10.0.0.2:82
- ## 6章
- ・Nullクライアントの設定
- -> P163~165 または P166~170
- postconf -e "relayhost=[smtp.example.com]"
- postconf -e "inet_interfaces=loopback-only"
- postconf -e "mynetworks=127.0.0.1/8 [::1}/128"
- postconf -e "myorigin=desktop7.example.com"
- postconf -e "mydestination="
- postconf -e "local_transport=error: local delivery disabled"
- mail -s "subject" user@host
- mutt -f imaps://host
- ## 7章
- ・iSCSIターゲットの提供 + iSCSIストレージへのアクセス
- -> P196~200
- targetcli
- block, isci/tpg1/acls|luns|portals
- saveconfig
- systemctl enable/start target
- man iscsiadm
- iscsiadm --mode discoverydb --type sendtargets --portal 192.168.1.10 --discover
- iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --login
- blkid
- /etc/fstab: UUID=.. /iscsi xfs _netdev 0 2
- ## 8章
- ・NFSファイルシステムのエクスポート
- -> P208~210
- firewall-cmd --permanent --add-service=nfs # !RPC
- ・NFSエクスポートの保護
- -> P215~218
- nfs/kerberos/selinux server
- vi /etc/sysconfig/nfs # RPCNFSDARGS="-V 4.2"
- deploy /etc/krb5.keytab
- systemctl start nfs-secure-server
- vi /etc/exports # /securenfs desktop7(sec=krb5p,rw)
- exportfs -r
- nfs/kerberos/selinux client
- /etc/fstab # server:/snfs /mnt nfs defaults,v4.2,sec=krb5p 0 0
- chcon -t public_content_t /snfs/testfile.txt
- ssh ldapuser@client "cat /mnt/testfile.txt"
- ・SMBファイル共有の提供
- -> P226~230
- mkdir /smb
- grep samba_share_t /etc/samba/smb.conf
- man semanage
- man semanage-fcontext
- semanage fcontext -a -t samba_share_t '/smb(/.*)?'
- restorecon -VR /smb
- smb.conf: write list = @linuxsystemgroup
- useradd -s /sbin/nologin fred
- yum -y install samba-client
- smbpasswd -a fred
- systemctl start smb nmb
- firewall-cmd --permanent --add-service=samba
- ・マルチユーザーSMBマウントの実行
- -> P233~235
- mount -o multiuser,sec=ntlmssp,username=user4mount //serv/share /mnt
- yum -y install cifs-utils
- frank@system$ cifscreds add server7
- Password:
- frank@system$ echo hugo >/mnt/share-frank-can-write
- echo 'username=brian'>>/root/smb.txt
- echo 'password=redhat'>>/root/smb.txt
- fstab: //serv/share /mnt cifs credentials=/root/smb.txt,multiuser,sec=ntlmssp 0 0
- ・上記すべての実習
- -> P236~245
- ## 9章
- yum grouplist hidden id
- yum groupinstall mariadb mariadb-client
- mysql_secure_installation
- vi /etc/my.cnf: skip_networking=1
- ss -tulpn|grep mysql
- mysql -u root -predhat
- ・データベースのインストール
- -> P254~257
- ・ユーザの管理
- -> P272~274
- CREATE USER john@'%' identified by 'password'; # net login 可能
- GANT INSERT, UPDATE, DELETE, SELECT on inventory.* to steve@'%';
- flush privileges;
- INSERT INTO category(name) VALUES('Memory);
- UPDATE category SET name='gits movie' where id = 3;
- DELETE FROM category WHERE name LIKE 'Memory';
- ・データベースのバックアップからの復元
- -> P280~281
- ・データベースの設定とクエリ
- -> P282~287
- ## 10章
- /usr/share/doc/httpd*/httpd-vhosts.conf
- <Directory /srv/newdir>
- Require all granted
- </Directory>
- ・webサーバの設定
- -> P296、297
- ・仮想ホストの設定
- -> P300~302
- ・TLSが有効な仮想ホストの設定
- -> P309~312
- cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/00-sslsite.conf
- vi /etc/httpd/conf.d/00-sslsite.conf # modify, and add 'all granted' for the dir
- webcontent into: /srv/somename/www && restorecon -vR /srv
- ・動的webコンテンツの設定
- -> P321~323
- cgi, php, python(!)
- ## 11章、12章
- ・基本的なシェルスクリプトの作成
- -> P326~327
- ・出力の表示
- -> P327~329
- ・位置パラメータ
- -> P350
- ・条件構造の使用
- -> P355~358
- ・ユーザアカウント作成の自動化
- -> P367~370
- ## 上記以外に確認していただきたいもの(RHCSAの範囲)
- ・SELinuxのデフォルト変更
- -> /etc/selinux/configファイル内のSELinux=行を編集後、リブート
- ・yumのリポジトリ設定
- yumコマンドでinstallやupdateができるようにする
- -> /etc/yum.repos.d/*.repoをエディタで作成
- [updates]
- name=Red Hat Updates
- baseurl=http://content.example.com/rhel7.0/x86_64/errata
- enabled=1
- gpgcheck=0
- 以上
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement