mercoledì, ottobre 24, 2007

Glassfish 2.0: installazione

La roadmap di Glassfish e' decisamente interessante... Glassfish 3 starta in mezzo secondo!!!

E' ora di iniziare a prendere confidenza con questo promettente (e maturo) application server... installiamo la versione 2 su un bel dev redhat ;)

> mkdir glassfish
> cd glassfish
> java -jar glassfish-installer-v2-b58g.jar
> mv glassfish glassfish-2.0


mhmh e' preconfigurato per ascoltare di default sulle porte 8080 (http), 8181 (https), 4848 (web console), 3700 (corba), 7676 (jms)... ho gia' la 8080 occupata da resin, riassegno le porte a glassfish...

> vi setup.xml
> :1,$s/8080/7070/g
> :1,$s/8181/7171/g
> :1,$s/4848/7878/g
> :1,$s/3700/7700/g
> :1,$s/7676/7600/g
> :wq!


> chmod u+x lib/ant/bin/ant
> lib/ant/bin/ant -f setup.xml


ant mi comunica che e' andato tutto bene:

create.domain:
[exec] Using port 7878 for Admin.
[exec] Using port 7070 for HTTP Instance.
[exec] Using port 7600 for JMS.
[exec] Using port 7700 for IIOP.
[exec] Using port 7171 for HTTP_SSL.
[exec] Using default port 3820 for IIOP_SSL.
[exec] Using default port 3920 for IIOP_MUTUALAUTH.
[exec] Using default port 8686 for JMX_ADMIN.
[exec] Domain being created with profile:developer, as specified by variable AS_ADMIN_PROFILE in configuration file.
[exec] Security Store uses: JKS
[exec] Domain domain1 created.
[exec] Login information relevant to admin user name [admin] for this domain [domain1] stored at [/home/httpd/.asadminpass] successfully.
[exec] Make sure that this file remains protected. Information stored in this file will be used by asadmin commands to manage this domain.
[delete] Deleting: /store2/sw/as/glassfish/glassfish-2.0/passfile

BUILD SUCCESSFUL
Total time: 18 seconds



posso startare l'as:

> bin/asadmin start-domain domain1

che parte correttamente:

Starting Domain domain1, please wait.
Log redirected to /store2/sw/as/glassfish/glassfish-2.0/domains/domain1/logs/server.log.
Redirecting output to /store2/sw/as/glassfish/glassfish-2.0/domains/domain1/logs/server.log
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun Java System Application Server 9.1 (build b58g-fcs)] with its configuration and logs at: [/store2/sw/as/glassfish/glassfish-2.0/domains].
Admin Console is available at [http://localhost:7878].
Use the same port [7878] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:7070 https://localhost:7171 ].
Following web-contexts are available:
[/web1 /__wstx-services ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://XXXXXXXXXXXXXXXXX:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[7070 7171 7878 7700 3820 3920 8686 ].
Domain does not support application server clusters and other standalone instances.