In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to install s3cmd on Linux", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install s3cmd on Linux" this article.
Install s3cmd on Linux
Install s3cm on Ubuntu or Debian
$sudo apt-get install s3cmd
Install s3cmd on Fedora
$sudo yum install s3cmd
Install s3cm on CentOS or RHEL
$s3cmd put-acl-public 4.png s3://dev99 4.png-> s3://dev99/4.png [1 of 1] 30778 of 30778 100 in 8s 3.34 kB/s done
Download the rpm package from the official site and install it manually. 64-bit CentOS or RHEL 6, with the following command:
$sudo rpm-ivh s3cmd-1.0.0-4.1.x86_64.rpm
Configure s3cmd
* to run s3cmd, you need to run the following command for configuration:
$s3cmd-configure
It will ask you a series of questions:
Access key and Security key for AWS S3
Encrypted passwords and encrypted data for AWS S3 two-way transmission
Set the path of the GPG program for encrypted data (for example, / usr/bin/gpg)
Whether to use https protocol or not
If using a http proxy, set the name and port
The configuration will be saved in plain text format in ~ / .s3cfg.
The basic usage of s3cmd
List all existing bucket in your account:
$s3cmd ls 2011-05-28 22:30 s3://mybucket1 2011-05-29 00:14 s3://mybucket2
Create a new bucket:
$s3cmd mb s3://dev99 Bucket's 3VOUGUR UniUniGUP dev99 Universe 'created
Upload files to an existing bucket:
$s3cmd put 1.png 2.png 3.png s3://dev99 1.png-> s3://dev99/1.png [1 of 3] 26261 of 26261 100% in 5s 4.33 kB/s done 2.png-> s3://dev99/2.png [2 of 3] 201430 of 201430 100% in 2s 98.05 kB/s done 3.png-> s3://dev99/3.png [3 of 3] 46630 of 46630 100% in 0s 56.62 kB/s done
The default access to uploaded files is private (private), which means only you can access it, using the correct access and security password.
Upload files with public access to the existing bucket:
$s3cmd put-- acl-public 4.png s3://dev99 4.png-> s3://dev99/4.png [1 of 1] 30778 of 30778 100% in 8s 3.34 kB/s done Public URL of the object is: http://dev99.s3.amazonaws.com/4.png
If the uploaded file is granted public access, anyone in the browser can access it through http://dev99.s3.amazonaws.com/4.png.
View the contents of an existing bucket:
$s3cmd ls s3://dev99 2013-06-02 02:52 26261 s3://dev99/1.png 2013-06-02 02:52 201430 s3://dev99/2.png 2013-06-02 02:52 46630 s3://dev99/3.png 2013-06-02 02:56 30778 s3://dev99/4.png
Download the files contained in the existing bucket (for example, all .png files):
$s3cmd get s3://dev99/*.png s3://dev99/1.png->. / 1.png [1 of 4] 26261 of 26261 100% in 0s 39.39 kB/s done s3://dev99/2.png->. / 2.png [2 of 4] 201430 of 201430 100% in 7s 24.64 kB/s done s3://dev99/3.png->. / 3.png [3 of 4] 46630 of 46630 100 in 1s 39.34 kB/s done s3of / / dev99/4.png->. / 4.png [4 of 4] 30778 of 30778 100% in 0s 97.01 kB/s done
Delete files in an existing bucket:
$s3cmd del s3://dev99/*.png File s3://dev99/1.png deleted File s3://dev99/2.png deleted File s3://dev99/3.png deleted File s3://dev99/4.png deleted
Get information about existing bucket, including storage location and access control list (ACL):
$s3cmd info s3://dev99 s3://dev99/ (bucket): Location: us-east-1 ACL: dan.nanni: READ ACL: dan.nanni: WRITE ACL: dan.nanni: READ_ACP ACL: dan.nanni: WRITE_ACP
Before uploading to an existing bucket, encrypt the file:
$s3cmd-e put encrypt.png s3://dev99/ tmp/tmpfile-pzT1zV3kLZlxDwqA0kwy-> s3://dev99/encrypt.png [1 of 1] 196890 of 196890 100% in 1s 99.51 kB/s done
When you download an encrypted file with s3cmd, it automatically detects encryption and decrypts it during the download process, so download and access encrypted files as you usually do:
$s3cmd get s3://dev99/encrypt.png s3://dev99/encrypt.png->. / encrypt.png [1 of 1] 196890 of 196890 100% in 1s 131.29 kB/s done
Delete an existing bucket:
$s3cmd rb s3://dev99 Bucket's 3VOUGUR UniUniGUP dev99 Universe 'removed
Note that you cannot delete a non-empty bucket.
The above is all the contents of the article "how to install s3cmd on Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.