SJSAS 7 working on Linux (Kernel 2.6.x)
Installing (and
hacking) Sun Java System Application Server 7 on Linux
Preface
Sun Java System Application Server 7 is the J2EE 1.3
Application Server from Sun Microsystems. The supported Linux operating
system is RedHat Enterprise Linux 2.1 and 3.0. Any other Linux
operating system is not supported, but that
doesn’t stop anyone to install Sun Java System Application Server 7 on
any Linux distribution, but that doesn’t have any warranty nor
endorsement from Sun. I will call Sun Java System Application Server 7
of SJSAS7 to make it easy.
SJSAS7 can be installed on any Linux distribution,
which has Kernel 2.4.x, I did that on Mandrake Linux 9.2. But for a
unknown reason, the SJSAS7 Installation process doesn’t work on Linux
Kernel 2.6.x.
My system is a Mandrake Linux Official 10.1 and a
custom kernel 2.6.10 with patches, so my system is an unsupported one.
I was tired to switch to windows, just to run SJSAS 7, and it is
supposed to be entirely implemented in Java (but Sun WebServer is not
Java), then I just need to try to do a hack and make it work on linux.
After 6 hours it is done.
This howto can be found on line at: http://www.claudius.com.br/blog/claudio/Java/2005/01/25/SJSAS_7_working_on_Linux_Kernel_2_6_x.html
Written by: [Claudio
Miranda](mailto:claudio%28@%29CLAUDIUS.com.br)
Warranties
Sun Microsystems doesn’t have any involvement
related to
this document.
I don’t give any warranty about this document, and I
am not responsible to software or hardware damage.
Requirements
– Sun Java System Application Server 7 for linux: sunappserver7.tar.gz
I used SJSAS 7 2004Q2 Update 1
– An already installed SJSAS 7, preferably on linux
I used a sparc installation
I will call it SJSAS7-REF, that will serve as reference of
configuration for the linux instance
– A running JVM 1.4.2 or greater
If you don’t want to install the SJSAS7 bundled JDK
eg: /opt/j2sdk1.4.2_06
Installation
- Make a backup of some directories of SJSAS7-REF
- SJSAS7-REF/config
-
SJSAS7-REF/bin
-
Untar the downloaded SJSAS7, eg:
UNTAR=/home/claudio/sunappserver-7
-
Create the directory to install SJSAS 7, eg:
/opt/sjsas7-2004Q2-up1
I will call it: SJSAS7
-
cd /opt/sjsas7-2004Q2-up1
- unzip $UNTAR/packages/*.zip
- exceptions:
- If you don’t want to install a new JDK, don’t unzip jdk.zip
- if you don’t want pointbase, don’t unzip SUNWasdbo.zip
- $UNTAR/packages/ant.zip
-
$UNTAR/packages/perl.zip
-
Some files is duplicated across some zip files, you can replace
them safely.
- ANT installation
- mkdir lib/ant
- cd lib/ant
-
unzip $UNTAR/packages/ant.zip
- Perl Installation
- mkdir lib/perl
- cd lib/perl
-
unzip $UNTAR/packages/perl.zip
- copy $SJSAS7-REF/bin to $SJSAS7/bin
- copy $SJSAS7-REF/config to $SJSAS7/config
- mkdir $SJSAS7/domains
Configuration
Some adjustments on configuration files needs to be done for the newly
linux installment.
What needs to be adjusted:
- J2SE SDK location
- SJSAS 7 home location
-
Native JVM lib (if the SJSAS7-REF is solaris)
- cd $SJSAS7/bin
-
Each script file, at the beginning has the full path of the
asenv.conf file, adjust it to reflect your installment
eg: .
/opt/sjsas7-2004Q2-up1/config/asenv.conf
find . | xargs perl -i.bkp -p -e
‘s/\/opt\/sjsas7-ref/\/opt\/sjsas7-2004Q2-up1/g;’
Where:
- -i: do a backup of each file
- -e: runs the specified regular expression
- -p: reads each line of the file
- cd ../config
-
Edit asenv.conf, adjust the directory to reflect your
environment
- SJSAS7 home, eg: /opt/sjsas7-2004Q2-up1
-
JDK_HOME
-
The $SJSAS7/config/domains.bin file needs to be reflect the
current environment
-
run asadmin list-domains, that will show the domain list, eg:
/sunappserver7/domains/domain1
/sunappserver7/domains/test
-
And the SJSAS7 is located under /opt/sjsas7-2004Q2-up1, the
domains need to be under this directory
-
create the following directories
/sunappserver7/domains/domain1
/sunappserver7/domains/test
- run asadmin delete-domain domain1 and delete-domain test
- remove the /sunappserver7 directory
- create new domain and instance
-
asadmin create-domain –path
/ope/sjsas7-2004Q2-up1/domains/ –adminport 4881 –adminuser admin
–adminpassword admin123 domain1
Final Notes
- Do a search on the SJSAS7 home
-
grep -Hr
$SJSAS7 eg: grep -Hr SUNWappserver /opt/sjsas7-2004Q2-up1
eg: grep -Hr
/opt/sjsas7-2004Q2-up1
-
Do a admin-server test
cd $SJSAS7/domains/
/admin-server/bin ./startserv -configtest
- Deploy some sample application to test the instance.
Conclusion
admin-server can be started. Check the logs for any failure.</p>
The user and password for admin-server are the same as SJSAS7-REF, be
aware.
After logged in, instances can be created through admin server (web
interface or asadmin console)
If you have any comments, fixes, please send a email to me: Claudio Miranda
Deixe um comentário