Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.94 KB | None | 0 0
  1. ##### x200-1.txt
  2. ★管理Iでチェックしておいて欲しいところ★
  3.  
  4. ■1〜4章
  5. ・ファイル、ディレクトリの操作
  6.  
  7. ■5章
  8. ・ユーザーアカウントの作成1
  9. ユーザIDを指定してユーザ作成し、パスワード設定をする
  10.  
  11. ・ユーザーアカウントの作成2
  12. グループを作成し、そのグループをセカンダリグループとして所属するユーザ1を作成する
  13. ユーザ2を作成するが、対話的なシェルの使用を禁止するようにする
  14.  
  15. ■6章
  16. ・ファイルのパーミッションの設定
  17. XXユーザは、YYファイルの読み取りと書き込みができるようにする
  18.  
  19. ■8章
  20. ・サービスの制御
  21. 特定のサービスを起動、永続化する
  22.  
  23. ■9章
  24. ・SSHサービスの使用
  25. sshを使用して、リモートからコマンドの実行を行う
  26.  
  27. ■10章
  28. ・NTP の設定
  29. あるシステムのNTPクライアントとなるように、システムを設定する
  30.  
  31. ■11章
  32. ・静的ネットワーク設定
  33. DHCP構成から静的ネットワーク設定に変更する
  34.  
  35. ■12章
  36. ・アーカイブの作成
  37. あるディレクトリをtarでアーカイブ化し、gzipで圧縮する
  38.  
  39. ■13章
  40. ・リポジトリ設定
  41. yumコマンドでinstallやupdateができるようにする
  42.  
  43. ・カーネルのアップデート
  44. yumリポジトリからカーネルのアップデートを行う
  45.  
  46. ■14章
  47. ・ファイルの検索
  48. あるユーザが所有する全てのファイルを検索し、あるディレクトリにコピーする
  49.  
  50. ##### x200-2.txt
  51. ★管理II でチェックしておいて欲しいところ★
  52.  
  53. ■2章
  54. ・文字列の検索
  55. あるファイル内の XX という文字を含んだ全ての行を、YYファイルにコピーする
  56. ->条件を考えて試してみてください!
  57.  
  58. ■4章
  59. ・cron ジョブの設定
  60. ユーザー XX の cron ジョブとして、 毎日 XX:XX に以下の ジョブが実行されるようにする
  61. ->条件を考えて試してみてください!
  62.  
  63. ■6章
  64. ・ファイルのパーミッションの設定
  65. XXユーザは、YYファイルの読み取りと書き込みができるようにする
  66.  
  67. ・共同作業用のディレクトリ作成
  68. ディレクトリを作成し、指定した所有者、所有グループ、パーミッションにする
  69. このディレクトリに作成されたファイルは、自動的に所属グループが同じになるようにする
  70.  
  71. ■7章
  72. ・SELinux の設定
  73. XXモードで実行するように設定する
  74.  
  75. ■8章
  76. ・外部認証サービスのバインド
  77. LDAPクライアント設定を行う
  78.  
  79. ■9章
  80. ・swap パーティションの追加
  81. システムにサイズXXXのswapパーティションを追加する
  82.  
  83. ■10章
  84. ・論理ボリュームの作成
  85. 新しい論理ボリュームを要件にそって作成する
  86.  
  87. ・論理ボリュームのサイズ変更
  88. 既存の論理ボリュームのサイズを拡張する
  89.  
  90. ■11章
  91. ・autofs の設定
  92. autofsで、LDAPユーザーのホームディレクトリのオートマウントを設定する
  93.  
  94. ■13章
  95. rootのパスワードは不明だが、root パスワードを、redhatに設定する
  96.  
  97. ##### x300_example.txt
  98. ★システム管理IIIでチェックしておいて欲しいところ★
  99.  
  100. ■1章
  101.  
  102. ・サービス起動と有効化
  103. -> P8~10
  104.  
  105. ・デフォルトターゲットの変更、起動時のターゲット指定
  106. -> P15~16
  107.  
  108. ■2章
  109.  
  110. ・IPv6アドレスの追加
  111. -> P55~56
  112.  
  113. ■3章
  114.  
  115. ・ネットワークチーミングの設定
  116. -> P63~66
  117.  
  118. ■4章
  119.  
  120. ・条件に基づいたFW設定
  121. -> P94~96、P101、102
  122.  
  123. ・ポート転送
  124. -> P106
  125.  
  126. ・SELinux ポートラベル付け
  127. -> P110
  128.  
  129. ■6章
  130.  
  131. ・Nullクライアントの設定
  132. -> P163~165 または P166~170
  133.  
  134. ■7章
  135.  
  136. ・iSCSIターゲットの提供 + iSCSIストレージへのアクセス
  137. -> P196~200
  138.  
  139. ■8章
  140.  
  141. ・NFSファイルシステムのエクスポート
  142. -> P208~210
  143.  
  144. ・NFSエクスポートの保護
  145. -> P215~218
  146.  
  147. ・SMBファイル共有の提供
  148. -> P226~230
  149.  
  150. ・マルチユーザーSMBマウントの実行
  151. -> P233~235
  152.  
  153. ・上記すべての実習
  154. -> P236~245
  155.  
  156. ■9章
  157.  
  158. ・データベースのインストール
  159. -> P254~257
  160.  
  161. ・ユーザの管理
  162. -> P272~274
  163.  
  164. ・データベースのバックアップからの復元
  165. -> P280~281
  166.  
  167. ・データベースの設定とクエリ
  168. -> P282~287
  169.  
  170. ■10章
  171.  
  172. ・webサーバの設定
  173. -> P296、297
  174.  
  175. ・仮想ホストの設定
  176. -> P300~302
  177.  
  178. ・TLSが有効な仮想ホストの設定
  179. -> P309~312
  180.  
  181. ・動的webコンテンツの設定
  182. -> P321~323
  183.  
  184. ■11章、12章
  185.  
  186. ・基本的なシェルスクリプトの作成
  187. -> P326~327
  188.  
  189. ・出力の表示
  190. -> P327~329
  191.  
  192. ・位置パラメータ
  193. -> P350
  194.  
  195. ・条件構造の使用
  196. -> P355~358
  197.  
  198. ・ユーザアカウント作成の自動化
  199. -> P367~370
  200.  
  201. ■上記以外に確認していただきたいもの(RHCSAの範囲)
  202.  
  203. ・SELinuxのデフォルト変更
  204. -> /etc/selinux/configファイル内のSELinux=行を編集後、リブート
  205.  
  206. ・yumのリポジトリ設定
  207. yumコマンドでinstallやupdateができるようにする
  208.  
  209. -> /etc/yum.repos.d/*.repoをエディタで作成
  210. [updates]
  211. name=Red Hat Updates
  212. baseurl=http://host/rhel7.0/x86_64/errata
  213. enabled=1
  214. gpgcheck=0
  215.  
  216. 以上
  217.  
  218. ##### mariaDB.txt
  219. ■パッケージグループ
  220. mariadb
  221. mariadb-client
  222.  
  223. ※ yum grouplist hidden idで確認
  224.  
  225. ■セキュアインストール
  226. mysql_secure_installationコマンド
  227. -> すべてY
  228.  
  229. ■設定ファイル
  230. /etc/my.cnf編集
  231. -> skip-networking=1
  232.  
  233. ■ログイン
  234. mysql -u ユーザ名 -p
  235. mysql -u ユーザ名 -pパスワード
  236.  
  237. ----------------------------------------------------
  238.  
  239. ■データベース、テーブルの表示
  240. show databases
  241. show tables
  242.  
  243. ■データベースに接続
  244. use DB名
  245.  
  246. ■テーブルのフィールド表示
  247. describe テーブル名
  248.  
  249. ■データ操作
  250. insert
  251. delete
  252. update
  253.  
  254. select フィールド名,フィールド名 from テーブル名
  255.  
  256. ■ユーザ作成/削除
  257. create user 'ユーザ名'@'ホスト名' identified by 'パスワード'
  258. drop user
  259.  
  260. ■特権付与/取り消し
  261. grant 特権名,特権名 on DB名.テーブル名 to 'ユーザ名'@'ホスト名'
  262. revoke
  263.  
  264. ※ help コマンド名; で入力形式は表示されます
  265. --------------------------------------------------------
  266.  
  267. ■論理バックアップのリストア
  268. mysql -u root -p DB名 < バックアップファイル名
  269. ※DBは先に作成しておく create database DB名
  270.  
  271. ##### webappX.conf
  272. <VirtualHost *:80>
  273. ServerName webappX.example.com
  274. RewriteEngine on
  275. RewriteRule ^(/.*)$ https://%{HTTP_HOST}$1 [redirect=301]
  276. </VirtualHost>
  277.  
  278. <VirtualHost *:443>
  279. ServerName webappX.example.com
  280. SSLEngine on
  281. SSLProtocol all -SSLv2 -SSLv3
  282. SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
  283. SSLHonorCipherOrder on
  284. SSLCertificateFile /etc/pki/tls/certs/webappX.crt
  285. SSLCertificateKeyFile /etc/pki/tls/private/webappX.key
  286. SSLCertificateChainFile /etc/pki/tls/certs/example-ca.crt
  287. DocumentRoot /srv/webappX/www
  288. </VirtualHost>
  289.  
  290. <Directory /srv/webappX/www>
  291. require all granted
  292. </Directory>
  293.  
  294. ##### wwwX.conf
  295. <VirtualHost *:80>
  296. ServerName wwwX.example.com
  297. RewriteEngine on
  298. RewriteRule ^(/.*)$ https://%{HTTP_HOST}$1 [redirect=301]
  299. </VirtualHost>
  300.  
  301. <VirtualHost *:443>
  302. ServerName wwwX.example.com
  303. SSLEngine on
  304. SSLProtocol all -SSLv2 -SSLv3
  305. SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
  306. SSLHonorCipherOrder on
  307. SSLCertificateFile /etc/pki/tls/certs/wwwX.crt
  308. SSLCertificateKeyFile /etc/pki/tls/private/wwwX.key
  309. SSLCertificateChainFile /etc/pki/tls/certs/example-ca.crt
  310. DocumentRoot /srv/wwwX/www
  311. </VirtualHost>
  312.  
  313. <Directory /srv/wwwX/www>
  314. require all granted
  315. </Directory>
  316. ##### all imp
  317. ★システム管理IIIでチェックしておいて欲しいところ★
  318.  
  319. ## 1章
  320.  
  321. ・サービス起動と有効化
  322. -> P8~10
  323.  
  324. ・デフォルトターゲットの変更、起動時のターゲット指定
  325. -> P15~16
  326. systemctl list-unit-files --type=service
  327. systemctl mask network
  328. systemctl list-dependencies graphical.target
  329. systemctl [gs]et-default
  330. cmd systemd.unit=rescue.target systemd.unit=emergency.target rd.break console=tty1
  331. systemctl isolate multi-user.target
  332.  
  333. ## 2章
  334.  
  335. ・IPv6アドレスの追加
  336. -> P55~56
  337. nmcli con
  338. nmcli dev
  339. nmcli con add con-name eno2 type ethernet ifname eno2
  340. nmcli con up eno2
  341. nmcli con show static-eth0
  342. nmcli con mod static-eth0 ipv4.addresses "192.160.0.1/24 192.160.0.254"
  343. nmcli con mod static-eth0 ipv4.method manual
  344. hostnamectl set-hostname fluxcoil.net
  345. man nmcli-examples <- teamd bridge
  346. man teamd.conf
  347. teamdctl team0 state
  348. ss -A inet -n
  349.  
  350. ## 3章
  351.  
  352. ・ネットワークチーミングの設定
  353. -> P63~66
  354.  
  355. ## 4章
  356.  
  357. ・条件に基づいたFW設定
  358. -> P94~96、P101、102
  359. firewall-cmd --get-default-zone
  360. firewall-cmd --get-active-zone
  361. firewall-cmd --list-all-zones
  362. firewall-cmd --zone=work --list-all
  363. firewall-cmd --set-default-zone=work
  364. firewall-cmd --permanent --zone=work --add-source=192.0.0.0/8
  365. firewall-cmd --permanent --zone=work --add-service=mysql
  366. firewall-cmd --permanent --zone=work --add-port=443/tcp
  367. firewall-cmd --reload
  368. firewall-config
  369. man firewalld.richlanguage
  370. firewall-cmd --permanent --zone=work --add-rich-rule='rule family=ipv4 source address=192.168.0.11/32 reject'
  371. firewall-cmd --add-rich-rule='rule service name=ftp limit value=2/m accept'
  372.  
  373. ・ポート転送
  374. -> P106
  375. 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
  376.  
  377. ・SELinux ポートラベル付け
  378. -> P110
  379. semanage port -l
  380. semanage port -a -t http_port_type -p tcp 81
  381. curl http://10.0.0.2:82
  382.  
  383. ## 6章
  384.  
  385. ・Nullクライアントの設定
  386. -> P163~165 または P166~170
  387. postconf -e "relayhost=[smtp.example.com]"
  388. postconf -e "inet_interfaces=loopback-only"
  389. postconf -e "mynetworks=127.0.0.1/8 [::1}/128"
  390. postconf -e "myorigin=desktop7.example.com"
  391. postconf -e "mydestination="
  392. postconf -e "local_transport=error: local delivery disabled"
  393. mail -s "subject" user@host
  394. mutt -f imaps://host
  395.  
  396. ## 7章
  397.  
  398. ・iSCSIターゲットの提供 + iSCSIストレージへのアクセス
  399. -> P196~200
  400. targetcli
  401. block, isci/tpg1/acls|luns|portals
  402. saveconfig
  403. systemctl enable/start target
  404. man iscsiadm
  405. iscsiadm --mode discoverydb --type sendtargets --portal 192.168.1.10 --discover
  406. iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --login
  407. blkid
  408. /etc/fstab: UUID=.. /iscsi xfs _netdev 0 2
  409.  
  410.  
  411. ## 8章
  412.  
  413. ・NFSファイルシステムのエクスポート
  414. -> P208~210
  415. firewall-cmd --permanent --add-service=nfs # !RPC
  416.  
  417. ・NFSエクスポートの保護
  418. -> P215~218
  419. nfs/kerberos/selinux server
  420. vi /etc/sysconfig/nfs # RPCNFSDARGS="-V 4.2"
  421. deploy /etc/krb5.keytab
  422. systemctl start nfs-secure-server
  423. vi /etc/exports # /securenfs desktop7(sec=krb5p,rw)
  424. exportfs -r
  425.  
  426. nfs/kerberos/selinux client
  427. /etc/fstab # server:/snfs /mnt nfs defaults,v4.2,sec=krb5p 0 0
  428. chcon -t public_content_t /snfs/testfile.txt
  429. ssh ldapuser@client "cat /mnt/testfile.txt"
  430.  
  431. ・SMBファイル共有の提供
  432. -> P226~230
  433.  
  434. mkdir /smb
  435. grep samba_share_t /etc/samba/smb.conf
  436. man semanage
  437. man semanage-fcontext
  438. semanage fcontext -a -t samba_share_t '/smb(/.*)?'
  439. restorecon -VR /smb
  440. smb.conf: write list = @linuxsystemgroup
  441. useradd -s /sbin/nologin fred
  442. yum -y install samba-client
  443. smbpasswd -a fred
  444. systemctl start smb nmb
  445. firewall-cmd --permanent --add-service=samba
  446.  
  447. ・マルチユーザーSMBマウントの実行
  448. -> P233~235
  449. mount -o multiuser,sec=ntlmssp,username=user4mount //serv/share /mnt
  450. yum -y install cifs-utils
  451. frank@system$ cifscreds add server7
  452. Password:
  453. frank@system$ echo hugo >/mnt/share-frank-can-write
  454.  
  455. echo 'username=brian'>>/root/smb.txt
  456. echo 'password=redhat'>>/root/smb.txt
  457. fstab: //serv/share /mnt cifs credentials=/root/smb.txt,multiuser,sec=ntlmssp 0 0
  458.  
  459. ・上記すべての実習
  460. -> P236~245
  461.  
  462. ## 9章
  463. yum grouplist hidden id
  464. yum groupinstall mariadb mariadb-client
  465. mysql_secure_installation
  466. vi /etc/my.cnf: skip_networking=1
  467. ss -tulpn|grep mysql
  468. mysql -u root -predhat
  469.  
  470. ・データベースのインストール
  471. -> P254~257
  472.  
  473. ・ユーザの管理
  474. -> P272~274
  475. CREATE USER john@'%' identified by 'password'; # net login 可能
  476. GANT INSERT, UPDATE, DELETE, SELECT on inventory.* to steve@'%';
  477. flush privileges;
  478. INSERT INTO category(name) VALUES('Memory);
  479. UPDATE category SET name='gits movie' where id = 3;
  480. DELETE FROM category WHERE name LIKE 'Memory';
  481.  
  482. ・データベースのバックアップからの復元
  483. -> P280~281
  484.  
  485. ・データベースの設定とクエリ
  486. -> P282~287
  487.  
  488. ## 10章
  489.  
  490. /usr/share/doc/httpd*/httpd-vhosts.conf
  491. <Directory /srv/newdir>
  492. Require all granted
  493. </Directory>
  494.  
  495. ・webサーバの設定
  496. -> P296、297
  497.  
  498. ・仮想ホストの設定
  499. -> P300~302
  500.  
  501. ・TLSが有効な仮想ホストの設定
  502. -> P309~312
  503. cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/00-sslsite.conf
  504. vi /etc/httpd/conf.d/00-sslsite.conf # modify, and add 'all granted' for the dir
  505. webcontent into: /srv/somename/www && restorecon -vR /srv
  506.  
  507. ・動的webコンテンツの設定
  508. -> P321~323
  509. cgi, php, python(!)
  510.  
  511. ## 11章、12章
  512.  
  513. ・基本的なシェルスクリプトの作成
  514. -> P326~327
  515.  
  516. ・出力の表示
  517. -> P327~329
  518.  
  519. ・位置パラメータ
  520. -> P350
  521.  
  522. ・条件構造の使用
  523. -> P355~358
  524.  
  525. ・ユーザアカウント作成の自動化
  526. -> P367~370
  527.  
  528. ## 上記以外に確認していただきたいもの(RHCSAの範囲)
  529.  
  530. ・SELinuxのデフォルト変更
  531. -> /etc/selinux/configファイル内のSELinux=行を編集後、リブート
  532.  
  533. ・yumのリポジトリ設定
  534. yumコマンドでinstallやupdateができるようにする
  535.  
  536. -> /etc/yum.repos.d/*.repoをエディタで作成
  537. [updates]
  538. name=Red Hat Updates
  539. baseurl=http://content.example.com/rhel7.0/x86_64/errata
  540. enabled=1
  541. gpgcheck=0
  542.  
  543. 以上
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement