Overview

  • This guide describes the installation steps for the SQream SQL Editor.

  • SQream SQL Editor is a web-based database editor for the SQream database and currently supports the Chrome browser only.

  • Operation System must be Centos 7.3

1. Prerequisites

1.1. OS Centos 7.3

Make sure you install the SQream SQL Editor on a Centos 7.3 machine.

1.2. Install Node.js

If you haven’t done so, install Node.js. In case you installed the SQream Administration Dashboard, you already have Node.js in place.

Node.js is an open source server framework. It allows you to run JavaScript on the server.

If your PC has internet access you can install it directly from there (Option 1). If your PC doesn’t have internet access you have to first download it and then install it (Option 2).

1.2.1. Option 1 - with Internet access

If your PC has internet access perform the following:

curl -sL https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum install -y nodejs

1.2.2. Option 2 – no Internet access

Download the latest version of node.js and then copy it onto the machine you want to install the Dashboard.

Install:

tar xzvf node-v8.9.3.tar.gz && cd node-v8.9.3
./configure
make
sudo make install

1.3. Install PM2 - Node Daemon Manager

If you haven’t done so, install Node Daemon Manager. In case you installed the SQream Administration Dashboard, you already have Node Daemon manager in place.

Install the Node Daemon Manager:

sudo yum update openssl
sudo npm install pm2 -g

2. Deployment Steps

2.1. Install the SQL Editor application

From this step onward, use the sqream user on your system:

su sqream
cd ~

Copy the application tar file to the folder you would like to install the SQream SQL Editor to. Typically, this would be /home/sqream

Untar (extract) the package into the user home directory. This opens the application into the sqream_editor directory. Typically, this would be /home/sqream/sqream_editor

For example:

tar -xvf editor-v0.9.3.tar.gz

2.2. Copy the SQL Editor configuration file

The editor configuration file is part of the installation package. Location: ~sqream_editor/config/default/uiEditorConfig.json

Copy the uiEditorConfig.json file into the /etc/sqream directory. This is the folder where typically all SQream related configuration files are stored.

For example:

sudo cp ~/sqream_editor/config/default/uiEditorConfig.json /etc/sqream/

2.3. Setup the SQL Editor configuration file

Edit the uiEditorConfig.json and configure the following setting to match your local system:

  • disabledSetSessionTag - If this flag is set to true, internal DB statements performed by the SQL Editor are not written to the statement log of the SQream server.

  • remoteLoginAvail - Allows remote login of SQL Editor to SQream DB. If set to false, the SQL Editor can logon to a local SQream DB only (SQream DB and SQL Editor on same machine). If true, the SQL Editor performs logon to a dedicated SQream server (remote), using the host, port and cluster configuration parameters of the file.

  • treeCatalogDisplay - possible values: “everybody” or “nobody”. Allows to display or hide the System Views (sqream_catalog) from the left tree.

3. Test the installation

After the installation, test the SQL Editor application by starting it manually:

NODE_ENV=production node ~/sqream_editor/server.js

Using Chrome browse to:

http://{server_ip}:3000

Make sure the logon screen appears and you can log on to the editor application using user sqream, password sqream (this is the built-in user for the SQream DB).

4. Start or stop the SQL Editor application

To start the node server as a service run the following command:

NODE_ENV=production pm2 start sqream_editor/server.js --name sqream_editor

To stop the node server run the following command:

NODE_ENV=production pm2 stop sqream_editor/server.js --name sqream_editor

Copyright © 2010-2018. All rights reserved.

This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchant- ability or fitness for a particular purpose.

We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document.

This document may not be reproduced in any form, for any purpose, without our prior written permission.