Technofunction

Creating Public/LocalYum Repository in Oracle Enterprise Linux

Recently i thought of giving a try to Oracle Enterprise Linux since it is supported by Oracle corporation for its Oracle Database and other products distributed by Oracle.

Well we all know Oracle Enterprise Linux is a rebuild just Like Cent-OS so it is more or less same as Red Hat Linux. But the thing was when i tried using yum it was not working as usual. So i gone for creating a local yum repository but they have actually remove the configuration file under /etc/yum.repos.d . So what to do next i gone to there website they ask me to register the product but since i am not using it for commercial purpose i don”t find it purposeful to buy a 1 year license. So how to use the Yum in Oracle Enterprise Linux.

You may create a local yum repository or a public repository. We recommend using public repository in case you not using it for commercial purpose.

  1. Local Yum Repository

You need to create a repo file under the /etc/yum.repos.d since it is a rebuild so it should work. You can create a yum file by following the steps as shown below:

  • You need to navigate to the /etc/yum.repos.d directory

# cd /etc/yum.repos.d

  • Next you need to create a .repo file i have created the default server.repo file here

# vi server.repo

  • Just copy the following contents to this file

[server]
name= Oracle Enterprise Linux yum
baseurl=file:///yum
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Next save it and exit from it (wq!).

OR

2. Creating Public Yum Repository

you may create a public yum repository. The advantage is you can use the most up to date packages available.

  • Navigate to the /etc/yum.repos.d directory

# cd /etc/yum.repos.d

  • Next you need to download the public repository file

# wget http://public-yum.oracle.com/public-yum-el5.repo

  • Now you need to Enable the appropriate repository by simple editing your yum configuration file

# vi public-yum-el5.repo

Locate the section in the file for the repository you plan to update from, e.g. [el5_u5_base]

and change the enabled=0 to enabled=1

it would look like

[el5_u5_base]
name=Enterprise Linux $releasever U5 – $basearch – base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

next save it and exit from it.

  • just check if the yum is working alright

# yum clean all

# yum list

# yum install firefox*

If you have some question or facing problem you can leave it in the comment and i can follow up with you.

One Response to “Creating Public/LocalYum Repository in Oracle Enterprise Linux”

  1. [...] off and iptables are off. Start with installing the FTP package “vsftpd” using YUM. For creating a Yum in Enterprise Linux you may want to go through this post. You need to have root access in to configure an FTP [...]

Leave a Reply