Thursday 28 July 2011

Install Firefox 5 on CentOS 6

By default CentOS 6 comes with firefox 3.6.
Here's how to Install Firefox 5 on CentOS 6:

1. Log on as root.
2. Download firefox-5.0.1.tar.bz2 or later from http://www.getfirefox.com to Downloads folder.
3. Also download an appropriate version of libstdc++.so.6, in this case the version from Fedora 13 i686 will work:


libstdc++-4.4.4-2.fc13.i686.rpm
3. Exit your current Firefox.
4. Once you have both packages, you will extract them into a directory like this:
 
# mkdir firefox5
# mv firefox-5.0.1.tar.bz2 libstdc++-4.4.4-2.fc13.i686.rpm firefox5
# cd firefox5
# tar xvjf firefox-5.0.1.tar.bz2 

5. The above will leave you with a firefox directory at this level. Now we need to extract the libstdc++ rpm and copy the libstdc++.so file to that firefox directory:
 
# mkdir libstdc
# cd libstdc
# rpm2cpio ../libstdc++-4.4.4-2.fc13.i686.rpm | cpio -idv
# cp usr/lib/libstdc++.so.6.0.10 ../firefox/libstdc++.so.6
# cd ..

6. Now you should be back into your firefox 3.6 directory and you should have copied the library into the firefox directory. This command should show you that you have it in the correct place:
 
# ls firefox/libstdc++.so.6 

7. The result should be:
 
# firefox/libstdc++.so.6

8. Loose old plugin folder:

# mv /usr/lib/mozilla/plugins /usr/lib/mozilla/plugins-1.5

9. Link to new plugin folder:

# ln -s /usr/local/lib/firefox/plugins /usr/lib/mozilla/plugins

10. Rename old launcher:

# mv /usr/bin/firefox /usr/bin/firefox15

11. Link to 2.0 launcher:

# ln -s /usr/local/lib/firefox/firefox /usr/bin/firefox 

12. You are now ready to deploy the firefox directory where ever you want to run it from. I normally put it in /usr/lib/firefox-5. First I get root like this:
 
# su 

13. Then I change the owner to root and copy the files this this:
 
# chown -R root.root firefox
# cp -a firefox /usr/lib/firefox-5 

14. Now you can exit the root shell and run firefox with the command:
 
# /usr/lib/firefox-5/firefox
 or
Click the web browser link - you're in 5.0!

No comments:

Post a Comment

Navigation by WebRing.