Nginxでmrubyのめも
install
nginxにngx_mrubyをインストールする - Qiita
ngx_mrubyをnginx-buildのビルドに組み込む - Qiita
ubuntu 16.04でbuild
- apt install make git gcc software-properties-common libperl-dev libpcre3-dev bison libssl-dev rake -y
- todo
その他
ansible-galaxyめも
AWS CLIとYAMLでEC2インスタンスをつくるメモ
foo.yaml
AWSTemplateFormatVersion: "2010-09-09" Description: "Foo Server Template" Parameters: UserDefinedHostName: Type: String Resources: MyEC2Instance: #An inline comment Type: "AWS::EC2::Instance" Properties: ImageId: "ami-8422ebe2" # Ubuntu xenial hvm:ebs-ssd InstanceType: t2.micro BlockDeviceMappings: - DeviceName: /dev/sdm Ebs: VolumeType: gp2 Iops: 200 DeleteOnTermination: True VolumeSize: 8 SubnetId: "subnet-xxx" KeyName: "xxx" SecurityGroupIds: - "sg-xxx" - "sg-xxx" Tags: - Key: "Name" Value: !Ref UserDefinedHostName UserData: !Base64 | #!/bin/bash apt update apt install ansible -y
aws cloudformation create-stack --stack-name foo-server --template-body file://foo.yml --parameters ParameterKey="UserDefinedHostName",ParameterValue="foo-server"
unicorn.logをlogrotate.dでローテするメモ
基本的にはUSR1シグナルを送れば良い
sample
/var/log/foo/bar/unicorn.log { daily #毎日 missingok # ログファイルがなくても処理をつづける rotate 7 #世代 dateext #ファイルを日付形式に compress #圧縮する delaycompress #圧縮は次のローテまで遅らせる lastaction pid=/foo/bar/unicorn.pid test -s $pid && kill -USR1 "$(cat $pid)" endscript }
豆
- logrotate.dのファイルのパーミッションは煩い。0644