The most important command that you will be executing is the
asadmin
command located in the bin
subfolder
of the glassfish4
folder.
gshute@ukko:~/local2/glassfish4$ ls -F bin
asadmin* asadmin.bat* pkg* pkg.bat* updatetool* updatetool.bat*
You will be staying in the glassfish4
folder in most of
what follows so you will need to invoke this command as
bin/asadmin
subcommand.
It has several subcommands that are used in following sections.
You will need an unused port for the Derby database. I suggest that teams start off trying the following port numbers.
Team | Port |
---|---|
1 | 16010 |
2 | 16020 |
3 | 16030 |
4 | 16040 |
5 | 16050 |
When you start the GlassFish Derby database a new databases
folder will be created as a subfolder of the
glassfish4/glassfish
folder.
Before you do this there is no such folder.
gshute@ukko:~/local2/glassfish4$ ls -F glassfish
bin/ config/ docs/ domains/ legal/ lib/ modules/ osgi/
The port number you are trying should replace the 12047 in the following script.
gshute@ukko:~/local2/glassfish4$ bin/asadmin start-database --dbport 12047 Starting database in Network Server mode on host 0.0.0.0 and port 12047. most of command output omitted Starting database in the background. Log redirected to /home/csfaculty/gshute/local2/glassfish4/glassfish/databases/derby.log. Command start-database executed successfully.
If the command does not execute successfully try again with the port number incremented.
When you have successfully started the database you should record the port number. You will want to use it again if you ever have to restart the database.
After the database is started you should see the new
databases
subfolder.
gshute@ukko:~/local2/glassfish4$ ls -F glassfish bin/ config/ databases/ docs/ domains/ legal/ lib/ modules/ osgi/ gshute@ukko:~/local2/glassfish4$ ls -F glassfish/databases derby.log