{"id":2605,"date":"2020-05-13T21:07:20","date_gmt":"2020-05-14T01:07:20","guid":{"rendered":"http:\/\/blog.domb.net\/?p=2605"},"modified":"2020-10-15T21:47:52","modified_gmt":"2020-10-16T01:47:52","slug":"s3cmd-on-solaris10","status":"publish","type":"post","link":"https:\/\/blog.domb.net\/?p=2605","title":{"rendered":"s3cmd on Solaris10"},"content":{"rendered":"<p>Ever wondered if you can use S3 with Solaris 10? This post will walk you through how you can install s3cmd on Solaris 10 to interact with AWS s3.<\/p>\n<p>1. We will need to install pkgutil which will allow us to use the opencsw repository to install wget, python27, py_pip, gnupg<\/p>\n<p>[cc lang=&#8221;bash&#8221;]\/bin\/bash<br \/>\npkgadd -d http:\/\/get.opencsw.org\/now<br \/>\nPATH=$PATH:~\/opt\/csw\/bin<br \/>\npkgutil -U<br \/>\npkgutil -y -i python27 py_pip gnupg<br \/>\n[\/cc]<\/p>\n<p>2. Install python-magic<br \/>\n[cc lang=&#8221;bash&#8221;] pip install s3cmd<br \/>\n[\/cc]<\/p>\n<p>3. run s3cmd configure<br \/>\n<code>s3cmd --configure<br \/>\nEnter new values or accept defaults in brackets with Enter.<br \/>\nRefer to user manual for detailed description of all options.<\/p>\n<p>Access key and Secret key are your identifiers for Amazon s3. Leave them empty for using the env variables.<br \/>\nAccess Key: YOUR_AWS_ACCESS_KEY<br \/>\nSecret Key: YOUR_AWS_SECRET_KEY<br \/>\nDefault Region [US] us-east-1<\/p>\n<p>Use \"s3.amazonaws.com\" for S3 Endpoint and not modify it to the target Amazon s3.<br \/>\nS3 Endpoint [s3.amazonaws.com]<\/p>\n<p>Use \"%(bucket)s.s3.amazonaws.com\" to the target Amazon S3. \"%(bucket)s\" and \"%(location)s\" vars can be used<br \/>\nif the target S3 system supports dns based buckets.<br \/>\nDNS-Style bucket+hostname:port template for accessing a bucket [%(bucket)s.s3.amazonaws.com]:<\/p>\n<p>Encryption password is used to protect your files from reading by unauthorized persons while in transfer to s3<br \/>\nEncryption password: YOUR_ENC_PASS<\/p>\n<p>Path to GPG program: \/opt\/csw\/bin\/gpg<\/p>\n<p>When using secure HTTPS protocol all communication with Amazon S3<br \/>\nservers is protected from 3rd party eavesdropping. This method is slower than plain HTTP, and can only be proxied with Python 2.7 or newer<br \/>\nUse HTTPS protocol [Yes]:<\/p>\n<p>On some networks all internet access must go through a HTTP proxy.<br \/>\nTry setting it here if you can't connect to s3 directly<\/p>\n<p>HTTP Proxy server name:<\/p>\n<p>New Settings:<br \/>\nAccess Key: YOUR_AWS_ACCESS_KEY<br \/>\nSecret Key: YOUR_AWS_SECRET_KEY<br \/>\nDefault Region: us-east-1<br \/>\nS3 Endpoint: s3.amazonaws.com<br \/>\nDNS-style bucket+hostname:port template for accessing a bucket: %(bucket)s.s3.amazonaws.com<br \/>\nEncryption password: YOUR_ENC_PASS<br \/>\nPath to GPG program: \/opt\/csw\/bin\/gpg<br \/>\nUse HTTPS protocol: True<br \/>\nHTTP Proxy server name:<br \/>\nHTTP Proxy server port: 0<\/p>\n<p>Test access with supplied credentials [Y\/n] Y<\/p>\n<p>Please wait, attempting to list all buckets...<br \/>\nWARNING: Retrying failed request: \/?delimiter=%F ('')<br \/>\nWARNING: Wait 3 sec...<br \/>\nSuccess. Your access key and secret key worked fine :-)<\/p>\n<p>Now verifying that encryption works...<br \/>\nSuccess. Encryption and decryption worked fine :-)<\/p>\n<p>Save Settings? [y\/N] y<br \/>\n<\/code><\/p>\n<p>4. check if you see your buckets<br \/>\n[cc lang=&#8221;bash&#8221;] s3cmd ls<br \/>\n2020-05-02 00:53 s3:\/\/test-ldo<br \/>\n2020-05-01 08:53 s3:\/\/test2-ldo<br \/>\n[\/cc]<\/p>\n<p>5. upload a file<\/p>\n<p>[cc lang=&#8221;bash&#8221;] s3cmd &#8211;no-mime-magic put test.txt s3:\/\/mytestbucket<br \/>\n[\/cc]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever wondered if you can use S3 with Solaris 10? This post will walk you through how you can install s3cmd on Solaris 10 to interact with AWS s3. 1. We will need to install pkgutil which will allow us to use the opencsw repository to install wget, python27, py_pip, gnupg [cc lang=&#8221;bash&#8221;]\/bin\/bash pkgadd -d&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2642,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[161],"tags":[108,169,171,170],"class_list":["post-2605","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","tag-aws","tag-s3","tag-s3cmd","tag-solaris"],"_links":{"self":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/2605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2605"}],"version-history":[{"count":20,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/2605\/revisions"}],"predecessor-version":[{"id":2625,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/2605\/revisions\/2625"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/media\/2642"}],"wp:attachment":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}