如何在Windows中安装s3cmd和管理S3桶

S3cmd针对Linux服务器上管理S3桶创建。 但是,我们还可以使用Windows服务器上的这个工具。 本文将帮助您在Windows系统中安装s3cmd。 如果您正在寻找在这里在Linux系统中阅读下一篇文章安装s3cmd 在Linux上安装s3cmd女将-S3-中心标志 S3cmd系统要求:要求Python 2.4或更高版本来运行s3cmd。我们还需要安装GPG。

第1步:安装Python

下载并从Python官方网站安装python 2.4或更高版本,并安装它。 https://www.python.org/downloads/ 安装Python后,追加了Python中 路径环境变量。打开命令提示符并验证Python版本。
C:> python --version

Python 2.7.6

第2步:Windows上安装GPG

Gpg4win(GNU隐私守护适用于Windows)是免费的软件安装。使用下面的链接下载并安装它。 http://www.gpg4win.org/download.html

第3步:下载S3cmd和配置

从下载最新s3cmd源代码 s3cmd官方页面,并解压到 C:s3cmd 位置。 http://s3tools.org/download 提取源代码后,使用下面的命令来设置S3环境。它会询问你的S3账户ACCESSKEY和SecretKey,GPG命令如下图所示。
C:s3cmd> python s3cmd --configure

Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.

Access key and Secret key are your identifiers for Amazon S3
Access Key: XXXXXXXXXXXXXXXXXXXX
Secret Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password: XXXXXXXXX
Path to GPG program: C:Program Files (x86)GNUGnuPGgpg2.exe

When using secure HTTPS protocol all communication with Amazon S3
servers is protected from 3rd party eavesdropping. This method is
slower than plain HTTP and can't be used if you're behind a proxy
Use HTTPS protocol [No]: Yes

New settings:
  Access Key: XXXXXXXXXXXXXXXXXXXX
  Secret Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  Encryption password: XXXXXXXXX
  Path to GPG program: C:Program Files (x86)GNUGnuPGgpg2.exe
  Use HTTPS protocol: True
  HTTP Proxy server name:
  HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n] Y
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)

Now verifying that encryption works...
Success. Encryption and decryption worked fine :-)

Save settings? [y/N] Y
Configuration saved to 'C:UsersAdministratorApplication Datas3cmd.ini'

第4步:验证S3cmd

为了验证s3cmd配置使用下面的命令。它会列出在配置S3帐户创建的所有桶。
C:> python c:s3cmds3cmd ls

2014-02-03 06:37  s3://youcl
2014-03-29 07:56  s3://youclbackups
赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏