Google it ....

Thursday, July 27, 2017

Textual description of firstImageUrl

Create RPM packages local repository for Oracle Enterprise Linux 7.0 on Virtual Machine

In this blog post I''ll show you how to create local RPM packages repository for Oracle Enterprise Linux 7.0. Let's start.
First of all we need connected Linux 7.0 ISO, go to the machine setting and check connected checkbox, under ISO image file choose Linux 7.0 installation file as shown below



















with root user
mkdir -p /mnt/cdrom
mount -t iso9660 -o ro /dev/sr0 /mnt/cdrom

mkdir -p /repo
cd /mnt/cdrom/Packages
cp * /repo/

cd /repo
rpm -Uvh deltarpm-3.6-3.el7.x86_64.rpm
rpm -Uvh python-deltarpm-3.6-3.el7.x86_64.rpm
rpm -Uvh createrepo-0.9.9-23.el7.noarch.rpm

createrepo .
Spawning worker 0 with 4292 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

mv /etc/yum.repos.d/public-yum-ol7.repo /etc/yum.repos.d/public-yum-ol7.repo.bkp
create rhel_repo.repo file under /etc/yum.repos.d/ and write next parameters
vi /etc/yum.repos.d/rhel_repo.repo

[rhel_repo]
name=repo
baseurl="file:///repo/"
gpgcheck=0
enabled=1
now you can check local repository
yum repolist
Loaded plugins: langpacks
rhel_repo                                                                                                                                                                     | 2.9 kB  00:00:00
rhel_repo/primary_db                                                                                                                                                          | 3.8 MB  00:00:00
repo id                                                                                           repo name                                                                                    status
rhel_repo                                                                                         repo                                                                                         4,292
repolist: 4,292

that's all now you have local RPM packages repository for Oracle Enterprise Linux 7.0

No comments:

Post a Comment