This is part 3 of my series on a fully freeware APEX environment on CentOS:

This post consists of 3 parts:

  • Install Java
  • Glassfish preparations
  • Install GlassFish
  • Configure Glassfish (part 3a)

Information has been taken from:

Here we go…

Install Java

CentOS allready comes with java pre-installed:

/usr/bin/java -> /etc/alternatives/java -> /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java

Glassfish however requires JDK 6:

su -c "yum install java-1.6.0-openjdk"
su -c "yum install java-1.6.0-openjdk-devel"

There might be a message at step openjdk that the package is allready installed.

After install we need to figure out the JAVA_HOME. You can do this by issuing:

which java

And with the results repeatedly issue

ls -l /path/returned/by/the/previous/command

In my case I ended up here:

/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java

this will be my JAVA_HOME.

Glassfish preparations

open up /etc/bashrc as su:

su
gedit etc/bashrc

add this to the end of the file and save the file:

#GLASSFISH
export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
export GLASSFISH_HOME=$ORACLE_BASE/product/3/glassfish
export PATH=$PATH:$JAVA_HOME/bin:$GLASSFISH_HOME/bin

Of course you need to change line 2 with what you found to be your JAVA_HOME, but I reckon that it’ll be the same as what I found.

Start SQL*plus. We need to shut down the EPG:

execute dbms_xdb.sethttpport(0)
exit

Exit the terminal to get your changes applied.

Install Glassfish

Open a terminal again

su
cd /u01/app/oracle/product/3/glassfish/
wget http://dlc.sun.com.edgesuite.net/glassfish/v3/release/glassfish-v3-unix.sh
sh ./glassfish-v3-unix.sh

This downloads the Glassfish 3 installer and executes it.

glassfisinst-01-welcome

Click “Next”

glassfishinst-02-license

Accept the terms.. “Next”

glassfishinst-03-installdir

specify the directory: /u01/app/oracle/product/3/glassfish.. “Next”

glassfishinst-04-adminsettings

We write down the values here for later reference:

  • 4848  admin port
  • 8080  http port
  • admin  username
  • secret  password

Click “Next”.

glassfishinst-05-updateconfig

Make the changes that apply for your network. I don’t have a proxy in mine. So “Next” suffices…

glassfishinst-06-JDKselection

I didn’t change anything here.. “Next”

glassfishinst-07-ready2install

Nothing to do here: “Install”

glassfishinst-08-installing

Now we wait…

glassfishinst-09-prodreg

I skipped this

glassfishinst-10-summary

“Exit”

Ready.. Now we must configure GlassFish.

Leave a Reply