Tuesday 22 October 2013

wget: command not found and repolist : 0

I'm setting up a new environment to demo and workshop Weblogic and Fusion Middleware to other members in my team. After installing Oracle Linux 5.4 x86 and trying to minimize the number of packages while still using the GNOME desktop I came across a bit of a catch 22 situation.

When trying to configure the yum repository for Oracle running

$ wget http://public-yum.oracle.com/public-yum-el5.repo
wget: command not found

Now when I try to install the wget command via yum there is nothing to update and rpm shows it's not installed.

Check if there is a yum repository.

$ yum repolist
repolist: 0

I couldn't find wget in the install media after a quick look through the 5 cd iso's so was stuck and needed a repository so created my own.

Since the public-yum-el5.repo is just a series of links which are enabled or not I grabbed one

$ cat public-yum-el5_temp.repo

[ol5_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol5
gpgcheck=0
enabled=1

Its important to have gpgcheck=0 or the package will fail a public key check.

Now  I can use yum to install wget and get the latest repository.