This post will assist you in configuring an OEL system to connect to the Oracle Public YUM repositories. Your OEL System must have a working connection to the internet for YUM to work correctly. If your system is isolated from the internet due to security policies, you will need to set up a local repository and populate it manually.
To configure your OEL system to use the Oracle Public YUM Repository, accomplish the following actions as root.
1. Checking YUM Configuration
1. Change to the /etc directory.
# cd /etc
2. Ensure the contents of the yum.conf file look like the following. Make any changes necessary before proceeding to step 3.
[main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log distroverpkg=redhat-release tolerant=1 exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 # Note: yum-RHN-plugin doesn't honor this. metadata_expire=1h # Default. # installonly_limit = 3 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d # Never update kernel and kernel-uek installonlypkgs=kernel kernel-smp kernel-bigmem kernel-enterprise kernel-debug kernel-unsupported kernel-uek exclude=up2date
NOTE: If your system needs to use a proxy to access the internet, add the following line to the yum.conf file:
proxy=http://[url.to.proxy]:[port]
For example:
proxy=http://www.myproxy.com:80
You can also use an IP address in place of the URL.
3. Change to the /etc/yum.repos.d directory.
# cd /etc/yum.repos.d
4. List the contents of the yum.repos.d directory. Repository configuration files have a file extension of .repo. If the only files in the directory are Exadata-computenode.repo.sample and/or ULN-Base.repo, go on to the “2. Creating a Repo File” section. If there are more files than just Exadata-computenode.repo.sample and/or ULN-Base.repo, go on to the “3. Adding a Repository Configuration” section.
2. Creating a Repo File
1. In /etc/yum.repos.d, edit a new file called oracle-public-yum-ol6.repo.
2. In the new file, add the following lines:
# vi /etc/yum.repos.d/oracle-public-yum-ol6.repo [public_ol6_latest] name=Oracle Linux $releasever Latest ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1
3. Save the file.
4. Go to the “4. Test the Repository” section.
3. Adding a Repository Configuration
1. Review each of the repo files in the /etc/yum.repos.d. Look for section that looks similar to this:
[public_ol6_latest] name=Oracle Linux $releasever Latest ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1
If you do not see this in any of the repo files, accomplish the steps in the “2. Creating a Repo File” section. If you do see this in one of the repo files, go to next step below.
2. Ensure the enabled line is set to 1 (active):
enabled=1
If not set to 1, make the change and save the file. If set to 1, you are already configured to access the Oracle Public YUM Repository.
3. Go to the “4. Test the Repository” section.
4. Test the Repository
Issue the following command:
# yum repolist
You should see the list of repositories that you added using this post. For any errors, first go back and retrace your steps to ensure all of the above steps were correctly accomplished. If the configuration is confirmed good, check the list of common errors below for a possible solution.