Skip to content

Instantly share code, notes, and snippets.

@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
AWS EC2インスタンス作成手順(CentOS 6) ref: http://qiita.com/na0AaooQ/items/2774f63f540969a55941
# cat /etc/redhat-release
CentOS release 6.5 (Final)
# yum update
# reboot
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
DNS CentOS 6.6に名前解決テスト用のdrillコマンドをインストールする(rpmでインストール) ref: http://qiita.com/na0AaooQ/items/8ed5c95be176d6932336
# rpm -qa | grep ldns
#
# which drill
/usr/bin/which: no drill in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
#
@na0AaooQ
na0AaooQ / file0.txt
Created January 19, 2015 18:54
AWS EC2インスタンス CloudWatch Logs(awslogs)インストールとCloudWatch保存対象ログの追加 ref: http://qiita.com/na0AaooQ/items/a3b0e5384399b66b742b
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:*"
],
"Effect": "Allow",
"Resource": "*"
}
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
Oracle 11g アラートログ(alert.log)をtail -fで表示するスクリプト ref: http://qiita.com/na0AaooQ/items/eced881647a82f44c740
[oracle@example-oracle-11g ~]$ echo $ORACLE_BASE
/oracle_example/opt/oracle/app/oracle
[oracle@example-oracle-11g ~]$
[oracle@example-oracle-11g ~]$ echo $ORACLE_SID
testsid
[oracle@example-oracle-11g ~]$
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
CentOS 4サーバの/(ルートパーティション)に対するfsck ref: http://qiita.com/na0AaooQ/items/e4c44a41e19bb65427e9
/: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root passwrd for maintenance
(or type Control-D to continue):
@na0AaooQ
na0AaooQ / file0.txt
Last active December 24, 2018 10:24
dateコマンドでバックアップファイル作成時にファイル名に日付_時間を付ける (LinuxとWindows用) ref: https://qiita.com/na0AaooQ/items/c26b637261d9962f981f
$ cp -p バックアップ対象ファイル名 バックアップファイル名.`date "+%Y%m%d_%H%M%S"`
@na0AaooQ
na0AaooQ / file0.txt
Last active September 22, 2016 12:13
Oracle 11g アラートログ(alert.log)やリスナーログ(listener.log)のログローテーションスクリプト ref: http://qiita.com/na0AaooQ/items/04546c484252e217773b
lsnrctl set log_file リスナーログファイル名
@na0AaooQ
na0AaooQ / file0.txt
Last active September 22, 2016 12:34
Oracle 11g 各表領域(テーブルスペース)の使用サイズと空き容量 + TEMP表領域のディスクソート回数を表示するスクリプト ref: http://qiita.com/na0AaooQ/items/5ab2b826254631cab708
[oracle@example-oracle-11g-active ~]$ vi show_oracle_tablespace.sh
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:14
Oracle 11g データベース接続中の各OracleセッションのCPU使用率を表示するスクリプト ref: http://qiita.com/na0AaooQ/items/904b8a3e373f79ff73a0
[oracle@example-oracle-11g-active ~]$ vi show_oracle_session_cpu.sh
@na0AaooQ
na0AaooQ / file0.txt
Created January 24, 2015 11:12
Oracle 11g Oracle適用パッチ一覧の表示コマンド(OPatch) ref: http://qiita.com/na0AaooQ/items/1a55de65ce445af085b5
/oracle_example_production/opt/oracle/Opatch_11.1.0.6.9/OPatch/opatch