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 😛
- Make a text file in a text editor
- Type some commands in it as you would manually in your terminal
- Save the file as something like
- In terminal, navigate to yoru saved file and type
chmod a+x your-file-name.sh
When you want to run this script, navigate to it and type
./your-file-name.sh (It is very important to prefix your file with ./ or else it won’t execute.)
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!!!
- Setup the server.
- 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
- Go to http://bitnami.org/stack/wordpress#cloudImage and scroll down to the “Amazon machine images”
- 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.
- Select a T1 Micro-sized machine, and Launch Instance (you could request a launch instance, but it’s more complicated)
- 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.
- 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)
- Click Launch!
- 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
- 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!
- 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.
- 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)
- 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.