Linux: Installation

Note: we recommend using the Stelo Replicator Linux Container, as described in Quick Start Guide to Using the Stelo Replicator Linux Container.  The information below is for installing SQDR on your own Linux system, and may out of date.

See the Quick Start Guide to using SQDR on Linux for the latest version of this topic, superseding the information below.

System requirements:

Currently you will need to download and install the packages listed below.

Eventually we will create RPM's for all packages and introduce dependencies so you just type "rpm -i sqdr<version>.rpm" and all the dependencies will be automatically installed.

In approximate order of installation:

* set up yum repository for Microsoft and install at least the SQL Server ODBC driver (also SQL Server itself if desired).  This pulls in the dependency of the Microsoft packaging of unixODBC 2.3.7.  The distro packaging of unixODBC 2.3.7 should also work.

Also download & install Powershell (from Microsoft) if desired.

The following can be installed in any order:

Installation and configuration for all ODBC drivers are covered in the Linux ODBC Drivers section.

SQDR itself should be installed after StarSQL and SQDR_ODBC.

Details

Create user "sqdr" - no special requirements

Install Microsoft SQL Server ODBC driver

https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15

curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
sudo ACCEPT_EULA=Y yum install -y msodbcsql17

(this will also install unixODBC 2.3.7)

# optional: for bcp and sqlcmd

sudo ACCEPT_EULA=Y yum install -y mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

# optional: yum install powershell

Install StarSQL

# rpm -U starsql64-6.50-1.x86_64.rpm

Confirm that 2 StarSQL entries (StarSQL64 and StarSQL (64-bit)) have been added to /etc/odbcinst.ini

Install StarLicense Server (if necessary)

You can choose to install a StarLicense Server (either on the system running SQDR, or another Windows or Linux system) or use node-locked licensing.

See the Quick Start Guide to Using StarLicense for UNIX.

You can use wget to download from downloads.stelodata.com

expand the tar file and run setup

Use /usr/share/starlicense64/configure to add licenses for SQ, DR, DD, and $*

Make sure the service is running.

Configure StarLicense service to start at boot.

Configure licensing on the SQDR system

Node-locked licensing:  Use /opt/starsql64/bin/config-lic to configure node-locked licensing.

If you are using a StarLicense Server: Use either /usr/share/starlicense64/configure or /opt/stelo/starsql64/bin/config-lic to configure the client-server connections for the 4 license types.

Install SQDR ODBC

rpm -U sqdr_odbc<version>.rpm

Configure Environment Variables

Set the following environment variables when starting the SQDR service:

SQDR Salesforce:

export LD_LIBRARY_PATH=/usr/lib/jvm/jre/lib/amd64;/usr/lib/jvm/jre/lib/amd64/server
export CLASSPATH=/opt/StarQuest/sqdr_odbc/java/lib/sforce.jar

Install StarAdmin (if necessary)

You only need to install the StarAdmin package if all the following conditions are met:

Note that you will need a GUI environment (e.g. VNC or access to the console) to run StarAdmin.

 

Test ODBC drivers

This is a good point to make sure the drivers are installed and licensed.  You can use $STARSQL/bin/simpleconn or isql (part of unixODBC) for testing. Create ODBC data sources with a text editor or use a connection string with isql.

Note that the bundled drivers will connect but may issue a warning that they are licensed only for use with SQDR. That license warning is issued for every 100 rows selected after a fetch, so avoid doing something like a SELECT of a large table when verifying connectivity.

Install SQDR

Use RPM to install SQDR/Linux itself.  The program objects end up in /opt/StarQuest/sqdr, and volatile configuration objects are in /var/sqdr.

The installer creates /var/sqdr/sqdrsvcreg.conf, which is the equivalent of the registry entry HKLM/Software/StarQuest/SQDR - it contains the install location, version information, and can optionally be used to request debug information.

Create a control database

see Linux: Control Database for more detailed documentation.

There are many paths here, but for the case of a local Db2 control database, here are the steps:

Otherwise, you can do the following to create a local Db2 control database named SQDRC

db2 create db SQDRC
db2 connect to SQDRC
db2 grant dbadm on database to user 'sqdr'
db2 disconnect all

run StarAdmin to bind StarSQL packages

On the Windows system with drmgr or full SQDR package:

  1. If you are using the full SQDR package on Windows and have a local SQDR service, save a copy of C:\ProgramData\StarQuest\sqdr\sqdr.properties, as it will get overwritten by SQDR Conf.

  2. Run SQDR Conf

  3. Connect to SQDRC on the Linux system.  Use user "sqdr" for credentials.

  4. Create control tables

  5. ignore the errors about service not found

  6. At the end of SQDR Conf, copy sqdr.properties from C:\ProgramData\StarQuest\sqdr to /var/sqdr on the Linux system

  7. If you are using the full SQDR package on Windows and have a local SQDR service, do not start service and manager at the end of SQDR Conf.  Instead, revert to your saved copy of sqdr.properties before starting the service.

Start the service

With the control tables and /var/sqdr/sqdr.properties in place, you are now ready to start the service.

 

Connect Data Replicator Manager

  1. Confirm that ports 7737 & 7738 are not blocked by a firewall

  2. Run drmgr from a Windows system and choose "Add Server".

  3. You can also run SQDRProps and PowerShell from a Windows system.