JW Regional Convention application that allows air-gapped instant messaging, synchronised countdown timer for simultaneous playing of media, and optional clock display for platforms.
The app is based on a LAMP stack alog with websockets. Deploying the application can be approached in two ways:
- Use the provided custom OS as a virtual machine (VM). It has all the apache, mariaDb and php packages required.
- Use a Linux OS of your choice. All package will ned to be instaleld manually. (I provide an example using openSUSE, but as this will vary between OSes - it is just a guide to find your local OS' equivalent packages)
The custom OS is available as a KVM/XEN, VMware and VirtualBox hard disk image file.
- Choose "import existing disk image". Select the qcow disk.
- Create an appliance with 1x vCPU @ 2GHz, 2GB RAM
- Create a new VM. During the creation wizard, delete the hard disk so that one is not automatically created.
- 1x vCPU @ 2GHz, 2GB RAM
- Once created, browse to the ESXI's datastore and upload the vmdk to the folder of the new VM
- Edit the VM, "Add Hard Disk" > "Existing Hard Disk" > Select the uploaded vmdk.
- Use the vmdk or convert the qcow.
- Create a VM as per VMware or KVM
- Recommend network adaptor is using Bridge
- Once the VM has been created, connect to it via console and complete the intial start wizard.
- After the inital start wizard, you should see the IP address obtained via DHCP. This shows that the ethernet is working.
- Login using
rootand the passwod you chose during the inital wizard. - Create a normal user account (e.g. chat) that can be used for SSH access:
useradd -m chat
password chat - update the OS
sudo zypper ref
sudo zypper up - copy the
appfolder to the VM, then run the following commands (or git clone):cd app/
sudo sh setup.sh - The script will install the services, firewall rules and MySQL database
- Note that currently an extra step is needed - specifying the server's IP address for the websocket service. (You can also just edit chat_init.php before copying it across):
sudo vi /srv/www/htdocs/chat_init.php
- Update
$local_ipto = IP of your VM - Reboot the VM
sudo init 6
See Setup below for next steps
This provides an example using the openSUSE OS.
sudo zypper ref
sudo zypper up
sudo zypper in apache2 apache2-prefork apache2-utils libapr1 libapr-util1 libbrotlienc1 system-user-wwwrun
sudo zypper in php8 php8-cli apache2-mod_php8 php8-mysql php8-pdo
sudo zypper in libaio1 libJudy1 libmariadb3 libodbc2 mariadb mariadb-client mariadb-errormessages python3-mysqlclient
sudo zypper in mariadb-tools perl perl-DBD-mysql perl-DBI
sudo zypper in php8-sockets sudo zypper in sudo sudo zypper in git git-core libsha1detectcoll1 perl-Error perl-Git
With the necessary packages installed, you can follow similar steps as above:
- copy the
appfolder to the VM, then run the following commands:cd app/
sudo sh setup.sh - The script will install the services, firewall rules and MySQL database
- Note that currently an extra step is needed - specifying the server's IP address for the websocket service. (You can also just edit chat_init.php before copying it across):
sudo vi /srv/www/htdocs/chat_init.php
- Update
$local_ipto = IP of your machine - Reboot your machine
See Setup below for next steps
Setup is quite straightforward:
- Load the webpage in a browser (http://ip-of-machine)
- In the bottom right-hand corner is a "Settings" button
- In Settings, set Banner text, add Languages
- Browse to Home, and access the "ChatApp" button.
- Select a language and department, then test the interface
If you want to use a custom user handle (Program Overseer, Platform, AV, etc), use a custom URL:
http://192.168.1.67/chat.php?user=Afrikaans_PO
In this example:
- The chat app server has an IP address of 192.168.1.67
- The custom user handle is Afrikaans_PO
There are two websocket servers running as services. You can view running errors with the commands sudo systemctl status myphpsocket1.service and sudo systemctl status myphpsocket2.service.
Socket1 serves the instant messages. Socket2 serves the countdown timer and presence update.
Historical logs can also be viewed by running sudo less /var/log/messages.
View Apache2 and PHP errors with sudo less /var/log/apache2/error_log
