Upgrading Firefox on CentOS/Fedora Linux

Print Friendly, PDF & Email

Upgrading Firefox on a Mac or Windows machine that isn’t shared with others is usually a piece of cake:  click on the “upgrade” button that the browser gives you and follow the directions.  Upgrading on a Linux workstation, particularly one that is shared by many users, isn’t quite as easy, though it’s not too hard.

As far as I can tell, the Firefox desktop icon on CentOS and Fedora simply launches the “firefox” command in a shell.  This means that we can intercept that and replace it with an upgraded version of firefox.  In particular, the “firefox” RPM from CentOS installs to /usr/bin/firefox.  Here’s the data on an un-upgraded CentOS 6.3 machine:

[root@irwin ~] cat /etc/issue
CentOS release 6.3 (Final)
[root@irwin ~] rpm -q firefox
firefox-10.0.7-1.el6.centos.i686
[root@irwin ~] rpm -ql firefox | grep bin/
/usr/bin/firefox
[root@irwin ~] which firefox
/usr/bin/firefox
[root@irwin ~] /usr/bin/firefox -version
Mozilla Firefox 10.0.7
[root@irwin ~]

Firefox 10.0.7 is very out-of-date, so we want to upgrade right away, and we’ll want to keep upgrading as new versions come out.

If you go to getfirefox.com, and click on the appropriate buttons, it will download a .bz2 file to your home directory.  Unzipping that file results in a .tar file that create a directory called “firefox” that contains a program called “firefox.”  So, do the following:

[root@irwin tmp] cp firefox-18.0.tar.bz2 /usr/local/
[root@irwin tmp] cd /usr/local
[root@irwin local] bzcat firefox-18.0.tar.bz2 | tar xf -
[root@irwin local] ls -l firefox/firefox
-rwxr-xr-x 1 root root 96524 Jan  4 19:44 firefox/firefox
[root@irwin local] ./firefox/firefox -version
Mozilla Firefox 18.0
[root@irwin local] cd /usr/local/bin
[root@irwin bin] ln -s ../firefox/firefox .
[root@irwin bin] which firefox
/usr/local/bin/firefox
[root@irwin bin] firefox -version
Mozilla Firefox 18.0
[root@irwin bin]

Good.  Firefox 18.0 is much better and this last step shows that we succeeded.

I’ve written a script called upgrade-firefox to automate this.

About CS SysAdmins

The CS Department System Administrators
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *