Skip to main content
How to create Yum respository in RHEL 7

This blog shows the various steps needed to create a Yum repository in RHEL 7

1. Mount the ISO CD to your server

2. Navigate to the Packages directory under the ISO CD

[root@dev1 RHEL-7.3 Server.x86_64]# pwd
/run/media/root/RHEL-7.3 Server.x86_64
[root@dev1 RHEL-7.3 Server.x86_64]# ls -ltr
total 894
-r--r--r--.  1 root root  18092 Mar  6  2012 GPL
-r--r--r--.  1 root root   8266 Apr  4  2014 EULA
-r--r--r--.  1 root root   3211 Sep 27  2016 RPM-GPG-KEY-redhat-release
-r--r--r--.  1 root root   3375 Sep 27  2016 RPM-GPG-KEY-redhat-beta
-r--r--r--.  1 root root    114 Oct 19  2016 media.repo
-r--r--r--.  1 root root   1568 Oct 19  2016 TRANS.TBL
dr-xr-xr-x.  2 root root   4096 Oct 19  2016 repodata
dr-xr-xr-x. 24 root root   6144 Oct 19  2016 release-notes
dr-xr-xr-x.  2 root root 858112 Oct 19  2016 Packages
dr-xr-xr-x.  2 root root   2048 Oct 19  2016 LiveOS
dr-xr-xr-x.  2 root root   2048 Oct 19  2016 isolinux
dr-xr-xr-x.  3 root root   2048 Oct 19  2016 images
dr-xr-xr-x.  3 root root   2048 Oct 19  2016 EFI
dr-xr-xr-x.  4 root root   2048 Oct 19  2016 addons
[root@dev1 RHEL-7.3 Server.x86_64]#


3. Create a folder to copy the packages on the server. 

[root@dev1 ~]# pwd
/root
[root@dev1 ~]# mkdir repo

[root@dev1 repo]# pwd
/root/repo


4. Copy Packages from ISO cd to the folder created above (Step 3)

[root@dev1 RHEL-7.3 Server.x86_64]# cp Packages/* /root/repo/

....
....

[After files are copies]

[root@dev1 repo]# pwd
/root/repo
[root@dev1 repo]# ls -ltr *.rpm | wc -l
4751
[root@dev1 repo]#


5. Install createrepo package
[root@dev1 repo]# rpm -ivh createrepo-0.9.9-26.el7.noarch.rpm
warning: createrepo-0.9.9-26.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                          ################################# [100%]
        package createrepo-0.9.9-26.el7.noarch is already installed
[root@dev1 repo]#

[In my case, its already installed]

6.  Create the repository using createrepo command

[root@dev1 repo]# createrepo /root/repo
Spawning worker 0 with 4751 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@dev1 repo]#


7. 

Comments

Popular posts from this blog

Warning Message When Creating A Keystore

  Warning Message When Creating A Keystore When we try to list the contents of the keystore, using the below command, keytool -list -v -keystore adkeystore.dat Enter keystore password: Keystore type: JKS Keystore provider: SUN Your keystore contains 1 entry Alias name: prod_apps002 Creation date: Jan 26, 2012 Entry type: PrivateKeyEntry Certificate chain length: 1 Certificate[1]: Owner: CN=PROD_apps002, OU=apps, O=apps002, C=US Issuer: CN=PROD_apps002, OU=apps, O=apps002, C=US Serial number: 4f208085 Valid from: Thu Jan 26 01:21:57 AST 2012 until: Tue Jan 16 01:21:57 AST 2052 Certificate fingerprints:          MD5:  XX: XX XX XX          SHA1:  XX: XX XX XX          SHA256:  XX: XX XX XX Signature algorithm name: SHA1withDSA Subject Public Key Algorithm: 1024-bit DSA key Version: 3 ******************************************* ******************************************* Warning: The JKS keystore...

CLEARING an ADOP patching session

In some case adop prepare phase fails due to some issues and if you wish to apply any patch in hotpatch mode, it will fail with below errors [STATEMENT] There is already a session which is incomplete. Details are: [STATEMENT]     Session Id: 2 [STATEMENT]     Prepare phase status: R [STATEMENT]     Apply phase status: N [STATEMENT]     Cutover  phase status: N [STATEMENT]     Abort phase status: N [STATEMENT]     Session status: F [ERROR]     Cannot apply hotpatch as another online patching cycle is going on [ERROR]     Unrecoverable error occured. Exiting the current session. [STATEMENT] [START 2019/10/22 16:13:00] Unlocking sessions table [STATEMENT] [END   2019/10/22 16:13:00] Unlocking sessions table [STATEMENT] Log file: /adop_20191022_161221.log [STATEMENT] [START 2019/10/22 16:13:02] Unlocking sessions table [STATEMENT] [E...

XX_XXXXXXX is not a valid responsibility for the current user. Please contact your System Administrator.

  XX_XXXXXXX is not a valid responsibility for the current user. Please contact your System Administrator. Issue : When user logs into EBS, he gets the following Error :  xx_XXXXX  is not a valid responsibility for the current user. Please contact your System Administrator. Solution: 1. Check if the responsibility is end dated.  Extend the end-date if required and try to login again.  2. Check the profile option  Applications Start Page for the user ( User Level). If there is any value defined, remove it and save it. Try to login again and it worked in our case.  Before: After: