Journey to Linode

by Emil Abraham
published on Jan. 22, 2015, 8:38 p.m.

This is a log of my journey to developing emilabraham.com on Linode.

Originally, emilabraham.com was hosted at Dreamhost. I was happy with their service. But they did not support Django as well as I thought. Every time I made a change, I had to do some sort of workaround. Their tutorials and resources were never very clear. I eventually decided to throw in the towel and host emilabraham.com elsewhere.

I have only heard good things about Linode, so I decided to give it a shot. It seemed very bareboned. There was a lot of setup and customization to be done in the beginning. Luckily their tutorials are very easy to follow and very in-depth. Because nothing was setup by default, you can choose exactly what goes on your server. Including the Linux distro. I followed the tutorial step
by step.

Because the tutorial was very hands-on with every aspect of the server, I learned much more about the innerworkings of a server than I thought I would. Dreamhost has everything set up. That is fine if you don't want to customize any features. But if you decide to change something that doesn't jive with the defaults, then you spend countless hours looking for a workaround. Linode starts at 0 and you have a say at every step on the way to 100.

I learned things about a Linux server that I have never tried before. For example, like setting the hostname to whatever I want, and setting up the timezone. After the initial setup, the next step was to secure the server.

By default we automatically logged in as root. Root has a lot of unquestioned power. One of the first things the tutorial suggested was to create a new user. This made sure I had to type in a password before I made any drastic changes. Then I learned a little bit about SSH keys and password authentication. Next, I learned how to set up a basic firewall. This firewall basically prevents connection onto the server from unauthorized ports.

The final step in setting up the server was to make it a host for a website.

I learned what a LAMP(Linux,Apache,MySQL,PHP) stack was. I installed and configured Apache. Setting up a Virtual Host was the trickiest part. But once I figured out how it worked, it wasn't too complex. I followed these instructions to set up the Django application. It is mostly the same, besides setting up the mod_wsgi. I had to create a django.wsgi file that basically tells apache how to handle the Django application. The Virtual Host just points to the django.wsgi file. Next I had to set up a database. I used a postgresql database. No particular reasoning why. Shits and giggles, I guess? Finally, I installed PHP.

The last step was learning about and adding DNS records. I remember covering this stuff in Systems and Networks class. I learned about A records, namespaces, DNS caches, domains, subdomains etc. I actually set up a secret subdomain. When I set emilabraham.com I thought it wasn't working for the longest time. I kept getting a 500 server error.
But in fact the DNS record was just propagating all over the worldwide web.