Last active
May 9, 2025 03:50
-
-
Save utarn/3f38e9c5c39935671ce6d7f4553441c2 to your computer and use it in GitHub Desktop.
Add OEL 8 Local Repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ]; then | |
echo "Accepted parameter are either local or oracle" | |
elif [ $1 == "local" ]; then | |
cat << EOF > /etc/yum.repos.d/local-oracle-ol8.repo | |
[local_ol8_baseos_latest] | |
name=Oracle Linux 8 BaseOS Latest (\$basearch) | |
baseurl=http://oelrepo.zarimpun.com/OracleLinux/OL8/baseos/latest/\$basearch/ | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpgcheck=1 | |
enabled=1 | |
[local_ol8_appstream] | |
name=Oracle Linux 8 Application Stream (\$basearch) | |
baseurl=http://oelrepo.zarimpun.com/OracleLinux/OL8/appstream/\$basearch/ | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpgcheck=1 | |
enabled=1 | |
[local_ol8_codeready_builder] | |
name=Oracle Linux 8 CodeReady Builder (\$basearch) - Unsupported | |
baseurl=http://oelrepo.zarimpun.com/OracleLinux/OL8/codeready/builder/\$basearch/ | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpgcheck=1 | |
enabled=1 | |
[local_ol8_developer_EPEL] | |
name=Oracle Linux \$releasever EPEL Packages for Development (\$basearch) | |
baseurl=http://oelrepo.zarimpun.com/OracleLinux/OL8/developer/EPEL/\$basearch/ | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpgcheck=1 | |
enabled=1 | |
[local_ol8_UEKR6] | |
name=Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux \$releasever (\$basearch) | |
baseurl=http://oelrepo.zarimpun.com/OracleLinux/OL8/UEKR6/\$basearch/ | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpgcheck=1 | |
enabled=1 | |
[local_ol8_UEKR6_RDMA] | |
name=Oracle Linux 8 UEK6 RDMA (\$basearch) | |
baseurl=http://oelrepo.zarimpun.com/OracleLinux/OL8/UEKR6/RDMA/\$basearch/ | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpgcheck=1 | |
enabled=0 | |
EOF | |
yum-config-manager --disable ol8_baseos_latest | |
yum-config-manager --disable ol8_codeready_builder | |
yum-config-manager --disable ol8_developer_EPEL | |
yum-config-manager --disable ol8_appstream | |
yum-config-manager --disable ol8_UEKR6 | |
yum-config-manager --enable local_ol8_baseos_latest | |
yum-config-manager --enable local_ol8_codeready_builder | |
yum-config-manager --enable local_ol8_developer_EPEL | |
yum-config-manager --enable local_ol8_appstream | |
yum-config-manager --enable local_ol8_UEKR6 | |
elif [ $1 == "oracle" ]; then | |
yum-config-manager --enable ol8_baseos_latest | |
yum-config-manager --enable ol8_codeready_builder | |
yum-config-manager --enable ol8_developer_EPEL | |
yum-config-manager --enable ol8_appstream | |
yum-config-manager --enable ol8_UEKR6 | |
yum-config-manager --disable local_ol8_baseos_latest | |
yum-config-manager --disable local_ol8_codeready_builder | |
yum-config-manager --disable local_ol8_developer_EPEL | |
yum-config-manager --disable local_ol8_appstream | |
yum-config-manager --disable local_ol8_UEKR6 | |
else | |
echo "Accepted parameter are either local or oracle" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks