Wednesday 8 October 2008

Solaris Patching Goodness

I have recently been working on updating a Solaris 10 based server with the latest security patches. As the company I work for is small and the server is working along side a slew of Centos Servers which get FREE updates I needed a simple way to apply the security updates available from Suns Patches and Updates site.

For some time I have just checking the sun public list patch list every once in a while, and applying the important sounding ones manually. This was not a very nice or secure solution.

So recently after some searching I found Patch Check advanced (PCA) which can be found at the PCA Website.

This simple Perl script has made it very simple for me to apply and check for new recommended and security patches published by Sun. I cannot thank the author enough for such a simple and easy to use patching application.

To install just download the latest release using wget at Latest PCA Stable version and copy it to your /usr/local/bin directory. Make this script executable using chmod and then create a directory for your updates, in my /data/softwareupdates.

Once installed we want to check for missing recommended and security patches, to do this we run the following command.

# pca -l mrs

If your happy with that I recommend downloading all these patches first to ensure the patching process is as short as possible. To download the patches you need a FREE sun user ID which you can register for at . To perform the download we run the following command while in /data/softwareupdates directory, this will prompt you for a password.

# pca --user mynewusername -d mrs

Now that we have our patches we can apply them, again passing our username just in case it needs to download something new.

# pca --user mynewusername -i mrs

At this point I reboot the server just to be sure they are all applied.

# sync; sync; reboot


Next I am going to look at modifying the pca script so it can be run from crontab and send an e-mail if there is any new patches to install.

No comments: