JamesBranam's Blog
Monday Jun 29, 2009
AWS Experience Part 10: Configuring GlassFish in the Cloud
Hi all,
I'm still working on my cloud computing course. Now I'm more into GlassFish, and how to configure it on a virtual server. I'm not finished, but here's what I have so far:
- The first step in this process is to create a domain. Let's name the domain
domain1. Type the following commands in the command line:
cd /opt/gf21/glassfish
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml
- Back up the original domain1 configuration by typing
cp /opt/gf21/glassfish/domains/domain1/config/domain.xml /opt/gf21/glassfish/domains/domain1/config/domain.xml.org. - To put GlassFish tools in the path, type
echo export PATH=$PATH:/opt/gf21/glassfish/bin >>~/.profile. - Type
exitto return to therootuser. - Start the server by typing
/opt/gf21/glassfish/bin/asadmin start-domain domain1. - Log in as the user gf21 by typing
su - gf21. - To tweak GlassFish configuration for use with an AWS EC2 c1.small instance, type
asadmin create-jvm-options -- "-Xmx1024m"
cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx
asadmin delete-jvm-options -- -Xmx512m
cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx - Exit gf21 and type the following to determine if GlassFish is running:
ps -ef |grep gf21 svcs glassfish/domain1
svcs -l glassfish/domain1 | grep logfile
Cheers!
--James
Posted at 10:53AM Jun 29, 2009 by branajam in NetBeans |
Comments: