Using Amazon S3 on Ubuntu

From Brandonhutchinson.com

(Difference between revisions)
Jump to: navigation, search
(''s3sync'' installation)
Line 5: Line 5:
$ '''sudo tar zxvf s3sync.tar.gz -C /opt/'''
$ '''sudo tar zxvf s3sync.tar.gz -C /opt/'''
$ '''sudo chmod go-w /opt/s3sync'''
$ '''sudo chmod go-w /opt/s3sync'''
 +
$ '''( mkdir tmp_cert_dir ; cd tmp_cert_dir ; wget http://mirbsd.mirsolutions.de/cvs.cgi/~checkout~/src/etc/ssl.certs.shar ; sh ssl.certs.shar ; sudo mv f73e89fd.0 /opt/s3sync ; cd .. ; rm -r tmp_cert_dir )'''
-
Add the following to ''~/.bash_profile'':
+
== ''s3sync'' configuration ==
-
# Amazon S3
+
$ '''sudo sh -c 'echo "AWS_ACCESS_KEY_ID=''AWS_ACCESS_KEY_ID''\nAWS_SECRET_ACCESS_KEY=''AWS_SECRET_ACCESS_KEY''\nRUBYLIB=$RUBYLIB:/opt/s3sync\nSSL_CERT_DIR=/opt/s3sync"''' > /opt/s3sync/s3_variables'
-
export PATH=$PATH:
+
$ '''sudo chmod 400 /opt/s3sync/s3_variables'''
 +
$ '''sudo chown ''your_user_ID'' /opt/s3sync/s3_variables'''
== Links ==
== Links ==

Revision as of 15:37, 11 October 2007

s3sync installation

$ sudo apt-get -y install ruby libopenssl-ruby
$ wget http://s3.amazonaws.com/ServEdge_pub/s3sync/s3sync.tar.gz
$ sudo mkdir /opt/s3sync
$ sudo tar zxvf s3sync.tar.gz -C /opt/
$ sudo chmod go-w /opt/s3sync
$ ( mkdir tmp_cert_dir ; cd tmp_cert_dir ; wget http://mirbsd.mirsolutions.de/cvs.cgi/~checkout~/src/etc/ssl.certs.shar ; sh ssl.certs.shar ; sudo mv f73e89fd.0 /opt/s3sync ; cd .. ; rm -r tmp_cert_dir )

s3sync configuration

$ sudo sh -c 'echo "AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID\nAWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY\nRUBYLIB=$RUBYLIB:/opt/s3sync\nSSL_CERT_DIR=/opt/s3sync" > /opt/s3sync/s3_variables'
$ sudo chmod 400 /opt/s3sync/s3_variables
$ sudo chown your_user_ID /opt/s3sync/s3_variables

Links

Personal tools