Configurer Glassfish V4.0
De wiki gPod
Version du 9 décembre 2013 à 12:01 par Vibrac (discuter | contributions)
Les application sous glassfish sont déployer dans des Domaines. Chaque domaine possède un port TCP d'accès à l'instance HTTP + un port TCP pour accéder à l'interface d'administration Il est possible de déployer plusieurs application dans un domaine, mais il est préférable de déployer une application par domaine pour que chacune soit étanche aux autres.
suppression du domaine par défaut
Terminal
glassfish# /usr/local/glassfish/v4/bin/asadmin stop-domain domain1 Waiting for the domain to stop . Command stop-domain executed successfully. glassfish# /usr/local/glassfish/v4/bin/asadmin delete-domain domain1 Enter the value for the domain_name operand> domain1 Domain domain1 deleted. Command delete-domain executed successfully.
Création du domaine gpod
Terminal
glassfish# /usr/local/glassfish/v4/bin/asadmin --user admin create-domain --adminport 4848 --instanceport 8080 gpod Enter the admin password [Enter to accept default of no password]> Saisir un mot de passe Enter the admin password again> Saisir un mot de passe Using port 4848 for Admin. Using port 8080 for HTTP Instance. Using default port 7676 for JMS. Using default port 3700 for IIOP. Using default port 8181 for HTTP_SSL. Using default port 3820 for IIOP_SSL. Using default port 3920 for IIOP_MUTUALAUTH. Using default 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=localhost,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US] Distinguished Name of the self-signed X.509 Server Certificate is: [CN=localhost-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US] Domain gpod created. Domain gpod admin port is 4848. Domain gpod admin user is "admin". Command create-domain executed successfully.
Démarrer le domaine gpod
Terminal
glassfish# /usr/local/glassfish/v4/bin/asadmin start-domain gpod
Activer le SSL
Terminal
glassfish# /usr/local/glassfish/v4/bin/asadmin --host localhost --port 4848 enable-secure-admin Authentication failed with password from login store: /home/glassfish/.gfclient/pass Enter admin password for user "admin"> Saisir le mot de passe You must restart all running servers for the change in secure admin to take effect. Command enable-secure-admin executed successfully.
Redemarrer le domaine
Terminal
glassfish# /usr/local/glassfish/v4/bin/asadmin stop-domain gpod Waiting for the domain to stop . Command stop-domain executed successfully. glassfish# /usr/local/glassfish/v4/bin/asadmin start-domain gpod Waiting for gpod to start ........ Successfully started the domain : gpod domain Location: /usr/local/glassfish/v4/glassfish/domains/gpod Log File: /usr/local/glassfish/v4/glassfish/domains/gpod/logs/server.log Admin Port: 4848 Command start-domain executed successfully.
Configuration du domaine
Ouvrer un navigateur et connecter vous à l'interface d'administration de glassfish : https://serveurgpod:4848
Identifier vous :
User Name: admin
Password: mot de passe saisi pendant l'installation