忍者ブログ

◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例

   

【情報】ウィルス対策

■ウィルス対策関連の情報
┏━━━━━━━━━━━━━━━━━━
TREND MICRO
┃ 最新版ダウンロード
┣━━━━━━━━━━━━━━━━━━
Trend Micro Apex Central
┃ ※ゲートウェイ、メールサーバ、ファイルサーバで動作するトレンドマイクロの各製品およびサービスを集中管理
┣━━━━━━━━━━━━━━━━━━
Inter Scan Messaging Security Suite (ISMS)
┃ ※ウイルス大規模感染やスパムメールを防止
┣━━━━━━━━━━━━━━━━━━
InterScan Messaging Security Virtual Appliance (IMSVA)
┃ ※仮想アプライアンス製品(製品にOSが含まれている)
┣━━━━━━━━━━━━━━━━━━
Inter Scan for MicroSoft Exchange (ISME)
┃ ※メールサーバを保護するセキュリティ対策ソフトウェア
┣━━━━━━━━━━━━━━━━━━
Inter Scan Web Security Suite (IWSS)
┃ ※Webからの攻撃を動的にブロック
┣━━━━━━━━━━━━━━━━━━
Tenable.sc
┃ ※脆弱性をすばやく特定して、調査、修正の優先順位付けを実行
┣━━━━━━━━━━━━━━━━━━
Fire EYE EX8400
┃ ※スピア・フィッシングなどのメールをきっかけとした攻撃を検知、防御
┣━━━━━━━━━━━━━━━━━━
Fire EYE NX2550
┃ ※マルウェアや悪意のあるファイル、 通信チャネル、ゼロデイ・エクスプロイトによる攻撃を検知し、ブロック
┣━━━━━━━━━━━━━━━━━━
Fire EYE CM4400
┃ ※デバイスと脅威情報を一元的に管理しながら、攻撃経路の関連性を分析
┗━━━━━━━━━━━━━━━━━━
PR

【Windows】スタートアップ

■スタートアップ登録手順
┌──────────────────
[Windows]+[R]キーを押す
│  ・[ファイル名を指定して実行]を開く
│------------------------------------
shell:startup
│  ・スタートアップのフォルダが開く
│    ※ ショートカットを格納する
└──────────────────

【Windows】USB初期化

■ USBメモリの初期化方法
┌──────────────────
│コマンドプロンプト画面を開く
│・管理者権限で起動する
│------------------------------------
diskpart
│・DiskPartツール起動
│------------------------------------
list disk
│・ディスク一覧の表示
│------------------------------------
select disk <番号>
│・ディスク番号を選択
│------------------------------------
detail disk
│・選択したディスク情報の表示
│ (USB確認)
│------------------------------------
convert gpt
・GPT形式に変換する
│ (不要であればスキップ)
│------------------------------------
clean all
│・データを削除(全部)
│------------------------------------
create partition primary
│・パーティション作成
│------------------------------------
format fs=ntfs quick
│・フォーマット(クイック)
│ (quick オプション無しでも可)
│------------------------------------
assign letter=G
│・ドライブレターを割り当て
│ (ドライブレターの文字は任意)
└──────────────────

【Linux】Vim 操作

■ Linux 一般的ショートカット
┌──────────────────
Ctrl + a
・行頭へ移動
├──────────────────
Ctrl + e
・行末へ移動
├──────────────────
│Ctrl + i
│・Tabキー
├──────────────────
Ctrl + d
・Deleteキー
├──────────────────
Ctrl + h
・Backspaceキー
├──────────────────
│Ctrl + u
│・行頭までカット
├──────────────────
│Ctrl + k
│・行末までカット
├──────────────────
│Ctrl + y
│・貼り付け
├──────────────────
Ctrl + c
・強制終了(処理のキャンセル)
├──────────────────
│Ctrl + d
│・ログアウト
├──────────────────
│Ctrl + s
│・画面ロック
├──────────────────
│Ctrl + q
│・画面ロックの解除
├──────────────────
Ctrl + l
・画面クリア
├──────────────────
│Ctrl + w
│・単語削除
├──────────────────
│Ctrl + z
│・処理を一時的に中断させる
│ ⇒中断した処理の再開方法
│  jobs コマンドでジョブ番号を表示
│  fg <ジョブ番号> コマンドで再開
└──────────────────
■ Linux あまり使わないショートカット
┌──────────────────
│Alt + 矢印キー
│・複数のデスクトップを切り替える
├──────────────────
│Shift + Insert
│・ターミナルへテキストをペースト
├──────────────────
│Ctrl + Alt + Backspace
│・X画面の再起動
├──────────────────
│Ctrl + Alt + F1(~F6)
│・CUIログインモードに切替え
├──────────────────
│Ctrl + Alt + F7
│・GUIログインモードに切替え
├──────────────────
│Ctrl + Alt + Delete
│・OSリブート
└──────────────────
■ Vim エディタの操作方法
┌──────────────────
i
・カーソルの左からインサートモード
├──────────────────
│a
│・カーソルの右からインサートモード
├──────────────────
o
・改行してインサートモード
├──────────────────
│I
│・行頭に移動してインサートモード
├──────────────────
│A
│・行末に移動してインサートモード
├──────────────────
/<文字>
・文字を検索
│ ⇒ n 前方に検索
│ ⇒ N 後方に検索
├──────────────────
:%s/<文字1>/<文字2>/g
・文字1 を検索し、文字2 へ置換する
├──────────────────
gg
・最初の行に移動
├──────────────────
G
・最後の行に移動
├──────────────────
│0 (Homeキー)
│・行頭に移動
├──────────────────
│$ (Endキー)
│・行末に移動
├──────────────────
│:
│・コマンドモードへ移行
├──────────────────
x
・カーソル位置の文字を削除
├──────────────────
│r
│・カーソル位置の文字を置換
├──────────────────
dd
・一行削除
├──────────────────
yy
・一行コピー
├──────────────────
│p
│・カーソルより下に貼り付け
├──────────────────
│P
│・カーソルより上に貼り付け
├──────────────────
│u
│・元に戻す
├──────────────────
ESC
・ノーマルモードに移行
├──────────────────
│:w
│・ファイルの保存(上書き)
├──────────────────
│:w <ファイル名>
│・ファイル名を指定して保存(上書き)
├──────────────────
│:w >> <ファイル名>
│・ファイル名を指定して保存(追記)
├──────────────────
:q!
・Vim終了(保存しない)
├──────────────────
:wq!
・ファイルを保存してVim終了
├──────────────────
│Ctrl + v
│・矩形選択
├──────────────────
│set columns=<数字>
│・ウィンドウサイズの横幅を設定
├──────────────────
│set lines=<数字>
│・ウィンドウサイズの高さを設定
├──────────────────
:set number
・行番号を表示させる
├──────────────────
:set nonumber
・行番号を非表示にする
├──────────────────
Ctrl + f
・1画面分下に移動
├──────────────────
Ctrl + b
・1画面分上に移動
├──────────────────
│:<数字>
│・指定した行に移動
├──────────────────
│v
│・ビジュアルモードに移行
├──────────────────
│:! <コマンド>
│・外部のシェルコマンドを実行する
└──────────────────

【LinuCレベル3 303 Security 合格】

【報告】
 ・2021-07-04(日)
  LinuC Level-3 Certification 303 Security 合格

【得点】
 ・586点(合格ライン 520点)
 
【感想】
 ・黒本に記載されてない内容も多少出てきてビビりましたが、
  不明な問題は、落ち着いて冷静に考えて対処し、最後に
  
全問(60問)見直しして、時間(90分)ギリギリ一杯使い切りました。

【その他】
 ・次は、LinuCレベル3 300 の可能性あり?

【試験に役立つアドバイス】
 ・市販されている教材は、黒本(LPIC303用)でしたが、
  他にLinuC303の教材が市販していた場合、買うのが良さそう。


【Windows】タスク情報

★タスク スケジューラを起動
Taskschd.msc
 
★タスクスケジューラ表示
Get-ScheduledTask
schtasks.exe
 
★エクセルでコマンド作成させる例【おまけ】
=B3&C3&D3&E3&F3&G3&H3&I3&J3&K3&L3&M3&N3&O3&P3&Q3
 ⇒ セル「S3」に以下の数式を入れる

【PowerShell】アカウントの情報表示

★ユーザーアカウント表示(ローカル
Get-WmiObject Win32_UserAccount | ? { $_.LocalAccount -eq $true } | Format-table -autosize -wrap

★ユーザーアカウント表示(ドメイン

Get-WmiObject Win32_UserAccount | ? { $_.LocalAccount -eq $false } | Format-table -autosize -wrap

★グループ表示(ローカル

Get-WmiObject Win32_Group | ? { $_.LocalAccount -eq $true }

★グループ表示(ドメイン

Get-WmiObject Win32_Group | ? { $_.LocalAccount -eq $false }

★役割と機能をCSV形式に出力【おまけ】

Get-WindowsFeature | Export-Csv -encoding Default Feature.csv

【Linux】設定情報(例)

【以下のコマンド引数は、SPLXの場合の例】
 
■ホスト名、ユーザ名
------------------------
hostname
 → ホスト名
------------------------
users
 → ユーザ名
------------------------
sudo -s
 → ルート権限で実行【連続してルート権限を使用】
------------------------
 
■OS(カーネル)情報
------------------------
cat /etc/redhat-release
 → OSバージョン
------------------------
uname -rm
 → カーネルバージョン
------------------------
 
■プログラム(パッケージ)の確認
------------------------
rpm -qa | grep splx
 → インストールされたプログラム名 【grep検索】
------------------------
rpm -qa | grep -ie splx -ie SProtectLinux
 → パッケージ情報 【grep検索】【-ieで複数文字列を指定】
------------------------
yum list installed | grep splx
 → インストールされたソフトウェア一覧 【grep検索】
------------------------
 
■サービスの確認
------------------------
service --status-all | grep splx
 → サービス状態 【grep検索】
------------------------
systemctl status splx
 → サービス状態
------------------------
systemctl list-unit-files --type=service | grep splx
 → 全てのサービス一覧 【grep検索】
------------------------
systemctl list-units --type=service | grep splx
 → 稼働中のサービス一覧 【grep検索】
------------------------
 
■プロセスの確認
------------------------
ps aux | grep splx
 → プロセス一覧 【grep検索】
------------------------
top | grep splx
 → 実行中のプロセス 【grep検索】
------------------------
pstree -c
 → プロセスツリー
------------------------
 
■モジュールの確認
------------------------
cd /opt/TrendMicro/SProtectLinux/SPL.module
ls -al | grep splxmod
 → モジュール名 【grep検索】
------------------------
lsmod | grep splxmod
 → ロードされたカーネルモジュール 【grep検索】
------------------------
modimfo /opt/TrendMicro/SProtectLinux/SPLX.module/splxmod.ko
 → カーネルモジュール情報
------------------------
 
■パーミッションの確認
------------------------
ls -al /opt/TrendMicro/SProtectLinux/ | grep LicensePrefile.dat
 → パーミッション確認 【grep検索】
------------------------
 
■ライセンスの確認(SPLX用コマンド)
------------------------
/opt/TrendMicro/SProtectLinux/SPLX.vsapiapp/splxmain -E
 → ライセンス情報
------------------------
 
■MD5チェックサム
------------------------
md5sum /opt/TrendMicro/SProtectLinux/SPL.module/*
 → MD5チェックサム
------------------------
#=============================
# サーバ起動日時
uptime -s
vmstat
top -c
#=============================
# サーバ(経過時間)
uptime -p
#=============================
# 履歴コマンド
history | grep <文字列> | less
cat .bash_history | grep <文字列>
history | egrep "nmcli|ipv" | less
#=============================
# ■「ディスク「tmpfs」
# 一時的なファイルシステム
# 領域を含む仮想記憶上に生成される
# 電源オフでtmpfsは消える
df -h | grep tmpfs

【BAT】コマンド結果の出力

★テキストファイルにコマンド結果を出力する例
PowerShell -command "Write-Output '--- --- --- --- --- --- --- --- --- --- --- --- --- ---' | Out-File -FilePath "D:\TEST.txt" -Append -Encoding default"
PowerShell -command "Get-Date -Format 'yyyy/MM/dd HH:mm' | Out-File -FilePath "D:\TEST.txt" -Append -Encoding default"
PowerShell -command "Write-Output '--- --- --- --- --- --- --- --- --- --- --- --- --- ---' | Out-File -FilePath "D:\TEST.txt" -Append -Encoding default"
PowerShell -command "Write-Output ' ' | Out-File -FilePath "D:\TEST.txt" -Append -Encoding default"
PowerShell -command "Write-Output '▲▼▲▼▲▼ パッチ適用情報 ▲▼▲▼▲▼' | Out-File -FilePath "D:\TEST.txt" -Append -Encoding default"
PowerShell -command "Get-HotFix | Where-Object HotFixID -match "KB" | Sort-Object -Descending InstalledOn | Out-File -FilePath "D:\TEST.txt" -Append -Encoding default"
PowerShell -command "Write-Output '--- --- --- --- --- --- --- --- --- --- --- --- --- ---' | Out-File -FilePath "D:\TEST.txt" -Append -Encoding default"

★RSS(Receive Side Scaling)の設定の確認
PowerShell -command "netsh int tcp show global"

★インストールされた更新プログラム画面を表示する
PowerShell -command "start shell:AppUpdatesFolder"

【TMCM 7.0】アップグレード前のバックアップ

任意の場所に「CMBackupSet」フォルダ階層を作成する
cd /d "C:\TMP"
md ".\CMBackupSet\Trend Micro\"
md ".\CMBackupSet\Trend Micro\COMMON\"
md ".\CMBackupSet\Trend Micro\COMMON\TMI\"
md ".\CMBackupSet\Trend Micro\Control Manager\"
md ".\CMBackupSet\Trend Micro\Control Manager\Certificate\"
md ".\CMBackupSet\Trend Micro\Control Manager\WebUI\"
md ".\CMBackupSet\Trend Micro\Control Manager\WebUI\download\"
md ".\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\"
md ".\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\App_Data\"
md ".\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\TreeIcons\"
cd /d "C:\Program Files (x86)\Trend Micro\"
xcopy /y /e ".\CmKeyBackup\" "C:\TMP\CMBackupSet\Trend Micro\CmKeyBackup\"
xcopy /y /e ".\Control Manager\ProductClass\" "C:\TMP\CMBackupSet\Trend Micro\Control Manager\ProductClass\"
xcopy /y /e ".\Control Manager\WebUI\exports\" "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\exports\"
xcopy /y /e ".\Control Manager\WebUI\ProductUI\" "C:\TMP\CMBackupSet\Trend Micro\\Control Manager\WebUI\ProductUI\"
xcopy /y /e ".\Control Manager\WebUI\WebApp\TreeIcons\Icons\" "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\TreeIcons\Icons\"
cd /d "C:\Program Files (x86)\Trend Micro\COMMON\TMI\"
copy /y .\mrf_entity.bak "C:\TMP\CMBackupSet\Trend Micro\COMMON\TMI\"
copy /y .\mrf_entity.dat "C:\TMP\CMBackupSet\Trend Micro\COMMON\TMI\"
copy /y .\mrf_server.bak "C:\TMP\CMBackupSet\Trend Micro\COMMON\TMI\"
copy /y .\mrf_server.dat "C:\TMP\CMBackupSet\Trend Micro\COMMON\TMI\"
copy /y .\mrf_SSLcert.pem "C:\TMP\CMBackupSet\Trend Micro\COMMON\TMI\"
copy /y .\mrf_SSLpri.pem "C:\TMP\CMBackupSet\Trend Micro\COMMON\TMI\"
copy /y .\TMI.cfg "C:\TMP\CMBackupSet\Trend Micro\COMMON\TMI\"
cd /d "C:\Program Files (x86)\Trend Micro\Control Manager\"
copy /y .\Agent.ini "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\CasServerSetting.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\DMRegisterInfo.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\IDMapping.bak "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\IDMapping.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\ProductInfo.dtd "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\ProductInfo.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\ProductInfos.bak "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\ProductInfos.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\Schema.dtd "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\Schema.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\StringTable.bak "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\StringTable.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\SystemConfiguration.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\TVCS_Cert.pem "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\TVCS_Pri.pem "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
copy /y .\TVCS_Pub.pem "C:\TMP\CMBackupSet\Trend Micro\Control Manager\"
cd /d "C:\Program Files (x86)\Trend Micro\Control Manager\Certificate\"
copy /y .\SSO_PKI_PrivateKey.pem "C:\TMP\CMBackupSet\Trend Micro\Control Manager\Certificate\"
cd /d "C:\Program Files (x86)\Trend Micro\Control Manager\WebUI\download\"
copy /y .\E2EPublic.dat "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\download\"
copy /y .\SSO_PKI_PublicKey.pem "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\download\"
cd /d "C:\Program Files (x86)\Trend Micro\Control Manager\WebUI\WebApp\App_Data\"
copy /y .\IDMapping.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\App_Data\"
copy /y .\ProductInfos.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\App_Data\"
copy /y .\ProductInfos.xsd "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\App_Data\"
copy /y .\StringTable.xml "C:\TMP\CMBackupSet\Trend Micro\Control Manager\WebUI\WebApp\App_Data\"

更新日付

11 2025/12 01
S M T W T F S
1 2 3 4 5
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

RECOMMEND

プロフィール

HN:
Account
HP:
性別:
非公開
職業:
--- NODATA ---
趣味:
--- NODATA ---
自己紹介:
◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

リンク

<<前のページ  | HOME |  次のページ>>
Copyright ©  -- LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例 --  All Rights Reserved
Design by CriCri / Photo by Melonenmann / powered by NINJA TOOLS / 忍者ブログ / [PR]