当前位置: 首页 > 工具软件 > bash-my-aws > 使用案例 >

Centos安装aws cli

阮选
2023-12-01

https://docs.amazonaws.cn/cli/latest/userguide/aws-cli.pdf#cli-chap-install
https://www.cnblogs.com/Jimc/p/10218387.html
备注:如果Python -V和pip -V无法查看版本时,可尝试加软链
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
使用aws --version无法查看版本时,需添加环境变量
export PATH=~/.local/bin:$PATH

安装Python依赖环境
sudo yum install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
安装Python
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
创建安装目录
mkdir -p /usr/local/python3
解压安装包
tar -zxvf Python-3.7.2.tgz
安装编译器
sudo yum install gcc
进入解压后的目录,编译安装
(1)进入解压后的目录
(2)执行./configure
./configure --prefix=/usr/local/python3 #/usr/local/python3为安装目录
执行命令
./configure
make & make install
安装pip3
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user
pip3 install --upgrade pip
添加环境变量
export PATH=~/usr/local/lib/python3.5/site-packages/pip:$PATH
使用pip安装awscli
pip3 install awscli --upgrade --user

 类似资料: