User Tools

Site Tools


rpm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rpm [2009/11/24 12:31] alanrpm [2012/03/21 12:14] (current) – [Building RPMs] ikahugu
Line 1: Line 1:
-===== RPM tips =====+====== Redhat Package Manager ======
  
 +====== Tips ======
 Check if a package is installed: Check if a package is installed:
 <code>$ rpm -qa | grep core <code>$ rpm -qa | grep core
Line 29: Line 30:
 <code>rpm -e <package name></code> <code>rpm -e <package name></code>
 <code>rpm -qa | grep -i <packagename></code> <code>rpm -qa | grep -i <packagename></code>
-===== Custom RPMs =====+====== Building RPMs ======
  
 An RPM is a pre-compiled package containing binaries and config files, etc which can be installed using ''rpm'' or ''yum'' command line tools.  An SRPM or "source RPM" contains everything you need to rebuild a package.  Sometimes a binary RPM is not available, you can build a custom RPM using the SRPM file. An RPM is a pre-compiled package containing binaries and config files, etc which can be installed using ''rpm'' or ''yum'' command line tools.  An SRPM or "source RPM" contains everything you need to rebuild a package.  Sometimes a binary RPM is not available, you can build a custom RPM using the SRPM file.
  
-  * Reference: [[http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment|CentOS Wiki]]+  * [[http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment|Setting up the RPM build environment]] 
 +  * [[http://wiki.centos.org/HowTos/RebuildSRPM|Rebuilding Source RPMs]]
  
-Install ''rpmbuild'':+Install ''rpmbuild'' (from the rpm-build package):
 <code>$ sudo yum install rpm-build</code> <code>$ sudo yum install rpm-build</code>
 Setup your home directory's environment: Setup your home directory's environment:
-<code>mkdir -~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}+<code>cp -a /usr/src/redhat/ ~/rpmbuild
 $ echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros</code> $ echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros</code>
 Download an SRPM and build: Download an SRPM and build:
Line 45: Line 47:
 Install with: Install with:
 <code>$ sudo rpm -i ~/rpmbuild/RPMS/x86_64/python26-2.6-geekymedia1.x86_64.rpm</code> <code>$ sudo rpm -i ~/rpmbuild/RPMS/x86_64/python26-2.6-geekymedia1.x86_64.rpm</code>
- +If upgrading, use  
-==== Troubleshooting ====+<code>$ sudo rpm -U ~/rpmbuild/RPMS/x86_64/python26-2.6-geekymedia1.x86_64.rpm</code> 
 +====== Troubleshooting ======
  
 If you have problems with GPG errors, add a line like this to your ''~/.rpmmacros'': If you have problems with GPG errors, add a line like this to your ''~/.rpmmacros'':
 <file>%_gpg_name Alan</file> <file>%_gpg_name Alan</file>
 +==== Dag Wieers' Repositories ====
 +----
 +
 +<file>[dag]
 +name=Dag RPM Repository for Red Hat Enterprise Linux
 +baseurl=http://dag.linux.iastate.edu/dag/redhat/el5/en/$basearch/dag
 +gpgcheck=1
 +enabled=1
 +</file>
 +
 +
 +<code> rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt</code>
 +Check more on this here http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
 +
 +
 +==== PBONE REPOS ====
 +----
 +<file>
 +cd /etc/yum.repos.d
 +wget http://rpm.pidgin.im/centos/pidgin.repo
 +yum install pidgin
 +</file>
rpm.1259065904.txt.gz · Last modified: 2010/05/22 14:19 (external edit)