Based on SkylineGlobe Server Edge for Windows, SkylineGlobe Server Edge for Linux also requires no installation or web server software. SkylineGlobe Server Edge for Linux has been thoroughly tested and verified on the Ubuntu and SUSE distributions, assuring reliable performance. Support for other Linux distributions is also available.
To run SkylineGlobe Server Edge for Linux, perform the following steps:
Installing Wine
Wine creates a .wine directory in your Linux home folder, featuring a virtual drive_c that emulates a Windows environment, enabling the installation and running of Windows applications, in our case SkylineGlobe Server, within Linux. This structure mimics a typical Windows file system, providing compatibility for many Windows programs on a Linux system.
- Installing Wine in Ubuntu
- Installing Wine in SUSE
To install Wine in Ubuntu:
- Execute each of the following commands in the terminal (See https://wiki.winehq.org/Ubuntu for more information). Note that you may be asked to restart services during installation. Choose OK if prompted.
sudo dpkg --add-architecture i386
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt-get update
sudo apt-get -y install --install-recommends winehq-staging #wine-9.0-rc2
wineboot
To install Wine in SUSE:
- Execute each of the following commands in the terminal. Note that when running sudo zypper refresh, choose 'a' if you're asked during the process to choose an option.
sudo zypper install dpkg
sudo dpkg --add-architecture i386
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo zypper addrepo https://download.opensuse.org/repositories/Emulators/15.4/Emulators.repo
sudo zypper refresh # Choose 'a' when prompted.
sudo zypper install wine-9.0~rc2-lp154.1070.1.x86_64 # Choose solution number ‘2’ in the menu.
wineboot
Installing and Running SGS Edge
To install:
- Open the terminal, and type the following command to navigate to the Wine C Drive:
cd ~/.wine/drive_c
- Download SGS-Edge.zip from the provided URL using the following command:
wget 'https://[URL]/SGS-Edge.zip'
- Install an Unzip Tool (If not already installed). Depending on your Linux distribution, use one of the following commands:
-
Ubuntu:
sudo apt-get -y install unzip
-
SUSE:
sudo zypper install unzip
Note: You may be asked to restart services. Select OK if prompted.
-
Ubuntu:
- Unzip the downloaded file using the following command:
sudo unzip SGS-Edge.zip
- Grant read, write, and execute permissions to the user, group, and others for the 'SGS-Edge' directory and all its contents:
sudo chmod -R ugo+rwx SGS-Edge
- Place the SkylineGlobe license file (SLSkylineGlobeServer.lic) in the SGS directory (under the SGS-Edge directory).
Note: If using a floating license, an SLFloat.xml file that includes your server URL and the access token received with your Cloud subscription must be saved next to the SLSkylineGlobeServer.lic file in the SGS directory (under the SGS-Edge directory). To create this file manually, create an XML file called SLFloat.xml, that contains the following line (replace [YOURTOKEN] with your access token received with your Cloud subscription):<Floating><ServerUrl>https://[URL]/sws/[YOURTOKEN]/Client/ClientCalls.aspx</ServerUrl></Floating>
- If running SkylineGlobe Server Edge for Linux on a single computer, do the following:
- In the terminal, navigate to the SGS-Edge directory and then run the batch file provided with SGS Edge, which is intended to start the SGS application:
cd ~/.wine/drive_c/SGS-Edge
./Start_SGSEdgeOnLinux.sh & disown - After running the Start_SGSEdgeOnLinux.sh script, access SGS via the default URL: http://localhost:8080/sg. Note the lower case sensitivity on the sg. To change the default port, follow these steps:
- Ensure you're in the correct directory (~/.wine/drive_c/SGS-Edge). Open the Internal_SGSEdgeStart.bat in Vim for editing.
vim ./Internal_SGSEdgeStart.bat
- Add the following line to change the port to your desired port number:
"%~dp0\Mono\bin\mono.exe" %MONO_OPTIONS% "%~dp0\SGSEdge.exe" --sgs_port=[desired port number] %*^
-
Save the changes and exit the editor.
- Ensure you're in the correct directory (~/.wine/drive_c/SGS-Edge). Open the Internal_SGSEdgeStart.bat in Vim for editing.
- To stop SGS, navigate to the SGS-Edge directory in the terminal, and run the following command:
cd ~/.wine/drive_c/SGS-Edge
./Stop_SGSEdgeOnLinux.sh
- In the terminal, navigate to the SGS-Edge directory and then run the batch file provided with SGS Edge, which is intended to start the SGS application:
- If running SkylineGlobe Server Edge for Linux on a server cluster, do the following:
Set up the First Instance- Install a Network File System (NFS) kernel server to create a shared directory (in this case, the 'DB' directory within the SGS installation) that all instances in the cluster can access and modify.
Ubuntu:sudo apt-get -y install nfs-kernel-server
SUSE:sudo zypper install nfs-kernel-server
- Configure a shared directory: Open the NFS exports file in Vim to add the DB directory to the list of shared resources:
sudo vim /etc/exports - Edit the NFS exports file: Press Insert on your keyboard to start editing, and then add your line:
Ubuntu:/home/ubuntu/.wine/drive_c/SGS-Edge/DB *(rw,sync,no_subtree_check)
SUSE:/home/ec2-user/.wine/drive_c/SGS-Edge/DB *(rw,sync,no_subtree_check)
- Press Esc on your keyboard to exit insert mode.
- Type ':x' and press Enter on your keyboard to save the file and exit Vim.
- Restart NFS Server:
sudo systemctl restart nfs-server
- Run SGS:
cd ~/.wine/drive_c/SGS-Edge
./Start_SGSEdgeOnLinux.sh & disown
- Install a Network File System (NFS) kernel server to create a shared directory (in this case, the 'DB' directory within the SGS installation) that all instances in the cluster can access and modify.
Set up Additional Instances in the Cluster
-
- On each of the additional instances, you need to install NFS client utilities to allow the instance to access the shared NFS directory.
Ubuntu:sudo apt-get -y install nfs-common
SUSE:sudo zypper install nfs-common
- Change to the directory where SGS is installed or where you want it installed:
cd ~/.wine/drive_c/SGS-Edge
- If a local 'DB' directory already exists, rename or move it to back it up. This is to ensure no conflicts with the shared 'DB' directory.
mv DB DB-BACKUP
- Create a new 'DB' directory to mount the shared NFS directory:
mkdir DB
- Mount the shared 'DB' directory from the primary instance. Replace [First_Instance_IP] with the IP address of the primary instance and adjust the path according to your setup.
Ubuntu:sudo mount -t nfs [First_Instance_IP]:/home/ubuntu/.wine/drive_c/SGS-Edge/DB ~/.wine/drive_c/SGS-Edge/DB
SUSE:sudo mount -t nfs [First_Instance_IP]:/home/ec2-user/.wine/drive_c/SGS-Edge/DB ~/.wine/drive_c/SGS-Edge/DB
- Similar to the first instance, start the SGS application. These commands do the following: (1) suppress all debug messages from Wine, making the output cleaner, (2) run the SGS Edge batch file using Wine, which allows Windows applications to run on Linux, and finally, (3) run the command in the background and disown it from the terminal, so SGS continues to run even if the terminal is closed.
cd ~/.wine/drive_c/SGS-Edge
./Start_SGSEdgeOnLinux.sh & disown
- On each of the additional instances, you need to install NFS client utilities to allow the instance to access the shared NFS directory.
Using NGINX as a Reverse Proxy for HTTPS Clients
SkylineGlobe Server Edge for Linux natively supports HTTP. To serve content over HTTPS, implement NGINX as a reverse proxy. This setup allows HTTPS clients, like TerraExplorer Fusion, to securely connect to the server.
To use NGINX as a reverse proxy:
- Copy your SSL certificate and private-key files into ~/.wine/drive_c/SGS-Edge/nginx/ssl. These certificates enable secure HTTPS connections. Replace [your-certificate] and [your-private-key] with your actual file names.
cp [your-certificate].crt ~/.wine/drive_c/SGS-Edge/nginx/ssl
cp [your-private-key].txt ~/.wine/drive_c/SGS-Edge/nginx/ssl - Navigate to the NGINX directory:
cd ~/.wine/drive_c/SGS-Edge/nginx.
- Open the NGINX configuration file (sgs_linux.conf) with Vim:
sudo vim conf/sgs_linux.conf.
- Configure SSL and gateway settings: Press Insert on your keyboard to edit (this switches Vim to insert mode, allowing you to edit the file). Locate the server block in your configuration file and configure SSL by replacing the following variables with your specific details:
- SERVER_NAME$ with your external hostname (e.g., my.host.com).
- $CRT_FILENAME$ with your certificate (.crt) file name.
- $PRIVATE_KEY_FILENAME$ with your private key file name. - Press Esc on your keyboard to exit insert mode. Then type :x and press Enter to save the changes and exit Vim.
- Start NGINX as a reverse proxy, directing HTTPS traffic to the SkylineGlobe Server:
export WINEDEBUG=-all; wine nginx.exe -c conf/sgs_linux.conf -g "daemon off;" & disown
- To stop NGINX:
sudo pkill nginx.exe