mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-10 22:21:11 +08:00
littlebirdnest 完成翻译
This commit is contained in:
parent
2fb56ff5c0
commit
4a04ea5f90
@ -7,38 +7,38 @@
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Install AWS CLI on Linux Step-by-Step
|
||||
如何在Linux上安装 AWS CLI
|
||||
======
|
||||
|
||||
This post describes how to install latest version of AWS CLI on a linux system step-by-step. AWS CLI is a command line interface which allows us to interact with our AWS account. Developer and sysadmin use aws cli to perform day to day activities and automation.
|
||||
本文讲述如何一步步Linux上安装 AWS CLI。 AWS CLI是一个能够和aws账户进行交互的命令行程序。开发者和系统管理员用它管理日常的活动和自动化
|
||||
|
||||
##### Prerequisites
|
||||
##### 准备环节
|
||||
|
||||
- Pre-Installed Linux System
|
||||
- Sudo User with admin rights
|
||||
- Internet Connectivity
|
||||
- 提前安装好Linux系统
|
||||
- 有管理员权限
|
||||
- 能够联网
|
||||
|
||||
Without any further delay, let’s jump into AWS Cli installations steps.
|
||||
现在让我们开始安装
|
||||
|
||||
### 1) Download installation file
|
||||
### 1) 下载安装文件
|
||||
|
||||
Open the terminal and run following curl command to download aws cli installation file,
|
||||
打开终端使用curl命令下载AWS CLI 的安装文件
|
||||
|
||||
```
|
||||
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
```
|
||||
|
||||
Above command will download file as ‘awscliv2.zip’ in current working directory.
|
||||
以上命令会安装一个 ‘awscliv2.zip’的文件在当前工作目录
|
||||
|
||||
Execute below [ls command][1] to verify downloaded file,
|
||||
使用ls命令确认当前下载下来的文件
|
||||
|
||||
```
|
||||
$ ls -l awscliv2.zip -rw-rw-r-- 1 linuxtechi linuxtechi 47244662 Oct 20 10:53 awscliv2.zip $
|
||||
```
|
||||
|
||||
### 2) Unzip downloaded installation file
|
||||
### 2) 解压下载的文件
|
||||
|
||||
Run beneath [unzip command][2] to unzip the installer.
|
||||
使用unzip命令解压安装包
|
||||
|
||||
if(typeof ez_ad_units != 'undefined'){ez_ad_units.push([[300,250],'linuxtechi_com-medrectangle-3','ezslot_6',320,'0','0'])};__ez_fad_position('div-gpt-ad-linuxtechi_com-medrectangle-3-0');
|
||||
|
||||
@ -46,41 +46,41 @@ if(typeof ez_ad_units != 'undefined'){ez_ad_units.push([[300,250],'linuxtechi_co
|
||||
$ unzip awscliv2.zip
|
||||
```
|
||||
|
||||
It will create aws folder in present working directory and unzip all required files into it.
|
||||
它会在当前目录创建一个aws的文件夹,把解压好的文件放进去
|
||||
|
||||
```
|
||||
$ ls -ld aws drwxr-xr-x 3 linuxtechi linuxtechi 4096 Oct 19 17:18 aws $
|
||||
```
|
||||
|
||||
### 3) Run install script
|
||||
### 3) 运行安装脚本
|
||||
|
||||
To install aws cli, run following install script,
|
||||
使用以下命令允许安装脚本
|
||||
|
||||
```
|
||||
$ sudo ./aws/install
|
||||
```
|
||||
|
||||
Script will install all files under /usr/local/aws-cli and will create symbolic link in /usr/local/bin.
|
||||
脚本会把所有安装的文件放到 /usr/local/aws-cli目录下,然后创建一个链接文件在/usr/local/bin目录.
|
||||
|
||||
if(typeof ez_ad_units != 'undefined'){ez_ad_units.push([[300,250],'linuxtechi_com-medrectangle-4','ezslot_7',340,'0','0'])};__ez_fad_position('div-gpt-ad-linuxtechi_com-medrectangle-4-0');
|
||||
|
||||
### 4) Verify AWS CLI version
|
||||
### 4) 检查AWS CLI的版本
|
||||
|
||||
To verify the aws cli version, run
|
||||
运行以下脚本检查版本
|
||||
|
||||
```
|
||||
$ aws --version aws-cli/2.8.4 Python/3.9.11 Linux/5.15.0-48-generic exe/x86_64.ubuntu.22 prompt/off $
|
||||
```
|
||||
|
||||
### 5) Configure AWS CLI
|
||||
### 5) 配置 AWS CLI
|
||||
|
||||
To verify the AWS Cli installation, let’s configure aws cli.
|
||||
安装好AWS CLI,开始配置 AWS CLI
|
||||
|
||||
Login to your AWS management console and retrieve AWS access key id and secret access key.
|
||||
登录你的AWS管理控制台,取得AWS访问密钥id和访问密钥
|
||||
|
||||
In case it is not created yet then create access key ID and secret access key. Copy these keys somewhere safe.
|
||||
如果还没完成创建,就创建一个密钥id和密钥,把密钥复制到安全的地方
|
||||
|
||||
Now head back to Linux terminal, run following aws command,
|
||||
然后回到命令行,运行以下命令
|
||||
|
||||
if(typeof ez_ad_units != 'undefined'){ez_ad_units.push([[250,250],'linuxtechi_com-box-4','ezslot_8',260,'0','0'])};__ez_fad_position('div-gpt-ad-linuxtechi_com-box-4-0');
|
||||
|
||||
@ -88,29 +88,29 @@ if(typeof ez_ad_units != 'undefined'){ez_ad_units.push([[250,250],'linuxtechi_co
|
||||
$ aws configure AWS Access Key ID [None]: xxxxxxxxxxxxxxxxxxx AWS Secret Access Key [None]: xxxxxxxxxxxxxxxxxxx Default region name [None]: us-west-2 Default output format [None]: json $
|
||||
```
|
||||
|
||||
Above credentials will be saved in following file,
|
||||
以上的证书会被保存到这个文件
|
||||
|
||||
```
|
||||
$ cat ~/.aws/credentials
|
||||
```
|
||||
|
||||
Output of above commands,
|
||||
输出上面的命令
|
||||
|
||||
Run aws command to list s3 bucket and vpc of your account.
|
||||
运行aws命令,列出你账户中的 s3储存和vpc
|
||||
|
||||
```
|
||||
$ aws s3 ls $ aws ec2 describe-vpcs
|
||||
```
|
||||
|
||||
Output,
|
||||
输出,
|
||||
|
||||
Output above confirms that aws cli has been configured successfully.
|
||||
成功输出内容,说明你的 AWS CLI 已经配置完成
|
||||
|
||||
That’s all from this post, please do post your queries and feedback in below comments sections.
|
||||
以上是全部内容,有问题评论区问
|
||||
|
||||
if(typeof ez_ad_units != 'undefined'){ez_ad_units.push([[250,250],'linuxtechi_com-banner-1','ezslot_9',360,'0','0'])};__ez_fad_position('div-gpt-ad-linuxtechi_com-banner-1-0');
|
||||
|
||||
Also Read:[How to Setup EKS Cluster along with NLB on AWS][3]
|
||||
其他文章:[How to Setup EKS Cluster along with NLB on AWS][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -118,7 +118,7 @@ via: https://www.linuxtechi.com/how-to-install-aws-cli-on-linux/
|
||||
|
||||
作者:[Pradeep Kumar][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[littlebirdnest](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user