This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.1x1.jp/blog/2013/12/docker_on_centos65.html | |
# Mac | |
vagrant init opscode-centos65 http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box | |
vagrant up | |
vagrant ssh | |
# CentOS 6.5 | |
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
yum -y install docker-io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ローカルファイルを圧縮したものを、リモートサーバに直接送る | |
tar -cz /path/to/{dir,file} | ssh your_server "cat /path/to/file.tar.gz" | |
# ローカルのシェルスクリプトをリモートサーバで実行 | |
cat << EOF | ssh REMOTE_HOST "bash" | |
hostname | |
/sbin/ifconfig | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_HOST="" | |
_USER="" | |
_PUBKEY="" | |
_UID="" | |
_GROUP="" | |
SHADOW="" | |
SSH_OPTIONS="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getent passwd | awk -F':' '{ print $1}' | grep -w USERNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rpm をダウンロードするだけ | |
yum install --downloadonly --downloaddir=/path/to/dir | |
# 依存関係を考慮して削除 | |
yum install yum-plugin-remove-with-leaves | |
yum remove --remove-leaves PACKAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sshを実行するマシンの localhost:5900 -> remote1:5900, remote1 の localhost:5900 -> remote2:5900 | |
## -f をつければバックグラウンドで実行 | |
ssh -t -L 5900:localhost:5900 user@remote1 ssh -t -N -L 5900:localhost:5900 user@remote2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y kvm libvirt virt-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: varnish-release | |
Version: 4.0 | |
Release: 1%{?dist} | |
Summary: Varnish 4.0 package repository configuration | |
Group: System Environment/Base | |
License: BSD | |
URL: http://www.varnish-software.com/installation/redhat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 証明書アップロード | |
# http://docs.aws.amazon.com/cli/latest/reference/iam/upload-server-certificate.html | |
$ aws iam upload-server-certificate --server-certificate-name example.com --certificate-body file:///path/to/example.com.crt --private-key file:///path/to/example.com.key --certificate-chain file:///path/to/example.com.ca | |
SERVERCERTIFICATEMETADATA arn:aws:iam::123456789012:server-certificate/example.com / XXXXXXXXXXXXXXXXXXXXX example.com 2014-04-11T07:43:32.214Z | |
# Listener 作成 | |
# http://docs.aws.amazon.com/cli/latest/reference/elb/create-load-balancer-listeners.html | |
$ aws elb create-load-balancer-listeners --load-balancer-name test-elb --listeners "Protocol=https,LoadBalancerPort=443,InstanceProtocol=http,InstancePort=80,SSLCertificateId=arn:aws:iam::123456789012:server-certificate/example.com" | |
# Listener の証明書変更 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y perl-ExtUtils-MakeMaker perl-Module-Build perl-CPAN | |
curl -L http://cpanmin.us/ | perl - App::cpanminus |