Tuesday, 14 October 2014

Red Hat Enterprise Linux 6.5 - Creating a local Yum Repository

More of the same: -


but using RHEL 6.5.

Here's the shortened version: -

mount /dev/cdrom /mnt/

mount: block device /dev/sr0 is write-protected, mounting read-only

cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.5 (Santiago)

rpm -ivh /mnt/Packages/deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

warning: /mnt/Packages/deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
   1:deltarpm               ########################################### [100%]

rpm -ivh /mnt/Packages/python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm 

warning: /mnt/Packages/python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
   1:python-deltarpm        ########################################### [100%]

rpm -ivh /mnt/Packages/createrepo-0.9.9-18.el6.noarch.rpm 

warning: /mnt/Packages/createrepo-0.9.9-18.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                ########################################### [100%]
   1:createrepo             ########################################### [100%]

rpm --import /mnt/RPM-GPG-KEY-redhat-beta
rpm --import /mnt/RPM-GPG-KEY-redhat-release


mkdir /var/repo
mkdir /var/repo/rhel65
cd /mnt
cd /var/repo/rhel65/
cp -R /mnt/Packages/* .


cd /var/repo/
createrepo .

Spawning worker 0 with 3763 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

cd /etc/yum.repos.d/
vi server.repo 


[server]
gpgcheck=1
name=Red Hat Enterprise Linux 6.5
baseurl=file:///var/repo

 yum list

...
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
ConsoleKit.x86_64                      0.4.1-3.el6                       @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5
ConsoleKit-libs.x86_64                 0.4.1-3.el6                       @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5
MAKEDEV.x86_64                         3.24-6.el6                        @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5
Red_Hat_Enterprise_Linux-Release_Notes-6-en-US.noarch
                                       5-2.el6                           @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5
...
yum-presto.noarch                      0.6.2-1.el6                         server                                                 
zenity.x86_64                          2.28.0-1.el6                        server                                                 
zlib.i686                              1.2.3-29.el6                        server                                                 
zlib-devel.i686                        1.2.3-29.el6                        server                                                 
zlib-devel.x86_64                      1.2.3-29.el6                        server                                                 
zsh.x86_64                             4.3.10-7.el6                        server        
...

umount /mnt
yum install xauth

Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6 will be installed
--> Processing Dependency: libXmuu.so.1()(64bit) for package: 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64
--> Running transaction check
---> Package libXmu.x86_64 0:1.1.1-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch          Version                Repository     Size
================================================================================
Installing:
 xorg-x11-xauth        x86_64        1:1.0.2-7.1.el6        server         35 k
Installing for dependencies:
 libXmu                x86_64        1.1.1-2.el6            server         66 k

Transaction Summary
================================================================================
Install       2 Package(s)

Total download size: 101 k
Installed size: 216 k
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total                                            29 MB/s | 101 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : libXmu-1.1.1-2.el6.x86_64                                    1/2 
  Installing : 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64                        2/2 
  Verifying  : libXmu-1.1.1-2.el6.x86_64                                    1/2 
  Verifying  : 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64                        2/2 

Installed:
  xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6                                         

Dependency Installed:
  libXmu.x86_64 0:1.1.1-2.el6                                                   

Complete!

END OF LINE

No comments: