• 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.

  • Life always offers you a second chance ... Its called tomorrow !!!

    Saturday, January 04, 2014

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

    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.

    To know more about a rpm package click on the below link
    Understanding RPM package

    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

    Related Articles
    Understanding RPM package

    Follow the below links for more tutorials

    Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    How to configure Samba 4 Secondary Domain Controller
    RHEL: Kernel will not boot, system freeze at 'starting udev'
    How to secure Apache web server in Linux using password (.htaccess)
    How to register Red Hat Linux with RHN (Red Hat Network )
    Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
    15 tips to enhance security of your Linux machine
    Why is Linux more secure than windows and any other OS
    What is the difference between "su" and "su -" in Linux?
    What is swappiness and how do we change its value?
    How to log iptables messages in different log file
    What are the s and k scripts in the etc rcx.d directories
    How to check all the currently running services in Linux
    How to auto start service after reboot in Linux
    What is virtual memory, paging and swap space?

    1 comments:

    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