amazon_ec2 - taka512/memo GitHub Wiki

Amazon EC2利用

amazon ec2についてのメモ

1. サーバ構築

awsでサーバ構築

1. 手順

1.1 インスタンスを作成

「Launch Instance」からamazonマーケットプレイスを選択してCentOsをインストール

1.2 サーバ設定

まずはログインする

$ chmod 600 symfony21.pem
$ ssh -i symfony21.pem [email protected]

ログイン後にCentOSの設定

2. ssh接続

2.1 ssh/configの編集

普通に設定する場合

$ mv ~/Downloads/xxxx.pem ~/.ssh/xxxx.pem
$ chmod 400 ~/.ssh/xxxx.pem
$ vi .ssh/config
Host ec2
  User ec2-user
  HostName ec2-46-51-224-48.ap-northeast-1.compute.amazonaws.com
  IdentityFile ~/.ssh/taka512.pem
$ ssh ec2

EC2を便利につかう.ssh/configの書きかた

$ vi .ssh/config
Host *.ap-northeast-1.compute.amazonaws.com
  identityfile ~/.ssh/taka512.pem
  user ec2-user

2.2 ec2ssh

https://github.com/mirakui/ec2ssh

2.3 ec2-ssh

https://github.com/Instagram/ec2-ssh

参考

http://matome.naver.jp/odai/2133838486683616401