Showing posts with label RPM (Redhat Package Manager) configure in RHEL 7. Show all posts
Showing posts with label RPM (Redhat Package Manager) configure in RHEL 7. Show all posts

Wednesday 27 January 2016

RPM (Redhat Package Manager) configure/Installation in RHEL 7

RPM (Redhat Package Manager) package files  are  named using a  combination of the package name -version -release . architecture

[root@rhel7 Packages]# ls -lrt httpd*
-r--r--r--.  75 root root 1211944 Apr  1  2014 httpd-2.4.6-17.el7.x86_64.rpm

•  NAME is one or more words describing the contents (httpd). 
•  VERSION is the version number of the original software (2.4.6). 
•  RELEASE  is  the re lease number of  the package based on that version, and  is  set by the 
packager, who might not be the original software developer (17.e l7). 
•  ARCH  is the processor architecture the package was  compiled  to run on.  "noarch" indicates 
that  this package's contents are  not architecture-specific (x86_64). 

Install a specific package from specific location

[root@rhel7 Packages]#rpm -ivh httpd-2.4.6-17.el7.x86_64.rpm

Here 
i-Install
v-Print verbose information - normally routine progress messages will be displayed.
h-hash or progress

Install a specific package with no dependencies 

[root@rhel7 Packages]# rpm -ivh httpd-2.4.6-17.el7.x86_64.rpm
warning: httpd-2.4.6-17.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
        httpd-tools = 2.4.6-17.el7 is needed by httpd-2.4.6-17.el7.x86_64
[root@rhel7 Packages]# man rpm
[root@rhel7 Packages]# rpm -ivh httpd-2.4.6-17.el7.x86_64.rpm --nodeps
warning: httpd-2.4.6-17.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:httpd-2.4.6-17.el7               ################################# [100%]
[root@rhel7 Packages]#

Upgrade existing package

[root@rhel7 Packages]# rpm -Uvh httpd-2.4.6-17.el7.x86_64.rpm

Remove Installed Packages

First query that specific package installed or not ??

[root@rhel7 Packages]# rpm -qa | grep httpd
libmicrohttpd-0.9.33-2.el7.x86_64
httpd-2.4.6-17.el7.x86_64

Remove specific package using -e (erase) option

[root@rhel7 Packages]# rpm -ev httpd-2.4.6-17.el7.x86_64
Preparing packages...
httpd-2.4.6-17.el7.x86_64

Now check the package is exist or not??

[root@rhel7 Packages]# rpm -qa | grep httpd
libmicrohttpd-0.9.33-2.el7.x86_64
[root@rhel7 Packages]#

Query which package related to specific file
 
[root@rhel7 Packages]# rpm -qf /etc/crontab
crontabs-1.11-6.20121102git.el7.noarch
[root@rhel7 Packages]#

Search any package installed or not ??

[root@rhel7 Packages]# rpm -qa | grep http
libmicrohttpd-0.9.33-2.el7.x86_64