Upgrade CentOS from 6.10 to at least 6.4

Discussion in 'Server Operation' started by Wayne Eaton, May 19, 2022.

  1. Wayne Eaton

    Wayne Eaton New Member

    New to Linux. Inherited an application server running Drupal on CentOS 6.10. Running as a virtual machine on Hyper-V 2016. In order to get my backups working on this CentOS box, I have to upgrade at least to CentOS 6.4. I have never upgraded a Linux box with an application running on it. Can I do an in-place upgrade? I feel my Drupal app could fail because I assume other apps like PHP, etc. will be upgraded as well or do these all run independently of the OS? I see most upgrade documents online have to just run yum-update but I assume that will take me to the latest and greatest which I would guess would really break my Drupal app. Can I upgrade from 6.10 to 6.4 only? How would you do that? Not familiar really with the Drupal installation either so I'm kind of in a quandary on the best way to approach this. I did reach out to a Drupal developers group and they said they don't do this kind of upgrade.
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Are you writing the version numbers wrong? Surely version 6.4 is older than 6.10. (i.e. 4 < 10).
    If you have virtual machines, create a new host, install the OS version you need, then copy that Drupal application to this new host. Test until it works, then move the new host to production. I would not use ancient 6.x CentOS versions anymore.
    Usually yes. I have not used Red Hat based linuxes since 1995, so can not advice how to do it. There are instructions available on how to do upgrades.
    This is indeed the case.
    Drupal and other PHP apps may break when the PHP version on host they are running on changes. Check before which PHP versions your Dupal supports.
  3. michelangelo

    michelangelo Active Member

    Are you sure that you didn't mean downgrade?
    Because CentOS 6.10 is newer than CentOS 6.4, just for the record.

    Or did you actually mean to upgrade that CentOS 6.x VM to at least CentOS 7.4?
    In-place upgrades from older RHEL bases distributions tend often to fail, especially if plenty of third-party packages have been installed.
    If it is just plain CentOS then your chances might be higher to succesfully upgrade it to 7.9.

    However, the upgrade path from CentOS 6.x to CentOS 7.x is not officially supported (only RHEL 6 to RHEL 7) and you should better have a functional backup, or working VM snapshot, just in case the in-place upgrade will fail and it will likely fail and fixing that mess is no fun.

    Perhaps it would be better to set up a new VM with a distribution of your choice that is also compatible with your Drupal installation.
    What Drupal version is running on that VM?
  4. Wayne Eaton

    Wayne Eaton New Member

    I think you're right - I am at 6.10. I thought 6.10 was like 6.1. Again a newbie.
  5. Wayne Eaton

    Wayne Eaton New Member

    Hi - yes, I'm actually on 6.10. I thought 6.10 was 6.1 - was dropping the 0. The Drupal version I'm running is 7.56 from what I can tell. I don't even know the linux file structure enough to know if I can just copy folders from one server to another and have it work. It sounds like the best option would be to create a new VM and install the newest version of CentOS and then figure out how to install Drupal and see if I can figure out where data is stored and copy it over. I just don't know if whoever set up this server installed things in 'default' locations or did something on their own. I do know the database is installed on another CentOS database server. Does Drupal store everything in the database? Maybe I just need to install Drupal again and point it there?
  6. michelangelo

    michelangelo Active Member

    The requirements for 7.56 should be those: https://www.drupal.org/docs/7/system-requirements
    So, setting up AlmaLinux 8 or Rocky Linux 8 should be fine if you want to follow the CentOS/RHEL path.

    Both distributions are supported with updates until 2029, so it is actually a pretty good choice for a server OS, especially if this VM is running in a local network, but Debian and others would work too. The most important part is, that you know how to maintain a linux machine.

    Well, that's indeed something that you've to find out yourself, or you'll have to hire a linux guy who knows how to figure out all that stuff.
    The general approach would be to look in /etc directory where usually all configuration files are stored and among them are also those of the webserver. When you'll look through these files, you should find the location where the Drupal website is stored. However, the default location for websites on RHEL/CentOS is /var/www and possibly in /var/www/html.

    Drupal usually stores everything in one database unless it is a highly customized setup.
    The question is, if pointing to that other VM, that seems to provide the database is sufficient?! Is that other machine also running CentOS 6 and do you need to replace/upgrade that machine as well?
  7. Wayne Eaton

    Wayne Eaton New Member

    Hi Michelangelo,
    Good information and I think the best way for me to learn and get more familiar with it is to make a copy of the virtual machine and then do some research and 'play' with the copy. I appreciate the insight and help!

Share This Page