Saturday, December 21

Install Java-Plugin for Firefox on Linux RHEL/CentOS 5.X & 6.X

                                                 

To install the Java plugin, First install Java using rpm.This procedure only works with the version you download from Oracle; it will not work with the OpenJDK version of Java you’ll have when using the "yum install java" command.

Step 1:

Download Java rpm package for 32-bit O/S or 64-bit O/S using this link

before installation, close the firefox browser

Change directory to /usr/java. If it isn’t created, create it.

    [root@mini ~]# mkdir /usr/java
   
    [root@mini ~]# cd /usr/java

Step 2 :

Install java package using rpm   

32-bit O/S :

[root@mini java]# rpm -ivh /home/Downloads/jre-7u45-linux-i586.rpm

64-bit O/S :

[root@mini java]# rpm -ivh /home/Downloads/jre-7u45-linux-x64.rpm

After installation is complete, check java

[root@mail java]# java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

After you have installed Java, then you must install the plugin by creating a symbolic link from the java plugin library to the mozilla plugins directory:


Step 3 :


Find the Firefox Plugin(which gets installed with java) in /usr/java/ directory

[root@mail java]# find /usr/java/ -name libnpjp*
/usr/java/jre1.7.0_45/lib/amd64/libnpjp2.so

Change directory for firefox plugins:

#cd where-ever-you-installed-mozilla/plugins/

[root@mail java]# cd /usr/lib64/mozilla/plugins

(In our system mozilla is installed in this folder)

Step 4 :

Create symbolic link to the plugin:

[root@mail plugins]# ln -s /usr/java/jre1.7.0_45/lib/amd64/libnpjp2.so  libnpjp2.so

Check the link file type ll command

[root@mail plugins]# ll
total 360
lrwxrwxrwx  1 root root     41 Dec 21 11:03 libflashplayer.so -> /usr/lib64/flash-plugin/libflashplayer.so
lrwxrwxrwx  1 root root     43 Jan  4  2009 libnpjp.so -> /usr/java/jre1.7.0_45/lib/amd64/libnpjp2.so
-rwxr-xr-x. 1 root root  99080 Nov 12  2010 libtotem-cone-plugin.so
-rwxr-xr-x. 1 root root 106888 Nov 12  2010 libtotem-gmp-plugin.so
-rwxr-xr-x. 1 root root  70904 Nov 12  2010 libtotem-mully-plugin.so
-rwxr-xr-x. 1 root root  79720 Nov 12  2010 libtotem-narrowspace-plugin.so

Open Firefox and goto Tools->Addons->plugins. Now yow can see Java Plug-in enabled..

No comments:

Post a Comment

:: Linux - Legends ::