Monday, July 4, 2011

Configuring Web Application Server Glassfish :

Download Glassfish from : https://glassfish.dev.java.net/

untar the glassfish in install path eg : /install_home

run the glassfish-x.x-unix.sh (mine was I think 3.1)

To Start a domain:

$ ./asadmin start-domain domain1
Waiting for domain1 to start .......
Successfully started the domain : domain1
domain  Location: /ubuntu/glassfish_install/glassfish/domains/domain1
Log File: /ubuntu/glassfish_install/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

To Stop Domain :

$ ./asadmin stop-domain domain1
Waiting for the domain to stop ...
Command stop-domain executed successfully.


To Deploy a Application :

$ ./asadmin deploy /ubuntu/ebooks/hello.war
Application deployed with name hello.
Command deploy executed successfully.


I Configured Http instance port to (9090) , default is 8080:

I use below to check application deployed.
http://127.0.0.1:9090/hello


Admin server console (make sure you have atleast one domain running to access admin server):


http://localhost:4848





This is how the installation screen details will look like :

CREATING DOMAIN
_______________
Executing command :/ubuntu/glassfish_install/glassfish/bin/asadmin --user admin --passwordfile /tmp/asadminTmp2258577312851916948.tmp create-domain --savelogin --checkports=false --adminport 4848 --instanceport 9090 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1
/ubuntu/glassfish_install/glassfish/bin/asadmin --user admin --passwordfile /tmp/asadminTmp6210518625018142589.tmp create-domain --savelogin --checkports=false --adminport 4848 --instanceport 9090 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920
=============================
domain1Using port 4848 for Admin.
Using port 9090 for HTTP Instance.
==================================
Using port 7676 for JMS.
Using port 3700 for IIOP.
Using port 8181 for HTTP_SSL.
Using port 3820 for IIOP_SSL.
Using port 3920 for IIOP_MUTUALAUTH.
Using port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Using default port 9009 for JAVA_DEBUGGER.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=ubuntu,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=ubuntu-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
No domain initializers found, bypassing customization step
Domain domain1 created.
Domain domain1 admin port is 4848.
Domain domain1 admin user is "admin".
Login information relevant to admin user name [admin]
for this domain [domain1] stored at
[/home/sriram/.asadminpass] successfully.
Make sure that this file remains protected.
Information stored in this file will be used by
asadmin commands to manage this domain.
Command create-domain executed successfully.
























No comments:

Post a Comment