Table of Contents

Open Source

GPHUD is now open sourced at GitHub

Building From Scratch

Server Side Code

This details deploying the code base from scratch

You can bypass this step entirely by downloading the package file attached to GPHUD. You may also wish to “star/watch/whatever” this project to get notifications when a new release is made.

You will need

Compiling Code

Server Installation

The process for starting the server is to just run the JAR file with a properties passed in.

Please see SLCore repository for an example.properties file, the file is documented but at a minimum you'll need to specify:

You can ignore the later secionts about JSLBotBridge and LSLR

You should be able to web browse to its port (HTTP).

Bootstrapping the system

You need to add a basic record to the user table in the SL database You can either use a database editor of your choice - create a new row containing a username (your avatar name), an avatarkey, a developerkey and set superadmin to 1 and lastactive to 0

insert into users(id,username,avatarkey,superadmin,lastactive,developerkey) values(1,'Bob Smith','12345678-90ab-cdef-1234-567890abcdef',1,0,'LONG-RANDOM-SECRET-STRING-HERE (32-64 chars)');

In World Resources

Configure your Firestorm (Prefernces, Firestorm→Preprocessor build path) to point to where you checked out the 3 Git repositories (you need at least SLCore and GPHUD).

Copy “configuration.lsl” from the SLCore repository and place it in the directory above (Where your checked out repositories live, and the folder above in Firestorm is pointing)

GPHUD Region Server

GPHUD Item Giver

GPHUD Remote Dispenser

GPHUD Titler

GPHUD

OpenSim setup, from scratch

Assumed starting point:

Your sim and server can be the same, they can be different, in my walkthrough, they are different. I will be using a VM called “gphudtest.coagulate.net” to run the server software.

Throughout this documentation I will refer to 3 machines

Unix operations are presumed to be performed as a normal user (don't run GPHUD as root). It is assumed you have sudo access during the setup. You can use root logins and su down for the non root parts if you prefer.

Preparing the server

Install software incl mysql 5.7

sudo sh -c 'echo deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config >>/etc/apt/sources.list.d/mysql.list'
sudo sh -c 'echo deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7 >>/etc/apt/sources.list.d/mysql.list'
sudo sh -c 'echo deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools >>/etc/apt/sources.list.d/mysql.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5
sudo apt-cache policy mysql-server
sudo apt-get install apache2 default-jre mysql-server=5.7.31-1ubuntu18.04 mysql-community-server=5.7.31-1ubuntu18.04 mysql-client=5.7.31-1ubuntu18.04

Download all the relevant software - see [https://github.com/CoagulateSL/GPHUD/releases/latest https://github.com/CoagulateSL/GPHUD/releases/latest] for latest release

wget https://github.com/CoagulateSL/GPHUD/releases/download/3.16.12/GPHUD-3.16.12-jar-with-dependencies.jar
git clone https://github.com/CoagulateSL/WebResources
wget https://raw.githubusercontent.com/CoagulateSL/SLCore/master/example.properties
mv example.properties gphudtest.properties

Configuring the database and application connecton

Set up the database, schemas, and db user

mysql -u root -p -e 'create database sl';
mysql -u root -p -e 'create database gphud';
wget https://raw.githubusercontent.com/CoagulateSL/SLCore/master/slcore-schema.sql -O- -q|mysql -u root -p sl
wget https://raw.githubusercontent.com/CoagulateSL/GPHUD/master/gphud-schema.sql -O- -q|mysql -u root -p gphud
mysql -u root -p -e "create user gphud@localhost identified by 'mypass'"
mysql -u root -p -e 'grant all on sl.* to gphud@localhost'
mysql -u root -p -e 'grant all on gphud.* to gphud@localhost'

Configure the properties file with the following settings

Start the server

java -jar GPHUD-3.16.12-jar-with-dependencies.jar gphudtest.properties

Configuring the apache proxy

Install the apache config sudo wget https://raw.githubusercontent.com/CoagulateSL/SLCore/master/example-apache.conf -O/etc/apache2/sites-enabled/gphud.conf Edit this file (/etc/apache2/sites-enabled/gphud.conf) and change

Enable SSL + proxying in apache

At this point, you should be able to browse to http://gphudtest.coagulate.net/ (or whatever) and load your index page.

Bootstrapping the permissions system

One last thing, we bootstrap our avatar name/UUID as a super user with a dev key

mysql -u root -p sl -e "insert into users(id,username,avatarkey,superadmin,lastactive,developerkey) values(1,'iain maltz','cb191fe5-0941-46e6-81b9-c57431fd0ee4',1,0,'MAUISfh9udhwue9AS9b39qubf9udba');"

Creating the in-world resources

Edit it as follows:

(Just remove the at the start of #define NOEXPERIENCES) * #include “SLCore/LSL/SecondLifeConstants.lsl”

Go to firestorm, preferences, firestorm, build 1, and set the preprocessor include path to the folder containing the configuration.lsl file, SLCore and GPHUD folders

Build all the objects as detailed earlier on

Say **createinstance Test near your newly forged Region Server, observe the successful result.

60 seconds later, click the Region Server to obtain a HUD.

OpenSim Bonus

While opensim doesn't have Experience support used for the auto attachment in Second Life, it does have the ability to bypass permissions checking for the region/estate owner/managers

set auto_grant_attach_perms true