In my previous post, I detailed my new setup. I initially chose to use the most popular distribution of linux, Ubuntu, for my DigitalOcean VPS. I made this decision because any problem or question I may ever have about Ubuntu has probably been answered on the web. It probably made some things easier for me on my first VPS, but after a bit of reading, I’ve decided to switch over to CentOS. CentOS is designed for enterprise use, and focuses on stability of the OS, which is perfect for servers. There are a few drawbacks, such as some packages being older, but nothing that isn’t impossible to work around. With the announcement and patching of the Heartbleed bug/exploit, this is as good of a time as any to make this move. Even though I am not serving anything through SSL, I may in the future and don’t want it to bite me later.
I started with taking a snapshot of the current Ubuntu server using DigitalOcean’s web panel. I wanted to make sure I had a known-good configuration that I can fall back to if everything went to crap for some reason. I then created the new droplet, logged in as root, and started installing packages using
yum. The only big issue I had to resolve was that CentOS only has Python 2.6.6, while I needed 2.7.* for Pelican. Since
yum and some other things in the system rely on the system python, I had to install
/usr/local/ Thankfully it was fairly straightforward to install using the
make altinstall command.
Everything was smooth sailing from there. I updated my DNS entries to point to the new droplet. After that propagated sufficiently (I had a TTL of 30 minutes), I stopped the old droplet, took a final snapshot of it, and destroyed it. While it took a little bit of time for the migration, it was all very simple.