• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to install/uninstall/upgrade rpm package with/without dependencies

    I have already written an article with 15 practical examples on various rpm based commands which are used in real world of IT on a day to day basis.

    Also do you know what every field of rpm name represents? This is one of the most trickiest interview questions asked many times

    A RPM package abbreviated as Red Hat Package Manager refers to Red Hat package installed on Fedora, CentOS, OEL and all Red Hat source code derived OS.


    Installing from the downloaded rpm package

    Use -ivh switch along with rpm command as shown below





    # cd /root/rpms
    # rpm -ivh cvs-1.11.23-16.el6.i686.rpm
    Preparing...                ########################################### [100%]
       1:cvs                    ########################################### [100%]

    Installing directly from the package available on web.

    But for this you need to have the proper link of the rpm you want to download or install
    # rpm -ivh ftp://ftp.pbone.net/mirror/ftp.centos.org/6.5/os/i386/Packages/cvs-1.11.23-16.el6.i686.rpm
    Retrieving ftp://ftp.pbone.net/mirror/ftp.centos.org/6.5/os/i386/Packages/cvs-1.11.23-16.el6.i686.rpm
    warning: /var/tmp/rpm-tmp.z3VsTc: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    Preparing... ########################################### [100%]
    1:cvs ########################################### [100%]

    Installing a package forcefully without dependencies

    Use --force argument along with -ivh switch as shown below to install forcefully without dependencies
    # rpm -ivh vsftpd-2.2.2-11.el6_4.1.i686.rpm --force
    warning: vsftpd-2.2.2-11.el6_4.1.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    Preparing... ########################################### [100%]
    1:vsftpd ########################################### [100%]

    Upgrading a package

    Use -Uvh switch along with rpm command
    # rpm -q vsftpd
    vsftpd-2.0.5-28.el5.i386

    # rpm -Uvh vsftpd-2.2.2-11.el6_4.1.i686.rpm
    warning: vsftpd-2.2.2-11.el6_4.1.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
    Preparing... ########################################### [100%]
    1:vsftpd ########################################### [100%]

    Removing a package

    You can uninstall a package using -e switch along with rpm command

    NOTE: Before removing a package make sure you get the complete name of the package using the below command
    # rpm -qa | grep cvs
    cvs-1.11.23-16.el6.i686

    # rpm -e cvs-1.11.23-16.el6.i686

    Removing a package without dependencies

    Use an extra argument --nodeps along with rpm command to remove/uninstall a package without dependencies
    # rpm -e vsftpd-2.2.2-11.el6_4.1.i686 --nodeps



    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?

    Become an author and be a part of our GoLinuxHub Team, Click here for more information
    How to install/uninstall/upgrade rpm package with/without dependencies How to install/uninstall/upgrade rpm package with/without dependencies Reviewed by Deepak Prasad on Saturday, January 04, 2014 Rating: 5

    1 comment:

    1. Awesome article Deepak Prasad! on how to install RPM Package with or without dependencies? I’m interested in Linux admin online training can you advise me.

      ReplyDelete

    Powered by Blogger.