Posted in Cloud Computing

bash: createrepo: command not found


[root@localhost x86_64]# createrepo ./
bash: createrepo: command not found

createrepo command is not on your system.Download the rpm or use yum install createrepo.

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Install createrepo
[root@localhost x86_64]# yum install createrepo
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.nbrc.ac.in
* extras: mirror.nbrc.ac.in
* updates: mirror.dhakacom.com
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package createrepo.noarch 0:0.9.9-17.el6 will be installed
–> Processing Dependency: python-deltarpm for package: createrepo-0.9.9-17.el6.noarch
–> Running transaction check
—> Package python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6 will be installed
–> Processing Dependency: deltarpm = 3.5-0.5.20090913git.el6 for package: python-deltarpm-3.5-0.5.20090913git.el6.x86_64
–> Running transaction check
—> Package deltarpm.x86_64 0:3.5-0.5.20090913git.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package              Arch        Version                       Repository
Size
================================================================================
Installing:
createrepo           noarch      0.9.9-17.el6                  base       94 k
Installing for dependencies:
deltarpm             x86_64      3.5-0.5.20090913git.el6       base       71 k
python-deltarpm      x86_64      3.5-0.5.20090913git.el6       base       27 k

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

Total download size: 192 k
Installed size: 518 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): createrepo-0.9.9-17.el6.noarch.rpm                |  94 kB     00:00
(2/3): deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm       |  71 kB     00:00
(3/3): python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rp |  27 kB     00:00
——————————————————————————–
Total                                           127 kB/s | 192 kB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : deltarpm-3.5-0.5.20090913git.el6.x86_64                      1/3
Installing : python-deltarpm-3.5-0.5.20090913git.el6.x86_64               2/3
Installing : createrepo-0.9.9-17.el6.noarch                               3/3
Verifying  : python-deltarpm-3.5-0.5.20090913git.el6.x86_64               1/3
Verifying  : createrepo-0.9.9-17.el6.noarch                               2/3
Verifying  : deltarpm-3.5-0.5.20090913git.el6.x86_64                      3/3

Installed:
createrepo.noarch 0:0.9.9-17.el6

Dependency Installed:
deltarpm.x86_64 0:3.5-0.5.20090913git.el6
python-deltarpm.x86_64 0:3.5-0.5.20090913git.el6

Complete!
[root@localhost x86_64]#

Advertisements
Posted in How To...

Create a Local Yum Repository in CentOS 6.3 in 5 steps


Create a Local Yum Repository in CentOS 6.3 in 5 steps

1) Install CentOS 6.3 -> How to install CentOS 6.3 ; In CentOS6.3 Desktop Installation, Apache is installed in built. Verify

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers
Apache status in CentOS 6.3
Apache status in CentOS 6.3

2) Insert DVD/ISO into DVD-Drive. 3) Create Directory with mkdir -pv /var/www/html/centos/6.3/i386/RPMS/ and copy all RPM files from the DVD (Part-I, Part-II)

ifconfig - verify the IP Address of the Machine
ifconfig – verify the IP Address of the Machine

cp /var/www/html/centos6.3/i386/createrepo* /tmp/repo/

cp /var/www/html/centos6.3/i386/deltarpm* /tmp/repo/cp /var/www/html/centos6.3/i386/python-deltarpm* /tmp/repo/cp /var/www/html/centos6.3/i386/libxml2-python* /tmp/repo/
RPMs needed to run create Repository command createrepo
RPMs needed to run create Repository command createrepo
Run the RPMs
RPMs needed to run create Repository command createrepo 1
RPMs needed to run create Repository command createrepo 1
[root@localhost admin]# rpm-ivh /tmp/repo/deltarpm-3.5-0.5.20090913git.el6.i686.rpm
[root@localhost admin]# rpm -ivh /tmp/repo/python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm[root@localhost admin]# rpm -ivh /tmp/repo/libxml2-python-2.7.6-4.el6_2.4.i686.rpm [root@localhost admin]# rpm -ivh /tmp/repo/createrepo-0.9.8-5.el6.noarch.rpm
createrepo - Create repomd (xml-rpm-metadata) repository
createrepo  is a program that creates a repomd (xml-based rpm metadata)
       repository from a set of rpms.
4) [root@localhost admin]# createrepo /var/www/html/centos6.3/i386/
createrepo command
createrepo command

[root@localhost admin]# createrepo /var/www/html/centos6.3/i386/2559/4776 – php-tidy-5.3.3-3.el6_2.8.i686.rpm

iso-8859-1 encoding on Ville Skytt� <ville.skytta@iki.fi> – 2.8.24776/4776 – diffutils-2.8.1-28.el6.i686.rpm
Saving Primary metadata Saving file lists metadata Saving other metadata [root@localhost admin]#

Use Rsync to create the updates-released repository (Not tried) 5) Change baseurl as per assigned IP address or use Localhost; Make sure that you change baseurl in all sections in the /etc/yum.repos.d/CentOS-Base.repo file (Hint: You need to make sure that baseurl is correct else it will give error for repodata/repomd.xml file; If createrepo command will run successfully then this directory along with files will be created where all RPMs are located or where you have created repository. ).

edit -etc-yum.repos.d-CentOS-Base.repo
edit -etc-yum.repos.d-CentOS-Base.repo

Done!!!