yum command: Update / Install Packages under Redhat Enterprise / CentOS Linux Version 5.xWith Redhat 5, up2date was retired and now the yum utility has been introduced as the method for keeping your system up to date and fully patched. You can also use this utility to install packages that you might have forgotten when you originally built your system which can come in handy when you want to install a new application to mess with.
The first step you will need to do in order to use the yum utilities is to register your server with Redhat using the rhn_register command. This will allow Redhat to keep track of the patches and versioning information of the packages you are using.
Once that is done, we can have yum list the updates that are needed by simply doing:
yum list updates
We can then update individual packages or update everything on the box. You will be prompted to confirm the download's and to actually install the packages but when I first build a box I just update everything. Depending on your application compatibility you may want to exclude certain packages but that is up to you.
To install the updates, simply type:
yum update
We can then show whatever is installed on the system by doing:
yum list installed | grep -i "whatever package you want"
If you decide later you want a FTP server but you haven't installed it yet, you can simply do the following:
yum list | grep -i ftp
Pick out the package you want to install, and then:
yum install "name of package"
The package will be downloaded and installed on your system.
If you later want to uninstall a package, simply do:
yum remove "name of package"
All in all - this is a great way to manage software and keep things simple in terms of patch management and installation procedures for new packages that are controlled and built by Redhat.