From the course: Linux: Files and Permissions

Reconfigure or migrate CentOS - Linux Tutorial

From the course: Linux: Files and Permissions

Reconfigure or migrate CentOS

- [Instructor] It's important to note that Red Hat ended support for CentOS 8 on December 31st, 2021. Part of the process involved changing the software repository URLs from centos.org to vault.centos.org. If you have a CentOS installation and it cannot install software from its repositories, execute these steps. If you're using Rocky Linux or Alma Linux OS, you can skip this video. First make sure your networking is turned on by clicking on your top right hand menu and clicking wired off. Now click on wired settings, click on the gear icon next to the wired connection and click on connect automatically, now click apply and click the slider gadget to turn it on. Now, to fix the repositories in a terminal type in cd space /etc/yum.repos.d/ and hit enter, now comment out all mirrorlist lines by typing in sudo space sed space dash i space single quote s forward slash for the delimiter mirrorlist forward slash hash mirrorlist forward slash g for global single quote space capital C lowercase e n t uppercase OS dash asterisk and hit enter and type in your user's password. Now, change the CentOS mirror URL to vault.centos.org. We'll need to use the pipe symbol for the sed delimiter because the URLs have forward slashes in them, type in sudo space sed space dash i space single quote s for substitute again, this time type in a pipe symbol for the delimiter hash baseurl equals http colon slash slash mirror.centos.org pipe symbol baseurl equals http colon slash slash vault.centos.org pipe g single quote space capital C lowercase e n t capital OS dash asterisk and hit enter. Now update your system by typing in sudo space dnf space update and hit enter. Note that this makes your CentOS installation functional again, since this version is no longer supported there will not be any more software updates for it but you will be able to install current software from the repositories, for now this may be fine, especially for the purpose of learning. However, in the future, it may become a problem when trying to install newer versions of software. Once the update has been done, reboot your VM by typing in reboot and hit enter. To be able to update your CentOS system with new versions of software and security patches you'll need to migrate it. A couple of options include migrating to Rocky Linux or Alma Linux OS. I will outline both processes in this video, you can do either both, for educational purposes or choose one. Log back in and then before making any changes to your VM, you should take a snapshot by pressing the host key plus T, name the snapshot pre-migration and hit enter. To migrate CentOS 8 to Alma Linux OS, point your web browser to almalinux.org and then click on the migrate button. This will take you to their GitHub page, about halfway down the page there is an almalinx-deploy.sh link, click on it and then click on raw and then right click and select save page as, choose your downloads directory and click on save. Once that's downloaded, go to your terminal and change the downloads directory, type in cd space tilde slash Downloads with a capital D and hit enter. Now run the script by typing a sudo space bash space almalinux-deploy.sh and hit enter again and enter your password. Once the migration is done, reboot into Alma Linux OS. Another option is to migrate to Rocky Linux, to do so you'll need to revert your VM back to the pre-migration snapshot again. Click the VM close gadget, select power off the machine and select restore current snapshot 'pre-migration' and hit okay. Now click on start to start your VM back up. Once it's powered back up, bring up a web browser and browse to rockylinux.org and click on migrate. This page contains the documentation concerning migration from CentOS, partway down the page is a link for the GitHub project page for the migrate2rocky script, click on that. Now click on migrate2rocky.sh and then click on raw and right click and click save page as and save it to your downloads directory. Open a terminal and cd to your downloads directory, type in cd space tilde slash Downloads with a capital D and hit enter, and then run the script. Type in sudo space bash space migrate2rocky.sh space dash r and hit enter and enter your password. Once the migration process has finished, reboot into Rocky Linux, the differences between Rocky Linux and Alma Linux OS are minor and comprised boot images and backdrops at this point, both of these are nearly identical to CentOS 8 and all receive all future software updates, use whichever one you wish.

Contents