- Как перейти с CentOS на Oracle Linux
- ВНИМАНИЕ:
- Подготовка к переходу с CentOS на Oracle Linux
- Переход (Миграция) с CentOS на Oracle Linux
- Заключение
- Oracle linux ��� ������ centos
- About
- Migrate CentOS to Oracle Linux — an approach
- Why is that an issue?
- Understand the limitations and known issues of migration:
- Methodology Overview
Как перейти с CentOS на Oracle Linux
CentOS широко используется малым бизнесом и разработчиками в серверных средах. Он обеспечивает стабильность и надежность, которые предлагает RHEL абсолютно бесплатно. Будучи версией обкатки и бета-версией для релизов RHEL, CentOS Stream не будет рекомендован для производственных рабочих нагрузок.
Несколько альтернатив были предложены в качестве достойной замены. Например AlmaLinux появился как жизнеспособный кандидат, похожий 1:1 и бинарно совместимым с RHEL. Мы вскоре покажем, как вы можете перейти с CentOS 8 на AlmaLinux 8.4.
Другой рекомендуемой альтернативой является Oracle Linux, который на 100% совместим с RHEL. Это означает, что приложения и функции остаются неизменными для Oracle Linux.
В этом руководстве мы расскажем вам как перейти с CentOS на Oracle Linux.
ВНИМАНИЕ:
В нашем случае переход с CentOS 8 на Oracle Linux прошел гладко, однако мы не можем с уверенностью гарантировать, что то же самое будет воспроизведено и в вашем случае.
В качестве меры предосторожности мы рекомендуем вам выполнить полную резервную копию всех ваших файлов перед началом миграции. Кроме того, убедитесь, что у вас есть быстрое и стабильное подключение к Интернету для обновления системных пакетов и загрузки последних пакетов Oracle Linux.
Тем не менее, выполните следующие действия, чтобы начать миграцию с CentOS на Oracle Linux.
Вам может понравится:
Подготовка к переходу с CentOS на Oracle Linux
Во-первых, войдите в систему CentOS и обновите ее до последней текущей версии. На данный момент последним релизом CentOS является CentOS 8.4.
Обновление займет довольно много времени и будет по большей части зависеть от вашего подключения к Интернету. Чем быстрее ваше подключение к Интернету, тем быстрее будет обновление.
Затем проверьте, была ли ваша система обновлена до последней версии.Введите команду как показано и посмотрите ответ.
Затем загрузите и запустите сценарий миграции, который доступный на Github. Этот сценарий поможет вам переключиться с экземпляра CentOS на Oracle Linux. Он выполняет несколько операций, включая удаление специфичных пакетов для CentOS. Либо найдет замену для Oracle Linux. На данный момент скрипт поддерживает выпуски CentOS 6, 7, 8 и не поддерживает CentOS Stream.
Переход (Миграция) с CentOS на Oracle Linux
Чтобы загрузить скрипт, выполните команду curl, как показано ниже.
$ curl -O https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
Эта команда загружает сценарий миграции под названием centos2ol.sh.
Затем назначьте разрешения на выполнение с помощью команды chmod.
Чтобы начать миграцию, запустите сценарий, как показано ниже.
Как уже упоминалось ранее, скрипт выполняет ряд операций. Сначала он проверяет наличие всех пакетов, которые необходимы во время обновления, и устанавливает отсутствующие.
Процесс миграции CentOS в Oracle Linux
Затем он переходит к резервному копированию старых файлов репозитория CentOS.
Резервное копирование Старых репозиториев CentOS
Далее скрипт скачивает приложения Oracle Linux и базовые репозитории ОС. И соответственно удаляет эквивалентные CentOS.
Включить Репозитории Oracle Linux
После перехода в репозитории Oracle Linux он синхронизируется с онлайн-репозиториями и обновляет пакеты Oracle Linux. Он также переустановит некоторые пакеты.
Синхронизация с репозиториями Oracle
Весь процесс довольно длительный потребуется минимум 2-3 часа. После завершения переключения вам будет предложено перезагрузить систему CentOS, как показано на рисунке
Как перейти с CentOS на Oracle Linux
Просто запустите команду:
Во время перезагрузки на экране появится журнал Oracle Linux log.
Перезагрузка Oracle Linux
Вскоре после этого появится меню Grub. Запись сервера Oracle Linux будет первой в списке, поэтому нажмите ENTER на клавиатуре, чтобы загрузиться в Oracle Linux.
Загрузочное меню Oracle Linux
Как только вы войдете в систему, еще раз проверьте версию операционной системы. Сделать это можно следующим образом.
Заключение
Вот и все в перешли с CentOS на Oracle Linux. Как видите нет ничего сложного, за вас все сделал скрипт. Мы надеемся, что это руководство стало для вас полезным. И не могу еще раз не предупредить:
Рекомендуем вам выполнить полную резервную копию всех ваших файлов перед началом перехода с CentOS на Oracle Linux.
Источник
Oracle linux ��� ������ centos
Switch from CentOS to Oracle Linux
This script is designed to automatically switch a CentOS instance to Oracle Linux by removing any CentOS-specific packages or replacing them with the Oracle Linux equivalent.
Supported versions and architectures
This script currently supports switching CentOS Linux 6, CentOS Linux 7 and CentOS Linux 8 on both x86_64 and aarch64 architectures. It does not support CentOS Stream.
Support for switching aarch64 hosts should be considered experimental due to limited testing. Please ensure you have a complete working backup before attempting to switch and report any issues you encounter during the process.
Before you start
IMPORTANT: this script is a work-in-progress and is not designed to handle all possible configurations. Please ensure you have a complete working backup of the system before you start this process in the event the script is unable to convert the system successfully or unable to rollback the changes it made.
Remove all non-standard kernels
Because of the GRUB2 BootHole vulnerability, our SecureBoot shim can only boot kernels signed by Oracle and we can only replace the default CentOS kernels. While this may not have an impact if SecureBoot is currently disabled, enabling it at a later date could render the system unbootable. For that reason, we strongly recommend removing all non-standard kernels, i.e. any kernel that is installed that is not provided by either the base or updates repo. This includes the centosplus kernels.
- Ensure your CentOS yum or dnf configuration is working, i.e. there are no stale repositories.
- Disable all non-CentOS repositories. You can re-enable the repos after the switch.
- Ensure you have at least 5GB of free space in /var/cache .
- All automatic updates, e.g. via yum-cron should be disabled.
- Login to your CentOS Linux 6, 7 or 8 instance as a user who has sudo privileges.
- Either clone this repository or download the centos2ol.sh script.
- Run sudo bash centos2ol.sh to switch your CentOS instance to Oracle Linux.
-r Reinstalls all CentOS RPMs with Oracle Linux RPMs
If a system is switched to Oracle Linux and there is no newer Oracle Linux version of a package already installed then the CentOS version remains. This option proceeds to reinstall any CentOS RPM with an identical version from Oracle Linux. This is not necessary for support and has no impact to a systems functionality but is offered so a user can remove CentOS GPG keys from the truststore. A list of all non-Oracle RPMs will be displayed after the reinstall process.
-k Do not install the UEK kernel and disable UEK repos
This option will not install the UEK kernel and will disable all UEK yum repositories.
-V Verify RPM information before and after the switch
This option creates four output files in /var/tmp/ :
- $
-rpms-list-[before|after].log : a sorted list of installed packages before and after the switch to Oracle Linux. - $
-rpms-verified-[before|after].log : the RPM verification results for all installed packages before and after the switch to Oracle Linux.
See TESTING.md for instructions on the available tests and how to run them.
There is a reported issue with the upstream OpenJDK package resetting the alternatives configuration during a dnf reinstall transaction.
We recommend recording the output of alternatives —list prior to running centos2ol.sh and reviewing the same output after switching. If you experience an issue with a package other than OpenJDK, please open an issue
- The script currently needs to be able communicate with the CentOS and Oracle Linux yum repositories either directly or via a proxy.
- The script currently does not support instances that are registered to a third-party management tool like Spacewalk, Foreman or Uyuni.
- Compatibility with packages installed from third-party repositories is expected but not guaranteed. Some software doesn’t like the existence of an /etc/oracle-release file, for example.
- Packages that install third-party and/or closed-source kernel modules, e.g. commercial anti-virus products, may not work after switching.
- The script only enables the base repositories required to enable switching to Oracle Linux. Users may need to enable additional repositories to obtain updates for packages already installed (see issue #1.
Run sudo bash -x centos2ol.sh to switch your CentOS instance to Oracle Linux in debug mode. This will print a trace of commands and their arguments or associated word lists after they are expanded but before they are executed.
We welcome contributions! See our contribution guidelines.
- Open a GitHub issue for non-security related bug reports, questions, or requests for enhancements.
- To report a security issue or vulnerability, please follow the reporting security vulnerabilities instructions.
For more information on Oracle Linux, please visit oracle.com/linux.
Copyright (c) 2020, 2021 Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
About
Script and documentation to switch CentOS Linux to Oracle Linux
Источник
Migrate CentOS to Oracle Linux — an approach
CentOS announced (https://blog.centos.org/2020/12/future-is-centos-stream) they will focus on releasing the CentOS Stream, which will get features ahead of Redhat Enterprise Linux.
Why is that an issue?
Mainly because of CentOS’s stability in the past, Redhat looks to release the CentOS Stream features to users before it actually gets it to main Redhat Enterprise Linux. (read more https://www.zdnet.com/article/red-hat-resets-centos-linux-and-users-are-angry/)
This is a big hit for CentOS users, and when customers are not happy, such decisions will lead to opportunities for them to explore what works best for them like earlier.
This can be something like how the “Whatsapp” app customers are moving to other apps like “Telegram” and “Signal” at a rapid rate. Customer is the centerpiece in every organization.
It’s a tedious decision-making process if you have not experienced other Linux flavors like RHEL (Redhat Enterprise Linux) or Oracle Linux. There are various pros and cons of each of them, and many debates land into a more application-specific decision. (read more https://www.centroid.com/blog/oracle-linux-vs-red-hat-enterprise-linux/)
Oracle Linux is free and pay only if you need Oracle Linux Support. Yes, that’s what you just read. Oracle offers Linux with great features like DTrace, Ksplice in their Linux for free (GNU GPL). (read more if you need enterprise support https://blogs.oracle.com/wim/oracle-linux-and-oracle-vm-pricing-guide)
Customers moving to Oracle Cloud Infrastructure (OCI) (Generation 2 Cloud) from the data center or another cloud provider or Oracle OCI-Classic (OCI-C) can consider converting CentOS to Oracle Linux. Oracle Linux Support is included in the OCI subscription. (https://docs.oracle.com/en-us/iaas/Content/home.htm)
A simple trend comparison of Redhat Linux vs. Oracle Linux — raw statistics from Google Trends.
Understand the limitations and known issues of migration:
Being aware of any solution’s limitations is a key factor in determining if the solution can be scaled for the enterprise.
- If there are subscription-manager like Foreman/Katello, those cannot be moved along with this migration yet.
- CentOS 8.3 with open-JDK installed, we need to follow a workaround to do a backup of “alternatives –list” and then restore the missing links manually with “alternatives –install.”
Methodology Overview
The first step -001, take a backup! create a snapshot (or required backup) of the root storage device (and or other volumes) before starting this exercise
The next step is to run the script developed by Oracle (https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh). This automated conversion process is performed on a running system(with sufficient backup to recover). The utility replaces all RPM packages from the original Linux distribution with the respective Oracle Linux version. At the end of the process, it is necessary to restart the system to boot the Oracle Linux kernel.
OPTIONS
-r Reinstalls all CentOS RPMs with Oracle Linux RPMs
-V Verify RPM information before and after the switch
Below is a quick step-by-step approach for migrating from CentOS to Oracle Linux.
In the below scenario, I would be highlighting the steps to migrate from Oracle Public Cloud (Classic-Gen1) to Oracle Cloud Infrastructure (Gen2) using opcmigrate (read more at https://docs.oracle.com/en/cloud/iaas-classic/compute-iaas-cloud/migrate-oci/migrate-vms-and-block-storage.html)
Option 1— Migrate the CentOS servers to Oracle Linux using centos2ol.sh, then move to Oracle Cloud Infrastructure (Gen2) with opcmigrate
Option 2— Migrate the CentOS servers as CentOS to OCI using opcmigrate (skip this step if you are not migrating) —
Remember in the hosts.yml remember to change the “remote_user” value to “centos”
Ensure the source REPO is updated to vault.centos.org (similar to shown below) archive and update the existing CentOS packages to the latest before the centos2ol.sh is run.
If you need to remove CentOS GPG keys from the trust store, use the option -r when the centos2ol.sh is run.
I did test CentOS 6 , CentOS 7 & CentOS 8 with both Option1 & Option2.
Both worked well, except for a few known issues with CentOS 8. Also, note that the CentOS6 (oldest kernel of the three) migrated as PV(Paravirtualized) to Oracle Cloud Infrastructure to get optimum performance benefits.
Источник