Install & Configure LB on Apache (Steps using Glassfish v2ur1 & Apache 2.0.59 on Windows)
In Glassfish 9.1.1, LB installation was done using the AS installer. The installer would edit the Apache config files as well. But, Glassfish v2 ur1 does not have LB bundled with it. The users will have to download the LB and manually configure it. Hence this blog, which gives you detailed steps to install LB and configure it with Apache. If you are using the Sun WebServer, the steps are available here
Install Apache with SSL
[
http://www.neilstuff.com/apache/apache2-ssl-windows.htm]
-
Use OpenSSL from the system (already installed)
-
Download bits from: http://archive.apache.org/dist/httpd/binaries/win32/apache_2.0.59-win32-x86-openssl-0.9.7j.msi <download-dir>
-
Double click the msi file for installation [ Remember to give the fully qualified machine name for ServerName
-
Backup httpd.conf & ssl.conf from <apache-install>/conf
-
Uncomment LoadModule ssl_module modules/mod_ssl.so in httpd.conf
-
Remove the <IfDefine SSL> and matching </IfDefine> lines in ssl.conf
-
Creating Security Certificate
-
Download openssl.cnf to <download-dir> from http://tud.at/programm/openssl.cnf
-
openssl req -config <download-dir>/openssl.cnf -new -x509 -keyout newreq.pem -out newreq.pem -days 365 {Make sure WS instance-name/lb device-host/common-name for certificate are the same}
-
mkdir <apache-install>/conf/ssl.crt and <apache-install>/conf/ssl.key
-
Create the the certificate file as <apache-install>/conf/ssl.crt/server.crt copying from BEGIN CERTIFICATE to END CERTIFICATE from newreq.pem
-
openssl rsa -in newreq.pem -out <apache-install>/conf/ssl.key/server.key
-
Edit <apache-install>/conf/ssl.conf
-
set the virtual host name to fully qualified m/c name [replace "_default_" with fully qualified m/c name ]
-
Change server name to the fully qualified machine name followed by port number
-
-
Start Apache in secure mode
-
<apache-install>/bin/Apache -k stop & <apache-install>/bin/Apache -k startssl
-
Make sure the localhost:80 & localhost:443 are accessible in a browser
-
check the <apache-install>/logs/errors to make sure there are no errors. {File does not exist: <apache-install>/htdocs/favicon.ico Is a harmless error if it appears in the log .}
Install Glassfish v2ur1.
-
Download bits from http://www.java.net/download/javaee5/v2ur1/promoted/Windows/glassfish-installer-v2ur1-b09d-windows.jar
-
java -Xmx256m -jar glassfish-installer-v2ur1-b09d-windows.jar - to unbundle glassfish.
-
cd glassfish
-
chmod -R +x lib/ant/bin
-
lib/ant/bin/ant -f setup-cluster.xml [You might need to set the ANT_HOME to glassfish/lib/ant]
Install LB Plugin.
-
Download latest LB plugin from http://download.java.net/javaee5/external/WINNT/aslb/jars/ [e.g aslb-9.1.1-b6.jar]
-
Extract jar to get SUNWaspx.zip SUNWaslb.zip
-
mkdir glassfish/lib/plugin
-
cp the zips from step 2 and unzip it in glassfish/lib/plugin [ make sure to remove the zip files from this directory]
-
chmod -R 755 glassfish/lib/plugin/lib
Configure LB Plugin for Apache.
-
Create sub-directories in <Apache-install>/modules directory as - resource and errorpages
-
Create sub-directory in <Apache-install> directory as - sec_db_files
-
cp <glassfish>/lib/plugin/lib/webserver-plugin/windows/apache2/LBPlugin*.res <Apache-install>/modules/resource/
-
cp <glassfish>/lib/plugin/lib/webserver-plugin/windows/apache2/mod_loadbalancer.dll <Apache-install>/modules/
-
cp <glassfish>/lib/plugin/lib/webserver-plugin/windows/apache2/errorpages/* <Apache-install>/modules/errorpages/
-
cp <glassfish>/lib/plugin/lib/install/templates/loadbalancer.xml.example <Apache-install>/conf/
-
cp <glassfish>/lib/plugin/lib/dtds/sun-loadbalancer* <Apache-install>/conf/
-
Append httpd.conf file with:
##BEGIN EE LB Plugin Parameters LoadModule apachelbplugin_module modules/mod_loadbalancer.dll <IfModule mod_apache2lbplugin.cpp> config-file "C:/Program Files/Apache Group/Apache2/conf/loadbalancer.xml" locale en </IfModule> <VirtualHost 10.12.8.107> DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" ServerName vm07 </VirtualHost> ##END EE LB Plugin Parameters -
Double-check apache-install location and the fully qualified machine name for ServerName in httpd.conf
-
cp <glassfish>lib/plugin/lib/webserver-plugin/windows/apache2/*.db <Apache-install>/sec_db_files/
-
Start Apache and make sure you are able to access the port 80 & 443. The error logs will have errors till the loadbalancer.xml is setup.
Steps on How to Configure Loadbalancer.xml are here.
Posted at 02:00PM Feb 11, 2009 by Smitha Prabhu in Sun | Comments[0]
Connected Women Leadership Forum
Back to work totally charged !! Revitalized..Re-energized..
I attended a one-day conference called "Connected Women Leadership Forum"
hosted by Cisco WAN (Women Action Network). The program was quite an
eye opener. Had a lot of take aways and was a real wake up call !!
I have a gist of it here.
Indian Women are born/groomed Managers
Bringing us up the way our parents/society has we have a lot of inherent qualifications that make us her stand apart.We are able to deal with a lot of our relatives (read as in-laws) very effectively.
We are able to juggle multiple things in a very effective manner.
Multi tasking is pretty much ingrained in us. Remember, you had to help your mom in her household chores while your brother could get away doing just his studies.
We are given varied opportunities/options - Girls are encouraged more to take up fine arts with an assumption that the husband will take care of the finances and the women can take care of the hobbies.
We are Born perfectionists.
We are Good Planners - There is hardly a day that there is absolutely no grocery in the kitchen.
Well with so many pluses why is that women are not making to the top ? Because we have converted our pluses to our minuses.
a) We do juggle multiple things and keep feeling guily about not doing things perfectly or not doing enough.
b) We do not make the best use of our opportunities.
c) We have benchmarked ourselves with wrong people which has created a false glass ceiling.
d) We do not want to grow too high up as we feel we will not be able to manage the home front once we get to the top.
e) Being very sensitive -we mix emotions with work.
TLA : Three Letter Acronyms.
CCC : Capability - Credibility - Confidence Only because you have the capability did you get into the workspace, clearing all the necessary exams/interviews. Now, you have to keep working on your deliverables and gain the credibility. Once you have the credibility, you will automatically get the confidence which will help you negotiate when need be. Especially if you want to work from home or take a part time assignment etc.PPP : Power - Passion - Purpose Once you are give the power to do things, remember to have a purpose and wear your passion on your sleeves. It's not very acceptable in the society but it is true that we are the drivers of change.
FOGs : Failures - Own Nature - Gaps ---> Success Failures are stepping stones for success. Understand your nature and do things that make you happy. Follow your dreams. Imagine a book without any spaces or commas or fullstops,that will make the book totally unreadable. Thus have your gaps to re energize. Once the FOG is clear it will lead to "SUCCESS"
Action Items
Networking : Do you think its a waste of time to
mingle/chat with people - You want to finish your work and get home as
more work is awaiting you.. But this is the key for success. It not
only helps career moves, it gives a great opportunity and easy access
to different knowledge banks.Have a network not just at your work place
but in all your various social circles.
Attend Brown Bags : They can give you the buzz words, if not the depth
into each of technological advancements happening around you.
IEEE/ OpenSource Forums : Be there not to get help only. Be there to
give help as well and Be there long enough to gain credibility.
Mentoring/Training : "Sharpen your Saw" is a constant requirement.
Choose your mentors and learn from them and strive to grow beyond them.
Branding : Key Factor for people to identify you which eventually helps in the persons growth.
Plan Ahead : Think what you want to be in the next 5 years and iterate
through that plan every year . Re prioritize/Change the plan if need be.
Don't wait till the end of 5 years to assess it.
Social Responsibility : Help bridge the digital divide by giving back to the society. This also helps in networking.
Growth is not just about getting to the next grade in your career. It
is about the experiences your work life and home front that you learn
from and adopt.Experiences that help you grow from within as an
individual is what is real GROWTH.
Press Coverage
http://www.siliconindia.com/shownews/43972http://www.itexaminer.com/cisco-launches-womens-forum.aspx
Posted at 04:47PM Jul 18, 2008 by Smitha Prabhu in Personal | Comments[0]
Install & Configure LB on Apache(Steps using Glassfish v2ur2 & Apache 2.0.59 on Unix platform.)
If you are using Glassfish v2ur2 instead of v2ur1, the installation & configuration instructions are the same as that of v2ur1 except the installation of glassfish which is detailed here.
Install Glassfish v2ur2.
-
Download bits from http://www.java.net/download/javaee5/v2ur2/promoted/SunOS/glassfish-installer-v2ur2-b04-sunos.jar
-
java -Xmx256m -jar glassfish-installer-v2ur2-b04-sunos.jar - to unbundle glassfish.
-
cd glassfish
-
chmod -R +x lib/ant/bin
-
lib/ant/bin/ant -f setup-cluster.xml
Posted at 02:08PM Jul 02, 2008 by Smitha Prabhu in Sun | Comments[0]
Install & Configure LB on Apache (Steps using Glassfish v2ur1 & Apache 2.0.59 on Unix platform)
In Glassfish 9.1.1, LB installation was done using the AS installer. The installer would edit the Apache config files as well. But, Glassfish v2 ur1 does not have LB bundled with it. The users will have to download the LB and manually configure it. Hence this blog, which gives you detailed steps to install LB and configure it with Apache. If you are using the Sun WebServer, the steps are available here
Install OpenSSL
Install Apache with SSL
Install Glassfish v2ur1
Install LB Plugin
Configure LB Plugin for Apache
Install OpenSSL
-
Download latest bits from http://openssl.org/source/ - Referred to as <download-dir> later on.
-
gunzip openssl-<version-number>.tar.gz
-
tar -xvf openssl-<version-number>.tar
-
Have gcc, ant & make in the path
-
Only on Solaris x86, Patch OpenSSL by downloading http://www.openssl.org/~appro/values.c and ksh -f values.c <gcc-location>
-
cd openssl-<version-number>
-
./config --openssldir=openssl-<version-number> --prefix=<download-dir>
-
gmake; gmake test; gmake install;
Install Apache with SSL
-
Download bits from http://archive.apache.org/dist/httpd/httpd-2.0.59.tar.gz in <download-dir>
-
gunzip httpd-2.0.59.tar.gz
-
tar -xvf httpd-2.0.59.tar
-
Have gcc , ant and make in the path
-
cd httpd-2.0.59
-
Patch httpd
-
Copy http://issues.apache.org/bugzilla/attachment.cgi?id=16495 as 12355.diff
-
patch < 12355.diff
-
-
./configure --with-ssl=<download-dir> --prefix=<download-dir>/apache --enable-ssl --enable-so
-
gmake ; gmake install;
-
Edit <apache-install>/conf/httpd.conf
-
Uncomment the ServerName property and set it to fully qualified m/c name followed by port number
-
Set 'Group nogroup' else you will see error messages. For e.g: ‘unable to set group id to Group 4294967295’ in <apache-install>/logs/error_log
-
Start/Stop Apache
-
<apache-install>/bin/apachetl start
-
Make sure the localhost:80 is accessible in a browser
-
check the <apache-install>/logs/errors to make sure there are no errors. {File does not exist: <apache-install>/htdocs/favicon.ico Is a harmless error if it appears in the log .}
-
<apache-install>/bin/apachetl stop
Setting up SSL for Apache
-
openssl req -new -x509 -keyout newreq.pem -out newreq.pem -days 365 {Make sure lb device-host/common-name for certifcate are the same}
-
mkdir <apache-install>/conf/ssl.crt and <apache-install>/conf/ssl.key
-
Create the the certificate file as <apache-install>/conf/ssl.crt/server.crt copying from BEGIN CERTIFICATE to END CERTIFICATE from newreq.pem
-
openssl rsa -in newreq.pem -out <apache-install>/conf/ssl.key/server.key
-
Edit <apache-install>/conf/ssl.conf
-
set the virtual host name to fully qualified m/c name [replace default with fully qualified m/c name ]
-
Change server name to the fully qualified machine name followed by port number
-
Start Apache in secure mode
-
<apache-install>/bin/apachetl startssl
-
Make sure the localhost:443 is accessible in a browser
-
check the <apache-install>/logs/errors to make sure there are no errors. {File does not exist: <apache-install>/htdocs/favicon.ico Is a harmless error if it appears in the log .}
Install Glassfish v2ur1.
-
Download bits from http://www.java.net/download/javaee5/v2ur1/promoted/SunOS/glassfish-installer-v2ur1-b09d-sunos.jar
-
java -Xmx256m -jar glassfish-installer-v2ur1-b09d-sunos.jar - to unbundle glassfish.
-
cd glassfish
-
chmod -R +x lib/ant/bin
-
lib/ant/bin/ant -f setup-cluster.xml
Install LB Plugin.
-
Download latest LB plugin from http://download.java.net/javaee5/external/<OS>/aslb/jars/ [e.g aslb-9.1.1-b1.jar]
-
Unjar it to get SUNWaspx.zip SUNWaslb.zip
-
mkdir glassfish/lib/plugin
-
cp the zips from step 2 and unzip it in glassfish/lib/plugin [ make sure to remove the zip files from this directory]
-
chmod -R 755 glassfish/lib/plugin/lib
Configure LB Plugin for Apache.
-
Create sub-directories in <Apache-install>/modules directory as - resource errorpages
-
Create sub-directory in <Apache-install> directory as - sec_db_files
-
cp <glassfish>/lib/plugin/lib/webserver-plugin/solaris/apache2/LBPlugin*.res <Apache-install>/modules/resource/
-
cp <glassfish>/lib/plugin/lib/webserver-plugin/solaris/apache2/mod_loadbalancer.so <Apache-install>/modules/
-
cp <glassfish>/lib/plugin/lib/webserver-plugin/solaris/apache2/errorpages/* <Apache-install>/modules/errorpages/
-
cp <glassfish>/lib/plugin/lib/install/templates/loadbalancer.xml.example <Apache-install>/conf/
-
cp <glassfish>/lib/plugin/lib/dtds\sun-loadbalancer* <Apache-install>/conf/
-
cp <Apache-install>/conf/httpd.conf <Apache-install>/conf/httpd.conf.orig
-
Append httpd.conf file with:
##BEGIN EE LB Plugin Parameters LoadFile /usr/lib/libCstd.so.1 LoadModule apachelbplugin_module modules/mod_loadbalancer.so <IfModule mod_apache2lbplugin.cpp> config-file "<Apache-install>/conf/loadbalancer.xml" locale en </IfModule> <VirtualHost 10.12.152.120> DocumentRoot "<Apache-install>/htdocs" ServerName <fully qualified m/c name> </VirtualHost> ##END EE LB Plugin Parameters -
Edit httpd.conf and set the apache-install location and the fully qualified machine name correctly.
-
cp <glassfish>lib/plugin/lib/webserver-plugin/solaris/apache2/*.db <Apache-install>/sec_db_files/
-
Edit <Apache-install>/bin/apachetl to include the LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/lib/mps:<glassfish>/lib/plugin/lib:<apache-install>/modules:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
echo $PATH -
Start Apache and make sure you are able to access the port 80 & 443. The error logs will have the following error message till the loadbalancer.xml is setup.
[emerg] lb.configurator: CNFG1014 : Error occured while initializing Loadbalancer config Parser. Please check that the config file: /space/smitha/apache/conf/loadbalancer.xml exists and has the read access. [Fri Jun 20 12:09:23 2008] [crit] lb.runtime: RNTM3005 : Failed to initialise load balancing subsystem
Steps on How to Configure Loadbalancer.xml are here.
Posted at 10:14AM Jun 26, 2008 by Smitha Prabhu in Sun | Comments[4]