Category Archives: Terminal / Shell

shell script shirt

How to create an executable shell script in OSX or Linux

I am a complete novice at times when it comes to shell commands. So there are some commands that are SO basic, that I should feel ashamed to blog about them… but this site is just as much for my reference as it is for yours 😛

  1. Make a text file in a text editor
  2. Type some commands in it as you would manually in your terminal
  3. Save the file as something like
  4. In terminal, navigate to yoru saved file and type chmod a+x
  5. When you want to run this script, navigate to it and type ./  (It is very important to prefix your file with ./ or else it won’t execute.)
Make it yourself!

HOW TO : Setup your own freaking personal WordPress server!

Muhahaha!The fact that you are reading this means I did it. I finally got off my bum.. stopped using my crappy Tumblr blog and worked out how to use Linux, SSH, Amazon EC2 and how to change my own DNS. It took all of my free time when I wasn’t looking after my baby to get it going, but it was worth it because now I have complete control!!!


Simple Steps:

  1. Setup the server.
  2. Write this post for the next person.

More Detailed Steps:

Now, you can make your own Linux image, and then install your WordPress on it, but why bother?

Install a Bitnami-made WordPress image on Amazon’s Elastic Compute Cloud

  1. Go to and scroll down to the “Amazon machine images”
  2. Click on an Ubuntu 64-bit EBS link.. you can use either single site which is a touch easier, or multisite (like I did) which I felt was built ready for what I wanted.
  3. Select a T1 Micro-sized machine, and Launch Instance (you could request a launch instance, but it’s more complicated)
  4. Keep clicking Continue until you get to the screen that talks about Key Pairs. If you already have a key pair generated, select the one you want. If not, generate a new one.
  5. When setting up security groups, make one that can accept incoming connections on ports: 22 (SSH), 3389 (RDP), 5900 (VNC), 80 (HTTP), 8080 (HTTP alt)
  6. Click Launch!
  7. Wait for it to boot and the State to change to “Running”.. then click on it and scroll down and copy the Public DNS address
  8. Paste the public DNS value into your web browser and navigate to it. If everything went right, a web page should show!

Connect to it!

  1. Download your Key Pair file from Amazon. Mine is called Linux.pem. This file is your password file. You won’t be typing in a password, you will be supplying this file.
  2. In a terminal window (OSX), change to the directory you downloaded your Linux.pem file and type chmod 600 Linux.pem (This will allow this file to be used)
  3. Now connect to your remote machine with ssh -i Linux.pem bitnami@xxxxxx (where xxxxxx is the Public DNS). If you want to stop having to specify your Linux.pem file.. consider having a look at this article.