Redhat Package Manager

Home   


     RPM is a powerful software manager. It can install, remove, query, and verify the software on your system. Setup of applications is called as package.
Packages Types














Core Packages: These packages are available with you installation media

Extra Core Packages: These extra core packages mean after OS installation,  upgrade of package OR release is called as extra core packages.


RPM Explanation


Above is the explanation about rpm structure

# rpm <options> <package name>          - to install, remove, query and upgrade RPM

Options:
                        -I         -           install
                        -v         -           verbose
                        -q         -           query
                        -e         -           deleting/erasing
                        -U        -           upgrade
                        -a         -           all
                        -h        -           hashes ‘#’ s
# rpm –import <key file name>   -           to import the rpm license key

Drawbacks of RPM:
1.    Distribution packages
2.    Architecture specific
3.    Dependency

# rpm -ivh <package name>         -           to install package

Installing rpm


# rpm –import <key file path>     - to import license key
Importing RPM Key


# rpm –ev <package name>         -           to delete/erase rpm
 


# rpm –qa |grep telnet      -           to query the rpm 
Searching rpm
# rpmbuild <file name>     - to RPM from source code

Source Code: source code is the external packages which we are writing some scripts OR software packages.

Note: when we are installing some of the packages using package manager it will ask you to install dependency packages, installing all the packages manually will eat most of your time. To resolve these types of dependencies we have to configure YUM server.

YUM: yellow-dog updater modified

Some of the advantages of YUM include

• Automatic resolution of software dependencies.

• Command-line and graphical versions. YUM can install or upgrade software by using either the command-line version (yum command) or one of two graphical programs:

• Adding and removing software.

• Package updater that only shows software updates available from RHN.

• Multiple software locations at one time. YUM can be configured to look for software packages in more than one location at a time.

• Ability to specify particular software versions or architectures.

          YUM downloads software from repositories located over the network, either on the local network or over the Internet. The files, including the RPM package files, in these repositories are organized in a specific way so that they can be found by the YUM client.

Configure YUM server we have to install createrepo RPM in server

# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm
Installing createrepo Package


Copy all the RPM packages to one location local path (in this case I have copied to /yum location)

Edit the file
# vi /etc/yum.repos.d/rhel-debuginfo.repo
YUM sample configuration file content



Save the file and exit

Create a repository

# createrepo –v /yum/         - to create a repository database

 


Repo data path (repository files)

 # yum list all            - to check packages are fetching from YUM server
# yum install <package name>   - to install packages
 
 

 Like above all the packages and there dependencies will be installed.
 # yum remove <package name>  - to remove package its dependencies

 
 
# yum clean all        -           it will clean all the cache data of yum server

# yum update <package name>  - to update/upgrade mentioned package

If you want make this YUM as centralized server for all the local domain servers. We have to share this using FTP and HTTP protocol.

SERVER SIDE
[rhel-debuginfo]
name=ARK-IT
baseurl=ftp://yum/
enabled=1
gpgcheck=1
gpgkey=ftp://yum/rpm-gpg/RPM-GPG-KEY-redhat-release

CLIENT SIDE
[rhel-debugino]
Name=ARK-IT
Baseurl=ftp://SERVERIP/PATH
Enabled=1
Gpgcheck=0

Please provide your valuable comments ..


1 comment: