博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Install the AWS CLI Using the Bundled Installer (Linux, macOS, or Unix)
阅读量:7063 次
发布时间:2019-06-28

本文共 3219 字,大约阅读时间需要 10 分钟。

hot3.png

On Linux, macOS, or Unix, you can also use the bundled installer to install the AWS CLI. The bundled installer includes all dependencies and can be used offline.

Important

The bundled installer does not support installing to paths that contain spaces.

Sections

  • Prerequisites
  • Install the AWS CLI Using the Bundled Installer
  • Install the AWS CLI Without Sudo (Linux, macOS, or Unix)
  • Uninstalling

Prerequisites

  • Linux, macOS, or Unix

  • Python 2 version 2.6.5+ or Python 3 version 3.3+

Check your Python installation:

$ python --version

If your computer doesn't already have Python installed, or you would like to install a different version of Python, follow the procedure in Install the AWS Command Line Interface on Linux.

Install the AWS CLI Using the Bundled Installer

Follow these steps from the command line to install the AWS CLI using the bundled installer.

To install the AWS CLI using the bundled installer

  1. Download the AWS CLI Bundled Installer.
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
  1. Unzip the package.
$ unzip awscli-bundle.zip

Note

If you don't have unzip, use your Linux distribution's built in package manager to install it.

  1. Run the install executable.
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

Note

By default, the install script runs under the system default version of Python. If you have installed an alternative version of Python and want to use that to install the AWS CLI, run the install script with that version by absolute path to the Python executable. For example:

$ sudo /usr/local/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

The installer installs the AWS CLI at /usr/local/aws and creates the symlink aws at the /usr/local/bin directory. Using the -b option to create a symlink eliminates the need to specify the install directory in the user's $PATH variable. This should enable all users to call the AWS CLI by typing aws from any directory.

To see an explanation of the -i and -b options, use the -h option:

$ ./awscli-bundle/install -h

Install the AWS CLI Without Sudo (Linux, macOS, or Unix)

If you don't have sudo permissions or want to install the AWS CLI only for the current user, you can use a modified version of the above commands:

$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"$ unzip awscli-bundle.zip$ ./awscli-bundle/install -b ~/bin/aws

This installs the AWS CLI to the default location (~/.local/lib/aws) and create a symbolic link (symlink) at ~/bin/aws. Make sure that ~/bin is in your PATH environment variable for the symlink to work:

$ echo $PATH | grep ~/bin     // See if $PATH contains ~/bin (output will be empty if it doesn't)$ export PATH=~/bin:$PATH     // Add ~/bin to $PATH if necessary

Tip

To ensure that your $PATH settings are retained between sessions, add the export line to your shell profile (~/.profile, ~/.bash_profile, etc).

Uninstalling

The bundled installer does not put anything outside of the installation directory except the optional symlink, so uninstalling is as simple as deleting those two items.

$ sudo rm -rf /usr/local/aws$ sudo rm /usr/local/bin/aws

转载于:https://my.oschina.net/qwfys200/blog/2979311

你可能感兴趣的文章
【SICP练习】64 练习2.35
查看>>
PSK星座对象(constellation.cc)
查看>>
Linux链接脚本学习--lds
查看>>
Android将list数据通过LitePal保存到本地(集合保存到本地)
查看>>
hdu 1285 确定比赛名次
查看>>
Eureka微服务实战-服务提供者
查看>>
简单的原生ajax
查看>>
h5开发坑点小总结
查看>>
几分钟内提升技能的8个 JavaScript 方法!
查看>>
mac显示隐藏文件
查看>>
Android 插件化原理-好文收集(陆续中。。。)
查看>>
双亲委派模型与Tomcat类加载架构
查看>>
Highcharts tooltip显示数量和百分比
查看>>
小程序兼容iphoneX(齐刘海)代码,mpvue的写法
查看>>
小米设备怎么不ROOT激活Xposed框架的步骤
查看>>
Vue Router
查看>>
你所听到的技术原理、技术本质到底是什么?
查看>>
决战燕京城-10 前往天寿山
查看>>
WebMvcTest与SpringBootTest
查看>>
面试官:你接受免费加班吗?程序员这样怼回去,网友:老铁没毛病
查看>>