Red Hat Enterprise Linux (RHEL) 8 upgrade offline - hgavraham/hgavraham GitHub Wiki
- Red Hat Enterprise Linux 7.x
- leapp
I'd like to upgrade from RHEL 7 to RHEL 8 but:
- I have no direct connection to Internet (cdn.redhat.com)
- my proxy fails to download the RHEL 8 packages
You can setup a local http server in your infrastructure hosting the RHEL 8 repositories required for the upgrade. Please note that http server must run on another machine. Please also note using locally mounted ISO won't work, as leapp spawns a container which won't have access to this filesystem.
Note: if you are using an HTTPS server with a self-signed certificate, please also check the following KCS: How to run an IPU with Leapp and a custom HTTPS repo?
Install and enable the Apache httpd service.
yum install httpd
systemctl enable --now httpd
If you uses a local firewall, ensure the port tcp/80 is open. For example with iptables:
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
Create a subdirectory in the http document root
mkdir /var/www/html/rhel84
Mount the RHEL 8.4 ISO in that directory
mount rhel-8.4-x86_64-dvd.iso /var/www/html/rhel84
Ensure you can curl the metadata:
curl http://localhost/rhel84/BaseOS/repodata/repomd.xml
Define the custom repositories. Replace "IPADDR" by the IP/hostname of your remote http server.
cat << EOF >/etc/leapp/files/leapp_upgrade_repositories.repo
[BaseOS]
name=rhel-8-for-x86_64-baseos-rpms
baseurl=http://IPADDR/rhel84/BaseOS
[AppStream]
name=rhel-8-for-x86_64-appstream-rpms
baseurl=http://IPADDR/rhel84/AppStream
EOF
Try a preupgrade at first
leapp preupgrade --no-rhsm --enablerepo BaseOS --enablerepo AppStream
Read the leapp report and possibly fix any issue encountered.
leapp upgrade --no-rhsm --enablerepo BaseOS --enablerepo AppStream
yum update (--skip-broken --nobest)
yum upgrade (--skip-broken --nobest)
reboot
cat /etc/*release
uname -a
uname -r