Skip to content

Instantly share code, notes, and snippets.

@na0AaooQ
na0AaooQ / file0.txt
Created December 21, 2014 15:17
logrotateによるApacheログローテーション設定 ref: http://qiita.com/na0AaooQ/items/ff2dad51b2b70d69ce87
# vi /etc/logrotate.d/httpd
/var/log/httpd/*log {
daily
missingok
rotate 7
notifempty
sharedscripts
compress
delaycompress
postrotate
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:11
AWS EC2インスタンス作成時 User DataによりタイムゾーンをJSTに変更する ref: http://qiita.com/na0AaooQ/items/52dea5f982745592a663
$ date
Tue Dec 23 01:30:39 UTC 2014
$ cat /etc/sysconfig/clock
ZONE="UTC"
UTC=true
$
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:12
DNS unboundサーバ構築手順(yumでインストール) ref: http://qiita.com/na0AaooQ/items/e165250c1ea5c19b648c
$ sudo su -
# yum update
# yum --enablerepo=epel install -y unbound
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
DNS unboundサーバ構築手順(ソースからunbound 1.5.1をインストール) ref: http://qiita.com/na0AaooQ/items/ac0e2f0588c70a12f0c5
$ sudo su -
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
PEERDNS=yes
 ↓
PEERDNS=no
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
CentOS 6 LVMによるext4ファイルシステム作成とマウント手順 ref: http://qiita.com/na0AaooQ/items/9fc00b8600e380492b1e
# cat /etc/redhat-release
CentOS release 6.6 (Final)
#
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
DNS drillコマンドのオプションメモ ref: http://qiita.com/na0AaooQ/items/4c12bfec63c91793e784
$ drill (問い合わせたいFQDN) @(キャッシュDNSサーバのIPアドレスやFQDN) A
@na0AaooQ
na0AaooQ / file0.txt
Last active August 29, 2015 14:13
AWS EC2インスタンス用のIAMロール作成手順 ref: http://qiita.com/na0AaooQ/items/3ec5f8b80150c37a0566
CloudWatchLogsFullAccess-unbound-server-role-201501180000
@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
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 ~]$