Is it possible to install the aws-cli package without root permission?

As indicated in the header, I could not find a good way to install aws-cli ( https://github.com/aws/aws-cli/ ) without root (or the equivalent of sudo privileges).

The installation method of Homebrew on a Mac hints that this is possible, provided that several directories and permissions are set in such a way as to install future installations. However, I have yet to find any approach in Linux (especially Red Hat Enterprise Linux or CentOS distributions).

I also know the SCL from RHEL ( https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/scl-utils.html ). But again, this requires sudo .

+5
source share
2 answers

For this purpose there is a complete installer.

Set the aws command to $HOME/bin

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

Set the environment variable $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 

Verify CLI AWS Installation

 $ aws help 

See the following link for more details: http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html#install-bundle-user

+11
source

Obviously answers are possible. The trick is to set up the entire stack in an alternate location on the main machine.

So altinstall python, then easy_intall, then pip. Here is the history of the teams in my journal.

 cd mkdir installations cd installations/ curl -O https://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2 tar xjf Python-2.7.tar.bz2 cd Python-2.7 mkdir -p ~/usr/local make altinstall prefix=~/usr/local exec-prefix=~/usr/local ~/usr/local/bin/python2.7 -V ln -s ~/usr/local/bin/python2.7 ~/usr/local/bin/python echo "export $PATH=~/usr/local/bin:$PATH" >> ~/.bashrc source ~/.bashrc cd mkdir virtualenv cd virtualenv/ curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py mkdir ~/envs python virtual-python.py --prefix=~/env/aws curl -O http://peak.telecommunity.com/dist/ez_setup.py ~/env/aws/bin/python ez_setup.py echo "export $PATH=~/env/aws/bin:~/usr/local/bin:$PATH" >> ~/.bashrc source ~/.bashrc easy_install virtualenv virtualenv --no-site-packages ~/env/awscli source ~/env/awscli/bin/activate pip -V pip install awscli 

These are useful links that I have followed to help me achieve this goal.

Install Python in an alternate location

Install Python stack without root privileges

+2
source

Source: https://habr.com/ru/post/1203724/


All Articles