是否可以在没有root许可的情况下安装aws-cli软件包?
正如标题所建议的,我一直没有找到安装 aws-cli
的好方法(
As title suggested, I haven't been able to find a good way to install aws-cli
(https://github.com/aws/aws-cli/) without having the root access (or equivalent of sudo
privileges).
在Mac上 Homebrew
设置提示的方式是可能的,前提是设置了一些目录和权限以方便将来安装.但是,我还没有在Linux中找到任何方法(特别是Red Hat Enterprise Linux或CentOS发行版).
The way Homebrew
setup on Mac is hinting at it may be possible, provided that a few directories and permissions are set in a way to facility future installs. However, I have yet to find any approach in Linux (specially, Red Hat Enterprise Linux or CentOS distroes).
I am also aware of SCL from RHEL (https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/scl-utils.html) But again, it requires sudo
.
有一个用于此目的的捆绑安装程序.
There's a bundled installer for that purpose.
将 aws
命令安装到 $ HOME/bin
$ wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -b ~/bin/aws
设置 $ PATH
环境变量
$ 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
测试AWS CLI安装
Test the AWS CLI Installation
$ aws help
有关详细信息,请参见以下链接: http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html#install-bundle-user
See the following link for details: http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html#install-bundle-user