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:
- http://www.scribd.com/doc/19252518/StepbyStep-Install-Guide-Sun-GlassFish-Enterprise-Server-v3-on-Linux (glassfish part)
- http://bhapca.blogspot.com/2009/05/how-to-install-glassfish-on-centos-and.html (java part)
Here we go…
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:
And with the results repeatedly issue
ls -l /path/returned/by/the/previous/command
In my case I ended up here:
this will be my JAVA_HOME.
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.
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.
Accept the terms.. “Next”
specify the directory: /u01/app/oracle/product/3/glassfish.. “Next”
We write down the values here for later reference:
- 4848 admin port
- 8080 http port
- admin username
- secret password
Make the changes that apply for your network. I don’t have a proxy in mine. So “Next” suffices…
I didn’t change anything here.. “Next”
Nothing to do here: “Install”
Now we wait…
I skipped this
Ready.. Now we must configure GlassFish.