• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

oracle/centos2ol: Script and documentation to switch CentOS Linux to Oracle Linu ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

oracle/centos2ol

开源软件地址(OpenSource Url):

https://github.com/oracle/centos2ol

开源编程语言(OpenSource Language):

Shell 84.6%

开源软件介绍(OpenSource Introduction):

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, CentOS Linux 8, and Rocky Linux on both x86_64 and aarch64 architectures. It does not support CentOS Stream.

Support for switching Rocky Linux should be considered experimental due to limited testing. Likewise, switching any of the operating systems mentioned above on aarch64 hosts should be considered experimental.

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.

NOTE: CentOS 8 has reached end-of-life and its repos have moved to vault.centos.org. Please ensure that your CentOS 8 system is up-to-date and able to access those repos before you start.

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.

  1. Ensure your CentOS yum or dnf configuration is working, i.e. there are no stale repositories.
  2. Disable all non-CentOS repositories. You can re-enable the repos after the switch.
  3. Ensure you have at least 5GB of free space in /var/cache.
  4. All automatic updates, e.g. via yum-cron should be disabled.

Usage

  1. Login to your CentOS Linux 6, 7 or 8 instance as a user who has sudo privileges.
  2. Either clone this repository or download the centos2ol.sh script.
  3. Run sudo bash centos2ol.sh to switch your CentOS instance to Oracle Linux.

Usage options

  • -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/:

    • ${hostname}-rpms-list-[before|after].log: a sorted list of installed packages before and after the switch to Oracle Linux.
    • ${hostname}-rpms-verified-[before|after].log: the RPM verification results for all installed packages before and after the switch to Oracle Linux.

Testing

See TESTING.md for instructions on the available tests and how to run them.

Known issues

  1. 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

Limitations

  1. The script currently needs to be able communicate with the CentOS and Oracle Linux yum repositories either directly or via a proxy.
  2. The script currently does not support instances that are registered to a third-party management tool like Spacewalk, Foreman or Uyuni.
  3. 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.
  4. Packages that install third-party and/or closed-source kernel modules, e.g. commercial anti-virus products, may not work after switching.
  5. 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.

Debugging

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.

Get involved

We welcome contributions! See our contribution guidelines.

Support

Resources

For more information on Oracle Linux, please visit oracle.com/linux.

License

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/




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap