Create a Yum repository on Exalogic 2.0.6.2.x
This
document describes how to create a yum repository on ZFS Storage
inside an Exalogic machine.
Prepare your environment
Create a zfs share
Connect
to one of the storage server to create a share.
This
share hosts the Exalogic yum repository.
- Connect to storage server
Add Share to project
- Create a share named ‘yum-repo’ on common project
Add permissions on share
- Add Nfs Exception to access the share from IPoIB-vserver-shared-storage network.
- Add read/Write and root access.
Prepare repository
Mount ‘yum-repo’ share on a vServer
-
Edit /etc/fstab and add a entry :
172.17.0.5:/export/common/yum-repo
/export/common/yum-repo nfsv4
rw,bg,hard,nointr,rsize=131072,wsize=131072 0 0
With
172.17.0.5 is the IPoIB address of the
storage server on IPoIB-vserver-shared-storage
- Create directory /export/common/yum-repo
#
mkdir –p /export/common/yum-repo
- Mount directory on vServer :
#
mount /export/common/yum-repo
Prepare files
- Download Oracle enterprise Linux iso file on https://edelivery.oracle.com
- upload Oracle Enterprise Linux iso file in the share :
With
your favorite scp client, copy Oracle Enterprise Linux iso file to
/export/common/yum-repo.
- Create temporary directory and repository version directory :
#
mkdir –p /export/common/yum-repo/tmp
/export/common/yum-repo/OEL_6.5
- mount iso file on the temporary directory :
#
mount -o loop /export/common/yum-repo/OEL_6.5.iso
/export/common/yum-repo/tmp
- Copy iso content in repository directory :
#
cp -r /export/common/yum-repo/tmp/* /export/common/yum-repo/OEL_6.5
Create your repository
- To create repository, you must install createrepo package.
This
package can be found on temporary directory previously created
Control
if already installed :
#
rpm –qa |grep createrepo
createrepo-0.4.11-3.el5
createrepo-0.4.11-3.el5
- Install package :
#
rpm –Uvh
/export/common/yum-repo/tmp/createrepo-0.4.11-3.el5.x86_64.rpm
/export/common/yum-repo/tmp/deltarpm-*
/export/common/yum-repo/tmp/python-deltarpm-*
- At this step, remove any link to Packages directory in subdirectories to avoid loop in repository :
#
find . -name Packages -type l -exec rm -f {} \;
- Create repository :
#
cd /export/common/yum-repo/OEL_6.5/
# createrepo .
3380/3380 - Cluster/ipvsadm-1.24-13.el5.x86_64.rpm pmpmx86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
# createrepo .
3380/3380 - Cluster/ipvsadm-1.24-13.el5.x86_64.rpm pmpmx86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Cleanup environment
- Unmount iso file :
#
cd /export/common/yum-repo/
# umount –f /export/common/yum-repo/tmp/
# umount –f /export/common/yum-repo/tmp/
- Delete iso file :
#
rm -f /export/common/yum-repo/OEL_5.8.iso
Configure yum client
Update configuration files
- Update /etc/yum.conf file :
Add
exclusion to Exalogic specific package which cannot be updated:
exclude=kernel*
compat-dapl* dapl* ib-bonding* ibacm* ibutils* ibsim*
infiniband-diags* kmod-ovmapi-uek* libibcm* libibmad* libibumad*
libibverbs* libmlx4* libovmapi* librdmacm* libsdp* mpi-selector*
mpitests_openmpi_gcc* mstflint* ofed* openmpi_gcc* opensm*
ovm-template-config* ovmd* perftest* qperf* rds-tools* sdpnetstat*
srptools* xenstoreprovider* initscripts* nfs-utils*
- Create /etc/yum.repos.d/local_yum.repo file with the following content:
[local_yum]
name=Exalogic Yum Rack
baseurl=http://172.17.0.5/shares/export/common/yum-repo/OEL_6.5.iso
gpgcheck=0
enabled=1
name=Exalogic Yum Rack
baseurl=http://172.17.0.5/shares/export/common/yum-repo/OEL_6.5.iso
gpgcheck=0
enabled=1
Refresh yum database
Refresh
yum client on each machine now configured with the local repository.
- First, clean yum cache :
#
yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
Loaded plugins: rhnplugin, security
Cleaning up Everything
- Recreate yum cache and headers :
#
yum
repolist
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
local_yum | 951 B 00:00
local_yum/primary | 1.4 MB 00:00
local_yum 3380/3380
Excluding Packages from Exalogic TVP yum rack
Finished
repo id repo name status
local_yum Exalogic TVP yum rack 3,288+92
repolist: 3,288
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
local_yum | 951 B 00:00
local_yum/primary | 1.4 MB 00:00
local_yum 3380/3380
Excluding Packages from Exalogic TVP yum rack
Finished
repo id repo name status
local_yum Exalogic TVP yum rack 3,288+92
repolist: 3,288
Now,
you can install packages with yum install command.