Showing posts with label RPM. Show all posts
Showing posts with label RPM. Show all posts

Upgrading RPM Packages

FREQUENTLY ASKED QUESTIONS (Linux)
Q. How can i upgrade a installed .RPM package?

Upgrading an installed .RPM package (Rehat Packet Management) on a Linux server is a simple task with RPM commands. Here you already have installed some version of the a package and you need to upgrade it to a latest version and erase all previous versions if installed. You need to be root or a super user to install/upgrading any packages. These command will work on all RPM based linux distributions like Redhat Linux, CentOS, Fedora, etc.
-->
Command Usage:
# rpm -Uvh <package.rpm>
-U :   upgrading the installed RPM package to the new version.

Example:
[root@server ~]# rpm -Uvh package.rpm

Install RPM package into diffrent directory

FREQUENTLY ASKED QUESTIONS  (Linux commands)
Q: How to install an RPM package into different/custom directory?


The following command install rpm package into custom directory.
[root@server ~#]rpm --prefix=/home/user/new <package name.rpm>


Important: The rpm package must be a relocatable rpm. Use the below command to theck whether the package is relocatable or not.
[root@server ~#]rpm -qpi <package name.rpm>
Relocations: (relocatable)

RPM Commands

List of all general RPM commands for package installing, upgrading, uninstalling, querying, verifiing, etc.

Installing a package
rpm -ivh vsftpd-2.2.2-6.el6_0.1.x86_64          (install a package)
rpm -ivh ftp://servercomputing.blogspot.com/rpm/vsftpd-2.2.2-6.el6_0.1.x86_64  (Install from ftp)
rpm -ivh ftp://username:password@hostname:port/path/vsftpd-2.2.2-6.el6_0.1.x86_64  (install from ftp server with username and password) 
rpm -ivh http://servercomputing.blogspot.com/rpm/vsftpd-2.2.2-6.el6_0.1.x86_64  (Install from web)
rpm -ivh vsftpd-2.2.2-6.el6_0.1.x86_64 --force        (force install a package)
rpm -ivh vsftpd-2.2.2-6.el6_0.1.x86_64 --nodeps        (install without dependencies)
rpm -ivh vsftpd-2.2.2-6.el6_0.1.x86_64 --percent      (show progress percentage)


Verify installed package
rpm --verify vsftpd-2.2.2-6.el6_0.1.x86_64
rpm --verify vsftpd-2.2.2-6.el6_0.1.x86_64

Verify Result Paramerers
S   file Size differs
M   Mode differs (includes permissions and file type)
5   MD5 sum differs
D   Device major/minor number mis-match
L   ReadLink(2) path mis-match
U   User ownership differs
G   Group ownership differs
T   Time differs

Upgrade a package (upgrade current version or install if no previous version ) 
rpm -Uvh vsftpd-2.2.2-6.el6_0.1.x86_64
rpm -Uvh ftp://servercomputing.blogspot.com/rpm/vsftpd-2.2.2-6.el6_0.1.x86_64 (Upgrade from ftp)
rpm -Uvh http://servercomputing.blogspot.com/rpm/vsftpd-2.2.2-6.el6_0.1.x86_64 (Upgrade from websites)


Uninstall a package
rpm -e vsftpd-2.2.2-6.el6_0.1.x86_64


Query a package (check is a package installed or not)
rpm -q vsftpd                                              (query package named xxxx )
rpm -qi vsftpd                                             (display package information)
rpm -ql vsftpd                                             (list where the files installed)
rpm -qa                                                      (list all installed packages)


List files in rpm package
rpm -qpl vsftpd-2.2.2-6.el6_0.1.x86_64
rpm -qpl ftp://servercomputing.blogspot.com/rpm/vsftpd-2.2.2-6.el6_0.1.x86_64
rpm -qpl http://servercomputing.blogspot.com/rpm/vsftpd-2.2.2-6.el6_0.1.x86_64

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons