How do I upgrade from Centos 6.9 to 7.x ?

January 27, 2018 7k views
Getting Started VPN CentOS
0e7af663e1cd9986be0e1c428c4c239828e66fd5
By:
Hydester

How do I upgrade from Centos 6.9 to 7.x ?

And is it worth it.?

As I understand it, you can't just upgrade, but have to do a fresh install.

Accordingly, would the simplest thing to do be create a new droplet with Centos 7 then import snapshot?
Or would this re-import Centos 6.9 ?

Or am I showing my complete ignorance altogether!!!???

With thanks in anticipation

Stephen

http://www.hotelresortphotography.co.uk

2 Answers

Unfortunately, CentOS does not support upgrading between major versions directly. A fresh install is definitely the way to go here. Previously, they had provided a community maintained tool for the purpose, centos-upgrade-tool-cli. The docs for the tool now contain this concerning warning:

DO NOT USE this tool. Warning: use of this tool is currently BROKEN as several system-critical packages are of a higher version number in CentOS 6.7 than they are in CentOS 7 so those do not get upgraded correctly. This renders yum and several other system tools non-functional.

Regarding snapshots: A snapshot makes a full copy of the Droplet, including the operating system. So while they are very useful for making backups or master images for re-use, they will not be very helpful here.

Even in case where upgrading between major versions directly is better supported (i.e. Ubuntu), it's often better to install fresh due to potential incompatibles with newer software versions and other issues that may occur during the upgrade. This might be a great opportunity to learn more about and start using configuration management tools if you aren't already. They can help make your environment much more reproducible.

As a broader subject, configuration management (CM) refers to the process of systematically handling changes to a system in a way that allows the system to maintain integrity over time. In this tutorial, we will discuss how configuration management works for servers, and what to consider when choosing a tool for building your configuration management infrastructure.

Hi ASB

Many thanks for your reply.

The configuration management tools you suggest are a bit beyond my scope (I am just a photographer who maintains his own website).

Would it be possible to do the upgrade simply by creating a new droplet with Centos 7.x and then copying over all my files and folders by FTP and then point all traffic to the new droplet?

FYI, I use a LAMP stack called Webuzo (pretty much identical to cPanel)

This seems an easy way to do it.

Any thoughts?

Thanks again

Stephen

Have another answer? Share your knowledge.