是否可以在没有 root 权限的情况下安装 aws-cli 包? [英] Is it possible to install aws-cli package without root permission?

查看:47
本文介绍了是否可以在没有 root 权限的情况下安装 aws-cli 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题所示,我一直找不到安装 aws-cli 的好方法(https://github.com/aws/aws-cli/) 没有 root 访问权限(或等效的 sudo 权限).

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).

我也知道来自 RHEL 的 SCL (https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/scl-utils.html) 但同样,它需要 sudo.

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

这篇关于是否可以在没有 root 权限的情况下安装 aws-cli 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆