S3 Amazon Simple Storage Service

Posted on March 31, 2010 at 2:59 am in

So yeah I’ve been looking around for tools I can use for Amazon S3.
I originally used S3fox. It’s a useful browser plugin for Firefox. Works great for small jobs and copy single
files and small directories of files. However if you want something a little more robust the best tool
out there is s3cmd.

I’ve only been using it for a bit but it seems to do everything this programmer could want.
It’s a command line tool for linux. It’s pretty good so far I’ve copied 4900 images with it in a single bound.
It died when I tried copying over 100000 files but yeah that was probably the operating system
wimpering and not s3cmd. I switched to s3cmd put a* s3://bucket/directory/ instead to send
all of the files that start with the letter a first to split things up. That worked fine.

Installation was a breeze on centros linux.
# yum install s3cmd
# s3cmd –configure

Then once that’s all done you can start running these commands.
s3cmd ls
s3cmd put * s3://bucketname/directory/
s3cmd get s3://bucketname/directory/file

I was a little disappointed that the s3cmd –help didn’t list the commands. You have to sort of look around on the website. I’ve listed a few common commands here. There are others listed on the website. I use s3fox for making directories and buckets but here are the commands for s3cmd.

s3cmd mb s3://bucketname
// makes a bucket
s3cmd rb s3://buckettoremove
// removes a bucket

Check out here for more information and documentation..

The man pages for ubuntu actually have better documentation then the original website

Finally I was having issues running s3cmd from php shell_exec on certain boxes/configurations.

Here’s a good thread about how to deal with these issues


ubuntu apache2 and htaccess files.

Posted on March 20, 2010 at 11:10 pm in

If you are just trying to setup an apache2 server straight out of the box and want to modify add htaccess files it’s kind of different then how the apache instructions mention how to do so.

Here’s the thread I found through google on it.

http://ubuntuforums.org/showthread.php?t=47669

Follow orlando_nicks advice (posted 5 years ago). LOL.
The post is pretty old so I’ll cut & paste it here just in case it goes missing someday.

Found the solution!! Apache2 in general, or it might be specifically to Ubuntu, is configured slightly differently than Apache1.x.. at least from what I’ve seen in the default installs in RH, FC, Mandrake, etc (I’m not Linux or Apache expert).

I went to /etc/apache2/sites-available and edited the file default
There you’ll find:


NameVirtualHost *
<VirtualHost *>
ServerAdmin admin@site.com

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# Commented out for Ubuntu
#RedirectMatch ^/$ /apache2-default/
</Directory></code>

oh and yay for the code tag not working.


Ok ubuntu installation again!

Posted on March 19, 2010 at 5:05 pm in

So yeah I’m setting up another slicehost server.

Following these instructions:

https://help.ubuntu.com/community/ImageMagick

http://articles.slicehost.com/2008/4/25/ubuntu-hardy-installing-apache-and-php5

However they don’t work first try. Turns out I didn’t run the following command first: ‘sudo apt-get update’

Once I ran that … everything was AOK. Next I wanted to install convert/imagemagick. I followed these instructions:

https://help.ubuntu.com/community/ImageMagick

Everything AOK so far. This box doesn’t need MySQL however so I haven’t installed it.

Comment on Ok ubuntu installation again!


Useless blog is useless?

Posted on March 11, 2010 at 2:31 pm in

I put this blog up mainly so I can keep track of idea’s and various procedures I deal with in running websites and programming. It’s an online diary that I don’t mind sharing with everyone. Unfortunately since WordPress is so popular I’m constantly getting spam comments. In total I’ve had 213 spam comments (probably more) and 0 actual real comments and each one of those generates an email. So for now I’ve disabled comments on this site.


Top