Migration from C6 -> C8

A long, long time ago I got myself a Centos 6 VPS. It’s been quite a long time, and with the maintenance period of Centos 6 coming up quickly in November 2020 I decided to go full bore into Centos 8.

When performing the upgrade I keep a couple things in mind:

  • Make sure you took care of all DNS records a week ago to reduce the record time to 10 minutes from 1 week.
  • Keeping configurations, and if I cannot then how to migrate them correctly
  • How to move files easily between hosts without nailing bandwidth caps
  • Making sure all sites that are moved can be tested
  • When to make DNS changes

I create myself a checklist of things to do with a new machine and run through it many times to make sure I minimize downtime:

  • Security: Check firewalld and selinux. Set selinux to permissive and reboot
  • get /etc/hosts set up with a mapping for “oldhost” since we’ll be changing DNS
  • Get EPEL and PHP-remi installed. I have to use remi since I use php-imap and that mod is not available in the Centos 8 PHP 7.2 release.
  • Get all my services in a list to copy/paste install
  • Get all my users and home folders listed, passwords organized, and groups situated
  • Get all my core hosting folder and filestructures properly owned
  • Setup my sudo users
  • Configure dovecot for my local map server
  • Configure sendmail, make sure local-host-names and virtusertable are correct
  • Migrate all the mail from the old server to the new
  • Set up dns and reverse dns set up for mail domains to go to new server
  • Set up mariadb, then shut down MySQL on the old, rsync things over, and start up mariadb. Let mariadb complain, then be awesome and work.
  • Configure up Nginx, complain at some of the defaults that should be present in the conf files and comment them out. Copy over letsencrypt certificates.
  • Install apache, do some renaming, and set up new <Directory> rules. Konk out my php_value apache configs since PHP_FPM mode doesn’t use them. Complain a bit, but realize this is part of updating.
  • Finish migrating all DNS to the new host.
  • Start up all services, then set them all to start on boot in case the datacenter takes a crap.

Once all that is done, check and double-check. Copy old logs for mementos-sake, and relax.

Leave a Reply