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 February 13, 2019 14:05
AWS S3上に保存されているファイルの更新タイムスタンプチェック ref: https://qiita.com/na0AaooQ/items/a6a209742bbe073ed12e
$ aws s3 sync s3://test-web-data-store/test/ /home/ec2-user/
download: s3://test-web-data-store/test/test2.txt to ./test2.txt
download: s3://test-web-data-store/test/test.txt to ./test.txt
$
@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 / IAMロール設定
Last active October 14, 2017 15:43
AWS Route53 ゾーン作成とDNSレコード追加コマンドメモ ref: http://qiita.com/na0AaooQ/items/d5bb618b7922233ce665
{
"Version": "2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action":["route53:CreateHostedZone"],
"Resource":"*"
},
{
"Effect":"Allow",
@na0AaooQ
na0AaooQ / file0.txt
Last active December 16, 2015 07:08
AWS EC2インスタンス起動時 cloud-initによりホスト名をNameタグ_インスタンスID_IPアドレスに設定する ref: http://qiita.com/na0AaooQ/items/d18a0df8d147e51a04a2
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
}
]
}
@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