前言
ceph 天然支持对象存储,经常使用XShell访问server,习惯了在console里做一些操作,那么,如何
获取S3 key
ceph提供radosg-admin命令,方便查询S3账号的属性信息,诸如ACL,quota,AKEY,SKEY等等一些信息,如下所示:
shell
root@auto-70-1:~# radosgw-admin --uid=user01 user info
{
"user_id": "user01",
"display_name": "user01",
"email": "user01@126.com",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [
{
"id": "user01:user01",
"permissions": "full-control"
}
],
"keys": [
{
"user": "user01",
"access_key": "4B2DT6E0B9C5R6MJ8OEA",
"secret_key": "XI5ZxYejXiZXUJWtzLDEs4OXiGOYVDuoXVhBYtIa"
}
],
"swift_keys": [
{
"user": "user01",
"secret_key": "1"
},
{
"user": "user01:user01",
"secret_key": "1"
}
],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"temp_url_keys": []
}
root@auto-70-1:~#
配置s3cmd config
通过上面获取到的AKEY和SKEY,就可以进行s3cmd的配置操作了。
shell
root@auto-70-1:~# 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: 4B2DT6E0B9C5R6MJ8OEA
Secret Key: XI5ZxYejXiZXUJWtzLDEs4OXiGOYVDuoXVhBYtIa
Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password:
Path to GPG program [/usr/bin/gpg]:
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]:
On some networks all internet access must go through a HTTP proxy.
Try setting it here if you can't conect to S3 directly
HTTP Proxy server name:
New settings:
Access Key: 4B2DT6E0B9C5R6MJ8OEA
Secret Key: XI5ZxYejXiZXUJWtzLDEs4OXiGOYVDuoXVhBYtIa
Encryption password:
Path to GPG program: /usr/bin/gpg
Use HTTPS protocol: False
HTTP Proxy server name:
HTTP Proxy server port: 0
Test access with supplied credentials? [Y/n] n
Save settings? [y/N] y
Configuration saved to '/root/.s3cfg'
root@auto-70-

3683

被折叠的 条评论
为什么被折叠?



