-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·50 lines (41 loc) · 1.08 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
# 入力
echo -n "input aws_access_key_id > "
read KEY_ID
echo -n "input aws_secret_access_key > "
read ACCESS_KEY
echo -n "input region > "
read REASION
$KEY_ID =~ s/[\r\n]//g;
$ACCESS_KEY =~ s/[\r\n]//g;
$REASION =~ s/[\r\n]//g;
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
easy_install pip
pip install awscli
mkdir ~/.aws
touch ~/.aws/config
echo '[default]' > ~/.aws/config
echo 'aws_access_key_id = '$KEY_ID >> ~/.aws/config
echo 'aws_secret_access_key = '$ACCESS_KEY >> ~/.aws/config
echo 'region = '$REASION >> ~/.aws/config
aws ec2 describe-instances --dry-run
# jq インストール
yum install -y jq
# rubyインストール
yum install -y ruby ruby-devel ruby-docs
ruby -v
# gemsインストール
wget http://rubyforge.org/frs/download.php/76729/rubygems-1.8.25.tgz
tar zxvf rubygems-1.8.25.tgz
ruby ./rubygems-1.8.25/setup.rb
gem -v
# rubyライブラリインストール
gem install json
# 各ダウンロードソース削除
rm -f ez_setup.py
rm -rf rubygems-1.8.25
rm -f rubygems-1.8.25.tgz
# test実行
aws ec2 describe-instances
echo 'Finish!'