1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
[glassfish@test-ap-150 ~]$ export JAVA_HOME="/usr/local/lib/jvm/jdk-17-lasted"
[glassfish@test-ap-150 ~]$ java -version
-bash: java: command not found
[glassfish@test-ap-150 ~]$ export PATH=${PATH}:${JAVA_HOME}/bin
[glassfish@test-ap-150 ~]$ java -version
openjdk version "17.0.17" 2025-10-21
OpenJDK Runtime Environment Temurin-17.0.17+10 (build 17.0.17+10)
OpenJDK 64-Bit Server VM Temurin-17.0.17+10 (build 17.0.17+10, mixed mode, sharing)
[glassfish@test-ap-150 ~]$ /opt/glassfish7/bin/asadmin start-domain
Waiting until start of domain domain1 completes................ ... finished after 15399 ms.
Successfully started the domain domain1.
Location: /opt/glassfish7/glassfish/domains/domain1
Log File: /opt/glassfish7/glassfish/domains/domain1/logs/server.log
The pid file /opt/glassfish7/glassfish/domains/domain1/config/pid contains pid 1860.
Process with pid 1860 is alive
Admin Endpoints:
http://localhost:4848 is reachable.
Command start-domain executed successfully.
[glassfish@test-ap-150 ~]$ /opt/glassfish7/bin/asadmin change-admin-password
Enter admin user name [default: admin]>
Enter the admin password>
Enter the new admin password>
Enter the new admin password again>
Command change-admin-password executed successfully.
[glassfish@test-ap-150 ~]$ /opt/glassfish7/bin/asadmin change-admin-password
Enter admin user name [default: admin]>
Enter the admin password>
Enter the new admin password>
Enter the new admin password again>
Command change-admin-password executed successfully.
[glassfish@test-ap-150 ~]$ /opt/glassfish7/bin/asadmin enable-secure-admin
Enter admin user name> admin
Enter admin password for user "admin">
You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully.
[glassfish@test-ap-150 ~]$ /opt/glassfish7/bin/asadmin restart-domain
Stopping local domain on admin endpoint localhost:4848
Waiting for process with pid 1860 to stop. ... finished after 868 ms.
Waiting for the new PID................... ... finished after 18980 ms.
Waiting until start of domain domain1 completes. ... finished after 19 ms.
Successfully started the domain domain1.
Location: /opt/glassfish7/glassfish/domains/domain1
The pid file /opt/glassfish7/glassfish/domains/domain1/config/pid contains pid 2255.
Process with pid 2255 is alive
Admin Endpoints:
http://localhost:4848 is reachable.
Command restart-domain executed successfully.
[glassfish@test-ap-150 ~]$
|