Close menu

SQL/R A.04.00 Installation on Linux

This document contains installation instructions specific to the Linux platform.

Supported Linux releases

SQL/R is not distribution specific, however it was only tested against selected SUSE Linux and RedHat Linux distributions. Other Linux distributions are expected to work but have not been tested and may require additional manual configuration steps after installation if the distribution does not implement LSB compatibility.

The following prerequisites must be met:

Installation directory

Starting with SQL/R A.04.00, multiple SQL/R versions may be installed and used in parallel. Each major version is installed into a separate directory while minor updates will update an existing version.

The SQL/R A.04.00 software is installed in the "/opt/sqlr/4.0/" directory. The SQL/R configuration files are installed in the "/etc/opt/sqlr/4.0/" directory.

The installation procedure retains the configuration of a previous SQL/R release. Modified configuration files are not deleted.

Installation

SQL/R is available as an RPM package. SQL/R packages are also released in the deb format for use by Debian and derived distributions.

The preferred option for installation on the Linux platform is to use the package repository. Using a repository will resolve any package dependencies and also make it easy to install updates once available. Depending on the Linux distribution, yum/dnf, zypper or apt is used.

Please refer to the Red Hat, SUSE and Debian/Ubuntu notes how to install SQL/R from a package repository.

The SQL/R package file may also be downloaded and installed separately. This may be required if the system has no connection to the Internet.

Installing the RPM archive

Different builds of the SQL/R software are available. Please choose the appropriate version that corresponds with your system:

SQLR-A04xx-*.x86_64.rpm
SQL/R rpm file (x86_64, 64 bit)
This build requires a 64 bit OS running on AMD64/EM64T (x86_64) based systems. Includes support for 32 bit x86 applications.

The asterisk (*) denotes the version of the RPM archive. Higher numbers indicate a newer installation archive.

Installing the RPM archive

To install SQL/R execute the command below. This example uses the 64 bit x86_64 build.
rpm -i SQLR-A0400-*.x86_64.rpm

systemd is used preferably to manage the SQL/R sqlrodbc service. This is used for new installations if the file /etc/init.d/sqlr40 is not present during installation or update. Otherwise any existing SYSV start/stop scripts are retained.

Installation of automatic startup of SQL/R servers during boot is only performed for SUSE, RedHat, Debian or LSB compliant distributions. If using another Linux distribution, the startup and shutdown scripts need to be added manually. Template files are provided in the directory /opt/sqlr/4.0/newconfig/startup.

Automatic startup of SQL/R server processes during system boot is configured with systemd

systemctl enable sqlr40.service
with the system/V scripts the /etc/sysconfig/sqlr40 configuration file is used.

Updating from a previous SQL/R release

A previous SQL/R release is replaced when updating to SQL/R A.04.00. The configuration of a previous SQL/R release is retained.

To update an existing SQL/R installation, please shut down SQL/R using the command below:

systemctl stop sqlr40
- or -
/etc/init.d/sqlr40 stop
Then update the RPM archive.
rpm -U SQLR-A0400-2.x86_64.rpm
If necessary, update the license key. After the update has finished SQL/R can be started with the command below:
systemctl start sqlr40
- or -
/etc/init.d/sqlr40 start

Automatic startup of SQL/R server processes during system boot is configured with systemd (systemctl enable sqlr40.service) or using the /etc/sysconfig/sqlr40 configuration file.

Uninstalling SQL/R A.04.00

To uninstall SQL/R A.04.00 from your system, please make sure the software is not currently used. The following command may be used to shut down the SQL/R background processes.
systemctl stop sqlr40
- or -
/etc/init.d/sqlr40 stop
The software is removed using the rpm utility. Please login as root and execute rpm as below
rpm -e SQLR.A0400
Please note that any modified configuration files (typically customized configuration files) are not removed. If necessary they need to be removed manually.


Red Hat (Fedora/RHEL/CentOS) specific notes

For RedHat or compatible distributions yum is used to manage packages. For Fedora 22 (or newer) the dnf command is used instead of yum.

Installation using the package repository
The recommended installation procedure uses the sqlr-beta repository to install and update the SQL/R release. The procedure below adds the sqlr-beta repository, imports the package signing key and installs the most recent SQL/R version.

Add the repository

yum-config-manager --add-repo \
    https://marxmeier.com/download/repo/rpm/sqlr-beta.repo
SQL/R uses a distinctive beta release repository. Please use the sqlr-beta.repo instead to subscribe to SQL/R beta test releases.

As an alternative to yum-config-manager the following commands may be used:

( cd /etc/yum.repos.d/ && wget \
    https://marxmeier.com/download/repo/rpm/sqlr-beta.repo )
Import the public key to verify package integrity and authenticity (recommeded but optional)
rpm --import \
    https://marxmeier.com/download/repo/rpm/RPM-GPG-KEY
Install SQL/R
yum install SQLR.A0400

Installation without a package repository
The yum (or dnf) command may also be used to install SQL/R without a package repository. The example below downloads the rpm archive and installs it. As an optional (but recommended) step the SQL/R package signing key is imported so the package integrity and authenticity can be verified.

Import the public key to verify package integrity and authenticity (recommeded but optional)

rpm --import \
    https://marxmeier.com/download/repo/rpm/RPM-GPG-KEY
Download and install the rpm file
yum install https://marxmeier.com/download/sqlr/A0400/linux/\
SQLR-A0400-2.x86_64.rpm 

The rpm file may also be downloaded and installed separately. This may be required if the system has no connection to the Internet. It is also recommended to download and import the package signing key as shown above.

yum localinstall SQLR-A0400-2.x86_64.rpm

The rpm command may also be used to install the SQL/R package. However, this requires to resolve any dependencies manually.

Installing the SQL/R 64-bit rpm on Fedora or RHEL 6 may require installation of the 32-bit glibc library to resolve a dependency error on glibc. The 64-bit SQL/R rpm includes some 32-bit libraries to allow interoperability with 32-bit applications. However, 64-bit Fedora or RHEL may not install the 32-bit glibc library. In this case please install the glibc.i686 package.


SUSE (openSUSE/SLES) specific notes

On SUSE and compatible distributions zypper is used preferably to manage packages.

Installation using the package repository
The recommended installation procedure uses the sqlr-beta repository to install and update the SQL/R release. The procedure below adds the sqlr-beta repository, imports the package signing key and installs the most recent SQL/R version.

Add the repository

zypper addrepo -f \
    https://marxmeier.com/download/repo/rpm/sqlr-beta.repo
SQL/R uses a distinctive beta release repository. Please use the sqlr-beta.repo instead to subscribe to SQL/R beta test releases.

Import the public key to verify package integrity and authenticity (recommeded but optional)

rpm --import \
    https://marxmeier.com/download/repo/rpm/RPM-GPG-KEY
Please note that some older rpm versions may not support fetching the key from a remote server. In this case please download the public key file and perform the rpm --import on the local file.

Install SQL/R

zypper install SQLR.A0400

Installation without a package repository
The zypper command may also be used to install SQL/R without a package repository. The example below downloads the rpm archive and installs it. As an optional (but recommended) step the package signing key is imported so the package integrity and authenticity can be verified.

Import the public key to verify package integrity and authenticity (recommeded but optional)

rpm --import \
    https://marxmeier.com/download/repo/rpm/RPM-GPG-KEY
Please note that some older rpm versions may not support fetching the key from a remote server. In this case please download the public key file and perform the rpm --import on the local file.

Download and install the rpm file

zypper install https://marxmeier.com/download/sqlr/A0400/linux/\
SQLR-A0400-2.x86_64.rpm 
The rpm file may also be downloaded and installed separately. This may be required if the system has no connection to the Internet. It is also recommended to download and import the package signing key as shown above.
zypper install SQLR-A0400-2.x86_64.rpm

The rpm command may also be used to install the SQL/R package. However, this requires to resolve any dependencies manually.


Debian/Ubuntu specific notes

The following notes apply to Debian or Linux distributions derived from Debian (such as Ubuntu).

Installation using the package repository
The recommended installation procedure uses the sqlr-beta repository to install and update the SQL/R release. The procedure below adds the sqlr-beta debian repository, imports the package signing key and installs the most recent SQL/R version.

To add the repository please add the .list file to /etc/apt/sources.list.d

( cd /etc/apt/sources.list.d && wget \
    https://marxmeier.com/download/repo/deb/sqlr-beta.list )

Import the repository signing key to the apt key ring. This is used to verify the integrity of the repository.

wget -O /etc/apt/trusted.gpg.d/eloquence.asc \
    https://marxmeier.com/download/repo/deb/signing.key
Refresh the apt cache and install SQL/R
apt-get update
apt-get install sqlr.a0400

Installation without a package repository
The SQL/R package file may also be downloaded and installed separately. This may be required on systems that are not connected to the Internet.

SQL/R does provide a Debian specific .deb installation package. You may install SQL/R with the command below:

sudo dpkg -i sqlr_4.00-2_amd64.deb
Please keep in mind that when installing packages manually (instead of using apt) any dependencies may need to be resolved manually. On x86_64 systems, installation of the ia32-libs or libc6:i386 package may be necessary as SQL/R supports both 32 bit and 64 bit applications:
sudo apt-get install ia32-libs   # prior to MultiArch
- or -
sudo apt-get install libc6:i386  # if using MultiArch
When systemd is not used, the configuration file /etc/default/sqlr40 is used for configuring the start/stop scripts and the automatic startup on system boot.


sqlrodbc TCP service name

The default SQL/R configuration expects the sqlrodbc service name to be defined. A default definition is added during the installation procedure to the /etc/services file:
sqlrodbc    8003/tcp   # SQL/R ODBC
The first column specifies the service name ("sqlrodbc"), the second column the associated port number and protocol ("8003/tcp"). This entry associates the service name "sqlrodbc" with the TCP port number 8003. The service name "sqlrodbc" is used as a default.

In rare cases it might be necessary to modify this preset configuration, for example if the port number is already in use or does not match the one configured on other systems.

Encryption Support

SQL/R uses the OpenSSL software on Linux for cryptographic functions. The OpenSSL software must be installed to use the (optional) SQL/R cryptographic functions (encrypted passwords or encrypted communication).

SQL/R was tested with the OpenSSL 0.9.7, 0.9.8, 1.0, 1,1 and 3.0 library versions. The OpenSSL library must be available as libcrypto.so. A symbolic link in the SQL/R lib and lib64 directories is created during installation. To force SQL/R to use a specific crypto library, this symbolic link may be changed.

ln -s /lib/libcrypto.so.1.1 /opt/sqlr/4.0/lib/libcrypto.so
ln -s /lib64/libcrypto.so.1.1 /opt/sqlr/4.0/lib64/libcrypto.so


LDAP Support

The SQL/R LDAP support on Linux uses the OpenLDAP client to access the LDAP server. The openldap2-client package must be installed to use the LDAP support.

To use LDAP, the server process dynamically loads a libldap.so library. The SQL/R specific lib directory has precedence in locating the library. The LD_LIBRARY_PATH environment variable may be used to select a specific library to be loaded. Otherwise the system default is used.


Configuring the Server

Configuring SQL/R startup

Automatic startup of SQL/R server processes during system boot is configured with systemd
systemctl enable sqlr40.service

If the System/V start/stop script is used, the /etc/sysconfig/sqlr40 configuration file is used and is enabled by default. Autostart should be disabled when the SQL/R server component is not used (eg. only the ODBC driver is used to access a remote database).

SQL/R kernel resources

Upon startup, the sqlrodbcd process allocates a semaphore set and a shared memory segment. The main sqlrodbcd process runs in background and listens for new connections. For each active connection a new sqlrodbcd process is forked.

Configuring the server

The SQL/R ODBC server is configured with the configuration file odbc.cfg. The configuration file is read by the SQL/R ODBC server when it is started.

The odbc.cfg configuration file is located in the /etc/opt/sqlr/4.0/ directory.

User and Group

The User and Group configuration items in the odbc.cfg specify a user and group that is used to run the SQL/R server process. The default account and group is sqlr.
These options are ignored if the server is not started with root privileges.
A configuration value is required when the server is started with root privileges.
User = sqlr
Group = sqlr

MaxUsers

The MaxUsers configuration item in the odbc.cfg file specifies the maximum number of concurrent processes connecting to the SQL/R ODBC server. The default is 40 simultaneous connections.
MaxUsers = 40