Pages

Centos-7 upgrade to Centos-8 without reboot



1) Upgrade Base OS
#####
##### Centos-7 upgrade to Centos-8
# info @ https://www.tecmint.com/upgrade-centos-7-to-centos-8/#
# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
#
#
yum install epel-release -y
yum install yum-utils
yum install rpmconf
rpmconf -a
# reply with:
# N
# Y
package-cleanup --leaves
package-cleanup --orphans
yum install dnf
dnf -y remove yum yum-metadata-parser
rm -Rf /etc/yum
dnf upgrade
dnf install http://mirror.bytemark.co.uk/centos/8.0.1905/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm
dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.1-1.1911.0.8.el8.x86_64.rpm
dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm
dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf clean all
rpm -e `rpm -q kernel`
rpm -e --nodeps sysvinit-tools
#
## installs 400 MB, and  updates over 1000 packages
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
#
dnf -y install kernel-core
dnf -y groupupdate "Core" "Minimal Install"
#
#
# cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)


2) Upgrade the Linux Kernel on CentOS / RHEL / Oracle Linux 8

# uname -a
Linux NGINX44-de 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
#### Info from:
## https://www.osradar.com/upgrade-the-kernel-on-centos-8-rhel-8-oracle-linux-8/
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
dnf install https://www.elrepo.org/elrepo-release-8.0-2.el8.elrepo.noarch.rpm
dnf repolist
dnf --enablerepo=elrepo-kernel install kernel-ml
# reboot
# uname -a
Linux NGINX44-de 5.5.9-1.el8.elrepo.x86_64 #1 SMP Wed Mar 11 19:04:03 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux



3) Updgrade MariaDB/Zabbix 4.4
# yum list installed | grep mariadb
mariadb.x86_64                        1:5.5.64-1.el7                   @base   
mariadb-libs.x86_64                   1:5.5.64-1.el7                   @base   
mariadb-server.x86_64                 1:5.5.64-1.el7                   @base 
#
#
Error:
 Problem: package zabbix-server-mysql-4.4.6-1.el8.x86_64 requires libmysqlclient.so.21()(64bit), but none of the providers can be installed
  - package zabbix-server-mysql-4.4.6-1.el8.x86_64 requires libmysqlclient.so.21(libmysqlclient_21.0)(64bit), but none of the providers can be installed
  - installed package MariaDB-compat-10.4.12-1.el7.centos.x86_64 obsoletes mysql-libs provided by mysql-libs-8.0.17-3.module_el8.0.0+181+899d6349.x86_64
  - cannot install the best candidate for the job
  - problem with installed package MariaDB-compat-10.4.12-1.el7.centos.x86_64

yum remove perl-DBD-MySQL
yum --allowerasing install perl
yum module enable perl:5.24
# yum module enable perl:5.26
dnf module reset perl:5.24   
yum remove MariaDB-compat-10.4.12-1.el7.centos.x86_64

dnf module reset perl-DBD-MySQL:4.046

yum --allowerasing distrosync
dnf module install mariadb


# yum list installed | grep zabbix
Modular dependency problems:

 Problem 1: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBD-MySQL:4.046:8010020191114030811:073fa5fe-0.x86_64
 Problem 2: conflicting requests
  - nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
zabbix-agent.x86_64                  4.4.6-1.el7                            @System     
zabbix-release.noarch                4.4-1.el7                              @System     
zabbix-web.noarch                    4.4.6-1.el7                            @zabbix     
zabbix-web-pgsql.noarch              4.4.6-1.el7                            @zabbix     




rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/8/x86_64/zabbix-release-4.4-1.el8.noarch.rpm
dnf clean all
dnf -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent
#
#
systemctl restart zabbix-server zabbix-agent
systemctl enable zabbix-server zabbix-agent
#
#
firewall-cmd --add-service={http,https} --permanent
firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
firewall-cmd --reload
#
systemctl restart httpd php-fpm
systemctl enable httpd php-fpm