内容へ移動
fl8 Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
Dokuwiki.fl8.jp
»
01_linux
»
01_net
»
34 s3cmd
トレース:
01_linux:01_net:34_s3cmd
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 34 s3cmd ====== S3を管理できるツールです。 バケットを作成したりファイルやフォルダをアップロードしたり公開設定を指定したりといった事が簡単にできます。 ===== インストール ===== ==== 1. gitでクローンを作成 ==== [[01_linux:01_net:35_gitインストール|]] <code console> $ git clone git://github.com/s3tools/s3cmd </code> ==== 2. moduleなどインストール ==== <code console> $ cd s3cmd $ sudo python setup.py install </code> ==== 3. configファイル作成 ==== <code console> $ 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: XXXXXXXXXXXXXXXXXXX Secret Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 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: XXXXXXXXXXXXXXXXXXX Secret Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 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 </code> これでホームディレクトリに「**.s3cfg**」というファイルができる。 ==== 4. configファイル修正 ==== デフォルトではs3.amazonaws.comになっている所を、riack-csのcs_root_hostに変更する。 <code console> $ vi ~/.s3cfg host_base = s3.amazonaws.com host_bucket = %(bucket)s.s3.amazonaws.com ↓ host_base = hogehoge.hoge host_bucket = %(bucket)s.hogehoge.hoge </code> ==== 5. 確認 ==== s3cmdコマンドが実行できればOK <code console> $ s3cmd ls 2013-12-06 01:28 s3://matsui-bucket </code> ===== CentOS5系でv1.5.0を利用の場合 ===== <color red> Python 2.4 では v1.5.0 は利用できない。 \\ CentOS 5系は、Python 2.4なので、別途Python 2.6を利用する必要があります。 </color> <code> s3cmd / NEWS s3cmd 1.5.0-beta1 - 2013-12-02 ================= * Brougt to you by Matt Domsch and contributors, thanks guys! :) * Multipart upload improvements (Eugene Brevdo, UENISHI Kota) </code> Python 2.6をインストール後Python 2.6にモジュールインストールと、s3cmdコマンドの修正 [[01_linux:01_net:33_centos5にpython2.6インストール|]] ・Python 2.6用モジュールインストール <code console> # cd s3cmd # python26 setup.py install </code> ・コマンド修正 <code console> # vi /usr/bin/s3cmd #!/usr/bin/python ↓ #!/usr/bin/python26 </code>
01_linux/01_net/34_s3cmd.txt
· 最終更新: 2014/01/23 05:45 by
matsui
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ