Close menu

SQL/R A.03.00 Installation on Linux

This document contains installation instructions specific to the Linux platform.

Supported Linux releases

SQL/R is available as RPM package for the IA32 (i686), AMD64/EM64T (x86_64) and IA64 (Itanium) architecture.

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.

Please make sure the following shared library versions (or newer) are installed:

glibc2.3.x
libstdc++.so.5
libncurses.so.5
libgcc_s.so.1
libcrypto.so

Installation directory

The SQL/R A.03.00 software is installed in the "/opt/sqlr2/" directory. The SQL/R configuration files are installed in the "/etc/opt/sqlr2/" directory.

A previous SQL/R release is replaced when updating to SQL/R A.03.00. The installation procedure retains the configuration of a previous SQL/R release.

Installation

SQL/R is available as a RPM archive and is installed with the rpm utility. The rpm package is not specific to a particular Linux distribution. However, it has only been tested against SUSE and RedHat distributions. If you encounter a problem during installation, please send us a notice at support@marxmeier.com.

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

SQLR-A03XX-*.i686.rpm
SQL/R rpm file (x86, 32 bit)

SQLR-A03XX-*.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.

SQLR.A03XX-*.ia64.rpm
SQL/R rpm file (Itanium2, 64 bit)
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 32 bit x86 build.
rpm -i SQLR-A0300-*.i686.rpm

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/sqlr2/newconfig/startup.

Automatic startup of SQL/R server processes during system boot is configured in the /etc/sysconfig/sqlr2 configuration file.

Updating from a previous SQL/R release

A previous SQL/R release is replaced when updating to SQL/R A.03.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:

/etc/init.d/sqlr2 stop
Then install the RPM archive. If necessary, update the license key. After the update has finished SQL/R can be started with the command below:
/etc/init.d/sqlr2 start

Automatic startup of SQL/R servers during boot is configured in the /etc/sysconfig/sqlr2 configuration file.

Uninstalling SQL/R A.03.00

To uninstall SQL/R A.03.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.
/etc/init.d/sqlr2 stop
The software is removed using the rpm utility. Please login as root and execute rpm as below
rpm -e SQLR
Please note that any modified configuration files (typically customized configuration files) are not removed. If necessary they need to be removed manually.

SQL/R A.03.00 is installed in the following directories:

Red Hat (Fedora and RHEL) specific notes

When installing SQL/R A.03.00 on Fedora 9 or newer, installation of the compat-libstdc++-33 package is required.

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 specific notes

When installing SQL/R A.03.00 on SUSE 11.1 or newer, installation of the libstdc++-33 package is required. Otherwise installation will fail due to an unmet dependency on libstdc++.so.5.

Debian/Ubuntu specific notes

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

SQL/R currently does not provide a Debian specific .deb installation package. The Debian "alien" utility may be used to install the SQL/R RPM package.

To install the "alien" utility on your system, please execute the commands below:

sudo apt-get update
sudo apt-get install alien
After that, you may install SQL/R with the command below:
sudo alien -i SQLR-A03XX-*.i686.rpm --scripts
The configuration file /etc/default/sqlr2 is used for configuring the start/stop scripts and the automatic startup on system boot.

On Debian 4.0 based systems (or newer), installation of the libstdc++5 package is required. To install it from the command line, the command below may be used:

sudo apt-get install libstdc++5

On x86_64 systems, you also need to install the ia32-libs or libc6:i386 package.

sudo apt-get install ia32-libs   # prior to MultiArch
 OR
sudo apt-get install libc6:i386  # if using MultiArch

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 and 0.9.8 library versions. The OpenSSL library must be available as libcrypto.so.

To use encryption, the server process dynamically loads a libcrypto.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.

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 servers during boot is configured in the /etc/sysconfig/sqlr2 configuration file. By default the SQL/R server is started during the Linux boot process. 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).

SQRL/R kernel resources

Upon startup, the sqlrodbcd process allocates a semaphore set and a shared memory segment. A fixed key is used to identify the shared memory and semaphore. As a consequence, the sqlrodbcd server will refuse to start if either another sqlrodbcd process is active or the sqlrodbcd main process aborted unexpectedly.

If a previous sqlrodbcd main process aborted without cleaning up the shared resources a message as below is output:

The SQL/R ODBC server semaphore exists but there is no active
server process. If the SQL/R ODBC server crashed, you can
remove any pending IPC resources by executing
ipcrm -s #
ipcrm -m #
Where # is the id of a semaphore or shared memory object. To manually remove the shared resources, please execute the commands as shown.

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/sqlr2/ 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