Deployment of Glassfish In amazon server

GlassFish is an open-source application server project started by Sun Microsystems for the Java EE platform and now sponsored by Oracle Corporation. The supported version is called Oracle GlassFish Server. GlassFish is free software, dual-licensed under two free software licences: the Common Development and Distribution License (CDDL) and the GNU General Public License (GPL) with the classpath exception.

GlassFish is the reference implementation of Java EE and as such supports Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI, JavaServer Pages, servlets, etc. This allows developers to create enterprise applications that are portable and scalable, and that integrate with legacy technologies. Optional components can also be installed for additional services.




 Step 1:   
 Connect the Amazon server through terminal using DNS and the KEY.  
 To connect with amazon server:  
 ssh -i <key_path> <username>@<ip_adress_server>  
 First of all we need to check the java dependencies.  
 sudo apt-get update  
 sudo apt-get remove openjdk-6-jre-headless  
 sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-javadb  
 sudo apt-get autoremove  
 Step 2:  
 go to terminal in Ubuntu  
 go to your home directory in terminal   
 enter wget http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip to download the glassfish in to your server.  
 Step 3:  
 Configure and change default port for Glassfish if tomcat already use port 8080.Because usually it use the port 4848.If you need as default please avoid thid Step 3.  
 vim glassfishv3/glassfish/domains/domain1/config/domain.xml  
 <network-listeners>  
 <network-listener port="8081" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" />  
 <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool" />  
 <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="http-thread-pool" />  
 </network-listeners>  
 Step 4:  
 Running by Glassfish  
 ./glassfishv3/glassfish/bin/asadmin start-domain --verbose  
 Step5:  
 Go to your-domain:8081 to see web page and your-domain:4848 for administrator pages  
 Glassfish Controls :  
 Create domain  
 Start and Stop Domain  
 Delete Domain  
 Enable secure Admin  

 Error may occur:  
 Solution:  
 http://charleech.wordpress.com/2012/03/23/glassfish-version-3-1-2-secure-admin-must-be-enabled-to-access-the-das-remotely/  
 http://coders-kitchen.com/tag/secure-admin-must-be-enabled-to-access-the-das-remotely/  

No comments:

Post a Comment