目次
awscli を EC2 インスタンスにインストールする
EC2 にて AWS の各サービスと連携を行うためのコマンドラインである awscli をインストールする手順をまとめていきます。
awscli がインストール済みであるかを確認するときは、バージョン情報を得るコマンドを実行してください。もしバージョン情報が返ってきたら既にインストール済みであるため対応は必要ありません。
aws aws --versionversion
Advertisement
Centos7 に awscli をインストールする
ではまずは CentOS7 にインストールする手順をまとめていきます。
実行するコマンドラインは4つ。awscli は python を使用しているため、python をインストールしてから awscli をインストールする必要があります。
〇実行するコマンド一覧
yum install -y epel-release
yum install -y python-pip
pip install pip –upgrade
pip install awscli
yum install -y python-pip
pip install pip –upgrade
pip install awscli
〇Centos7 に awscli をインストールしたときの実行結果
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 |
[root@example]# yum install -y epel-release Loaded plugins: fastestmirror Determining fastest mirrors * base: ftp.iij.ad.jp * extras: ftp.iij.ad.jp (中略) Installed: epel-release.noarch 0:7-11 Complete! [root@example]# yum install -y python-pip Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/x86_64/metalink (中略) Installed: python2-pip.noarch 0:8.1.2-10.el7 Complete! [root@example]# pip install pip --upgrade Collecting pip Downloading https://files.pythonhosted.org/packages/30/db/9e38760b32e3e7f40cce46dd5fb107b8c73840df38f0046d8e6514e675a1/pip-19.2.3-py2.py3-none-any.whl (1.4MB) (中略) Successfully uninstalled pip-8.1.2 Successfully installed pip-19.2.3 [root@example]# pip install awscli DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting awscli (中略) Successfully uninstalled urllib3-1.10.2 Successfully installed awscli-1.16.242 botocore-1.12.232 colorama-0.3.9 docutils-0.15.2 futures-3.3.0 jmespath-0.9.4 pyasn1-0.4.7 python-dateutil-2.8.0 rsa-3.4.2 s3transfer-0.2.1 urllib3-1.25.5 |
Advertisement
Ubuntu 18.04 に awscli をインストールする
ubuntu に awscli をインストールするコマンドは1つ。いつも通り apt コマンドでインストールすることができます。
〇実行するコマンド
apt install awscli
〇buntu 18.04 に awscli をインストールしたときの実行結果
1 2 3 4 5 |
root@example:# apt install awscli Reading package lists... Done Building dependency tree Reading state information... Done (中略) |
Linuxの知識については下記の本も参考になるので、スキルアップにお役立てください。
三宅 英明 (著)、大角 祐介 (著)
ページ数: 440ページ
出版社:SBクリエイティブ
発売日:2015/06/06
出典:amazon
ページ数: 440ページ
出版社:SBクリエイティブ
発売日:2015/06/06
出典:amazon

Author:しき 投稿一覧
奈良県在住のエンジニア。アルバイトでゲーム開発に携わりIT業界入り。組み込みや業務系のソフト開発を経験して、その後レンタルサーバー会社にてインターネットの根幹の知識を得る。今ではスマホアプリの開発やWeb開発、インフラの構築に従事中。
関連する記事
インフラカテゴリの最新記事
-
- 2023.02.09
- docker,
[docker]対処法:コンテナにログインした時にvi(vim)コマンドが使えない
-
- 2023.01.27
- docker,
[docker]対処法:OCI runtime create failed exec: “bash”: executable file not found
-
- 2023.01.06
- ubuntu,
Debian/Ubuntu系統のサーバOSではcrontabのMAILFROMは使えない件について
-
- 2022.07.19
- ubuntu,
[AWS]Ubuntu22.04 LTS にSSH接続(ログイン)できない問題の解決方法
-
- 2022.06.07
[python]torch がインストールできない場合の対応策
-
- 2022.06.02
- cloudwatch,
[AWS]CloudWatchで監視を行う項目