Yum and RPM are complementary package managers.
Install Package
You can install a package with RPM like so
rpm -Uvh foo.rpm
You can install a package with YUM like so:
yum install foo
An explanation of rpm flags:
-i # Install, (will throw an error if already installed)
-U # Update (or install if not present), usually preferred over -i
-v # verbose
-h # hash, basically just shows a pretty progress bar
Upgrade Package
You can upgrade a package with RPM the same way as installing packages
rpm -Uvh foo.rpm
You can upgrade a package with YUM like so:
yum update foo
-Uvh
does an update, is verbose, and shows hashmarks when processing a file. YUM does hashmarks by default,update
will update a particular package from the repo it was installed, and-v
will make YUM verbose, similar to the-v
in RPM.