Friday, October 23, 2015

Create Your Own YUM repository OEL6

The below steps helps you to create your own YUM repository in OEL6.



1) Create a directory for you local repository, e.g. 

     # mkdir -R /home/vijaypkg

2) Copy the packages from CD to this directory "/home/vijaypkg" 



















3) Give proper ownership and filesystem permissions:

     # chown -R root.root /home/vijaypkg

4)  Install the createrepo package if not installed yet, and run

     # createrepo /home/vijaypkg

** if you get error while creating the repo .i.e. command not found . in that case you need to install the createrepo pkg






























Once above issue is fixed now we are ready to build repository

   # createrepo /home/vijaypkg


   # chmod -R o-w+r /home/user/repo

5) Create a repository configuration file, e.g. 

    # vi /etc/yum.repos.d/myrepo.repo 


[vijay]
name=vjrep
baseurl=file:///home/vijaypkg
enabled=1
gpgcheck=0






























6) ready for installing pkg

   # yum install packagename

All in one screenshot




























LOG

[root@dbsrv1 vijaypkg]# pwd
/home/vijaypkg
[root@dbsrv1 vijaypkg]# chown -R root.root /home/vijaypkg/
[root@dbsrv1 vijaypkg]# createrepo /home/vijaypkg/
bash: createrepo: command not found
[root@dbsrv1 vijaypkg]# createrepo /home/vijaypkg/
Spawning worker 0 with 3891 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@dbsrv1 vijaypkg]# chmod -R o-w+r /home/vijaypkg/
[root@dbsrv1 vijaypkg]# vi /etc/yum.repos.d/vjrepo.repo
[root@dbsrv1 vijaypkg]# cat /etc/yum.repos.d/vjrepo.repo
[vijay]
name=vjrepo
baseurl=file:///home/vijaypkg
enabled=1
gpgcheck=0
[root@dbsrv1 vijaypkg]# yum install compat*
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Examining compat-dapl-1.2.19-2.el6.i686.rpm: 1:compat-dapl-1.2.19-2.el6.i686
Marking compat-dapl-1.2.19-2.el6.i686.rpm to be installed
Repository vijay is listed more than once in the configuration
file:///media/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: vijay. Please verify its path and try again
[root@dbsrv1 vijaypkg]# cd /etc/yum.repos.d/
[root@dbsrv1 yum.repos.d]# ls
packagekit-media.repo  public-yum-ol6.repo  vj.repo  vjrepo.repo
[root@dbsrv1 yum.repos.d]# ls -ltr
total 20
-rw-r--r--. 1 root root 4949 Oct  9 20:44 public-yum-ol6.repo
-rw-r--r--. 1 root root  109 Oct  9 23:00 packagekit-media.repo
-rw-r--r--. 1 root root   70 Oct  9 23:09 vjrepo.repo
[root@dbsrv1 yum.repos.d]# yum install compat*
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
local                                                                                                 | 2.9 kB     00:00 ... 
local/primary_db                                                                                      | 3.9 MB     00:00 ... 
Package compat-gcc-34-c++-3.4.6-19.el6.x86_64 already installed and latest version
Package compat-gcc-34-3.4.6-19.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package compat-dapl.x86_64 1:1.2.19-2.el6 will be installed
--> Processing Dependency: librdmacm.so.1(RDMACM_1.0)(64bit) for package: 1:compat-dapl-1.2.19-2.el6.x86_64
--> Processing Dependency: libibverbs.so.1(IBVERBS_1.1)(64bit) for package: 1:compat-dapl-1.2.19-2.el6.x86_64
--> Processing Dependency: libibverbs.so.1(IBVERBS_1.0)(64bit) for package: 1:compat-dapl-1.2.19-2.el6.x86_64
--> Processing Dependency: librdmacm.so.1()(64bit) for package: 1:compat-dapl-1.2.19-2.el6.x86_64
--> Processing Dependency: libibverbs.so.1()(64bit) for package: 1:compat-dapl-1.2.19-2.el6.x86_64
---> Package compat-dapl-devel.x86_64 1:1.2.19-2.el6 will be installed
---> Package compat-dapl-static.x86_64 1:1.2.19-2.el6 will be installed
---> Package compat-dapl-utils.x86_64 1:1.2.19-2.el6 will be installed
---> Package compat-db.x86_64 0:4.6.21-15.el6 will be installed
---> Package compat-db42.x86_64 0:4.2.52-15.el6 will be installed
---> Package compat-db43.x86_64 0:4.3.29-15.el6 will be installed
---> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed
---> Package compat-gcc-34-g77.x86_64 0:3.4.6-19.el6 will be installed
---> Package compat-glibc.x86_64 1:2.5-46.2.0.1 will be installed
---> Package compat-glibc-headers.x86_64 1:2.5-46.2.0.1 will be installed
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libf2c-34.x86_64 0:3.4.6-19.el6 will be installed
---> Package compat-libgfortran-41.x86_64 0:4.1.2-39.el6 will be installed
---> Package compat-libstdc++-296.i686 0:2.96-144.el6 will be installed
--> Processing Dependency: libm.so.6(GLIBC_2.0) for package: compat-libstdc++-296-2.96-144.el6.i686
--> Processing Dependency: libm.so.6 for package: compat-libstdc++-296-2.96-144.el6.i686
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: compat-libstdc++-296-2.96-144.el6.i686
--> Processing Dependency: libgcc_s.so.1 for package: compat-libstdc++-296-2.96-144.el6.i686
--> Processing Dependency: libc.so.6(GLIBC_2.12) for package: compat-libstdc++-296-2.96-144.el6.i686
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package compat-libtermcap.x86_64 0:2.0.8-49.el6 will be installed
---> Package compat-openldap.x86_64 1:2.3.43-2.el6 will be installed
---> Package compat-openmpi.x86_64 0:1.4.3-1.2.el6 will be installed
--> Processing Dependency: environment-modules for package: compat-openmpi-1.4.3-1.2.el6.x86_64
--> Processing Dependency: libplpa.so.0()(64bit) for package: compat-openmpi-1.4.3-1.2.el6.x86_64
--> Processing Dependency: libgfortran.so.3()(64bit) for package: compat-openmpi-1.4.3-1.2.el6.x86_64
--> Processing Dependency: libesmtp.so.5()(64bit) for package: compat-openmpi-1.4.3-1.2.el6.x86_64
---> Package compat-openmpi-devel.x86_64 0:1.4.3-1.2.el6 will be installed
--> Processing Dependency: gcc-gfortran for package: compat-openmpi-devel-1.4.3-1.2.el6.x86_64
---> Package compat-openmpi-psm.x86_64 0:1.4.3-1.2.el6 will be installed
--> Processing Dependency: libpsm_infinipath.so.1()(64bit) for package: compat-openmpi-psm-1.4.3-1.2.el6.x86_64
---> Package compat-openmpi-psm-devel.x86_64 0:1.4.3-1.2.el6 will be installed
---> Package compat-opensm-libs.x86_64 0:3.3.5-3.el6 will be installed
---> Package compat-readline5.x86_64 0:5.2-17.1.el6 will be installed
---> Package compat-readline5-devel.x86_64 0:5.2-17.1.el6 will be installed
--> Processing Dependency: ncurses-devel for package: compat-readline5-devel-5.2-17.1.el6.x86_64
---> Package compat-readline5-static.x86_64 0:5.2-17.1.el6 will be installed
---> Package compat-xcb-util.x86_64 0:0.3.6-6.el6 will be installed
--> Running transaction check
---> Package environment-modules.x86_64 0:3.2.10-2.el6 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: environment-modules-3.2.10-2.el6.x86_64
---> Package gcc-gfortran.x86_64 0:4.4.7-16.el6 will be installed
---> Package glibc.x86_64 0:2.12-1.166.el6 will be updated
--> Processing Dependency: glibc = 2.12-1.166.el6 for package: glibc-common-2.12-1.166.el6.x86_64
--> Processing Dependency: glibc = 2.12-1.166.el6 for package: glibc-devel-2.12-1.166.el6.x86_64
--> Processing Dependency: glibc = 2.12-1.166.el6 for package: glibc-headers-2.12-1.166.el6.x86_64
---> Package glibc.i686 0:2.12-1.166.el6_7.3 will be installed
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.166.el6_7.3.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.166.el6_7.3.i686
---> Package glibc.x86_64 0:2.12-1.166.el6_7.3 will be an update
---> Package infinipath-psm.x86_64 0:3.3-0.4.git6f42cdb_open.el6 will be installed
---> Package libesmtp.x86_64 0:1.0.4-15.el6 will be installed
---> Package libgcc.i686 0:4.4.7-16.el6 will be installed
---> Package libgfortran.x86_64 0:4.4.7-16.el6 will be installed
---> Package libibverbs.x86_64 0:1.1.8-4.el6 will be installed
---> Package librdmacm.x86_64 0:1.0.19.1-1.el6 will be installed
---> Package ncurses-devel.x86_64 0:5.7-4.20090207.el6 will be installed
---> Package plpa-libs.x86_64 0:1.3.2-2.1.el6 will be installed
--> Running transaction check
---> Package glibc-common.x86_64 0:2.12-1.166.el6 will be updated
---> Package glibc-common.x86_64 0:2.12-1.166.el6_7.3 will be an update
---> Package glibc-devel.x86_64 0:2.12-1.166.el6 will be updated
---> Package glibc-devel.x86_64 0:2.12-1.166.el6_7.3 will be an update
---> Package glibc-headers.x86_64 0:2.12-1.166.el6 will be updated
---> Package glibc-headers.x86_64 0:2.12-1.166.el6_7.3 will be an update
---> Package nss-softokn-freebl.x86_64 0:3.14.3-22.el6_6 will be updated
---> Package nss-softokn-freebl.i686 0:3.14.3-23.el6_7 will be installed
---> Package nss-softokn-freebl.x86_64 0:3.14.3-23.el6_7 will be an update
---> Package tcl.x86_64 1:8.5.7-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
 Package                            Arch             Version                               Repository                   Size
=============================================================================================================================
Installing:
 compat-dapl                        x86_64           1:1.2.19-2.el6                        local                        98 k
 compat-dapl-devel                  x86_64           1:1.2.19-2.el6                        public_ol6_latest            27 k
 compat-dapl-static                 x86_64           1:1.2.19-2.el6                        public_ol6_latest            83 k
 compat-dapl-utils                  x86_64           1:1.2.19-2.el6                        public_ol6_latest            76 k
 compat-db                          x86_64           4.6.21-15.el6                         local                        12 k
 compat-db42                        x86_64           4.2.52-15.el6                         local                       805 k
 compat-db43                        x86_64           4.3.29-15.el6                         local                       874 k
 compat-expat1                      x86_64           1.95.8-8.el6                          local                        59 k
 compat-gcc-34-g77                  x86_64           3.4.6-19.el6                          local                       2.1 M
 compat-glibc                       x86_64           1:2.5-46.2.0.1                        local                       1.2 M
 compat-glibc-headers               x86_64           1:2.5-46.2.0.1                        local                       447 k
 compat-libcap1                     x86_64           1.10-1                                local                        17 k
 compat-libf2c-34                   x86_64           3.4.6-19.el6                          local                        51 k
 compat-libgfortran-41              x86_64           4.1.2-39.el6                          local                       125 k
 compat-libstdc++-296               i686             2.96-144.el6                          local                        76 k
 compat-libstdc++-33                x86_64           3.2.3-69.el6                          local                       183 k
 compat-libtermcap                  x86_64           2.0.8-49.el6                          local                        15 k
 compat-openldap                    x86_64           1:2.3.43-2.el6                        local                       159 k
 compat-openmpi                     x86_64           1.4.3-1.2.el6                         local                       2.6 M
 compat-openmpi-devel               x86_64           1.4.3-1.2.el6                         public_ol6_latest           2.5 M
 compat-openmpi-psm                 x86_64           1.4.3-1.2.el6                         local                       2.6 M
 compat-openmpi-psm-devel           x86_64           1.4.3-1.2.el6                         public_ol6_latest           2.5 M
 compat-opensm-libs                 x86_64           3.3.5-3.el6                           local                        32 k
 compat-readline5                   x86_64           5.2-17.1.el6                          local                       129 k
 compat-readline5-devel             x86_64           5.2-17.1.el6                          public_ol6_latest            26 k
 compat-readline5-static            x86_64           5.2-17.1.el6                          public_ol6_latest           109 k
 compat-xcb-util                    x86_64           0.3.6-6.el6                           local                        10 k
Installing for dependencies:
 environment-modules                x86_64           3.2.10-2.el6                          local                       102 k
 gcc-gfortran                       x86_64           4.4.7-16.el6                          local                       4.7 M
 glibc                              i686             2.12-1.166.el6_7.3                    public_ol6_latest           4.3 M
 infinipath-psm                     x86_64           3.3-0.4.git6f42cdb_open.el6           local                       166 k
 libesmtp                           x86_64           1.0.4-15.el6                          local                        57 k
 libgcc                             i686             4.4.7-16.el6                          local                       114 k
 libgfortran                        x86_64           4.4.7-16.el6                          local                       267 k
 libibverbs                         x86_64           1.1.8-4.el6                           local                        52 k
 librdmacm                          x86_64           1.0.19.1-1.el6                        local                        58 k
 ncurses-devel                      x86_64           5.7-4.20090207.el6                    local                       641 k
 nss-softokn-freebl                 i686             3.14.3-23.el6_7                       public_ol6_latest           156 k
 plpa-libs                          x86_64           1.3.2-2.1.el6                         local                        24 k
 tcl                                x86_64           1:8.5.7-6.el6                         local                       1.9 M
Updating for dependencies:
 glibc                              x86_64           2.12-1.166.el6_7.3                    public_ol6_latest           3.8 M
 glibc-common                       x86_64           2.12-1.166.el6_7.3                    public_ol6_latest            14 M
 glibc-devel                        x86_64           2.12-1.166.el6_7.3                    public_ol6_latest           985 k
 glibc-headers                      x86_64           2.12-1.166.el6_7.3                    public_ol6_latest           614 k
 nss-softokn-freebl                 x86_64           3.14.3-23.el6_7                       public_ol6_latest           167 k

Transaction Summary
=============================================================================================================================
Install      40 Package(s)
Upgrade       5 Package(s)

Total download size: 49 M
Is this ok [y/N]: 

2 comments:

  1. This blog helped me when i was installing 12c db. i installed the missing RPM's from the packages location. :)

    ReplyDelete