[TemplateLabServerDatabase.htm - uqlpayne 29 Jul 2013]
PostgreSQL 9.2 is installed and running.
The UQ-iLab-BatchLabServer-Java GitHub repository has been downloaded as a ZIP file from:
https://github.com/uqlpayne/UQ-iLab-BatchLabServer-Java
Run the PostgreSQL pgAdmin III program.
In the Object browser panel, right-click PostgeSQL 9.2 (localhost:5432) and select Connect from the popup menu to display the Connect to Server window.
Enter the password for the user postgres and click the OK button.
In the Object browser panel, right-click Group Roles and select New Group Role... from the popup menu to display the New Group Role... window.
For Role name, enter LabServerGroup
.
Click the OK button to close the New Group Role... window.
In the Object browser panel, right-click Login Roles and select New Login Role... from the popup menu to display the New Login Role... window.
Select the Properties tab. For Role name, enter LabServer
.
Select the Definition tab. For Password and Password (again),
enter ilab
.
Select the Role membership tab. In the left panel under Not Member, select LabServerGroup and click the >> button.
Click the OK button to save the changes and close the New Login Role... window.
In the Object browser panel, right-click Databases and select New Database... from the popup menu to display the New Database... window.
Select the Properties tab. For Name, enter Template_LabServer
.
Click the OK button to save the changes and close the New Database... window.
In the Object browser panel, under Databases, click Template_LabServer and then click the Execute arbitrary SQL queries toolbar button to open a Query window.
Check that the Template_LabServer database is selected in the dropdown list. If not, tables and functions will be created or overwritten in the selected database.
For each of the following SQL scripts in the UQ-iLab-BatchLabServer-Java/Database/PostgreSQL folder, in the order shown, execute the query by selecting Query->Execute from the menu.
All queries should complete successfully producing various results in the Output pane. Close the Query window.
In the Object browser panel, expand the Template_LabServer node and then expand the Schemas node. Finally, expand the public node so that Functions, Sequences and Tables are visible.
Right-click Functions and select Grant Wizard... from the popup menu to display the Privileges for functions window.
Select the Selection tab and click the Check all button.
Select the Privileges tab. In the Privileges field, select group LabServerGroup from the dropdown list and check EXECUTE.
Click the Add/Change button.
Click the OK button to save the changes.
Click the Done button to close the Privileges for functions window.
In the Object browser panel, right-click Sequences and select Grant Wizard... from the popup menu to display the Privileges for sequences window.
Select the Selection tab and click the Check all button.
Select the Privileges tab. In the Privileges field, select group LabServerGroup from the dropdown list and check ALL.
Click the Add/Change button.
Click the OK button to save the changes.
Click the Done button to close the Privileges for sequences window.
In the Object browser panel, right-click Tables and select Grant Wizard... from the popup menu to display the Privileges for tables window.
Select the Selection tab and click the Check all button.
Select the Privileges tab. In the Privileges field, select group LabServerGroup from the dropdown list and check ALL.
Click the Add/Change button.
Click the OK button to save the changes.
Click the Done button to close the Privileges for tables window.