Configuring the UNIX Environment

Overview

This chapter outlines the necessary configuration procedures and server tasks that you must complete following installation of SAS Federation Server in a UNIX environment.

UNIX File System and Directory Permissions

The recommended file permissions for Federation Server installed on a UNIX platform are listed in the following table:
Directories
Users
Default Permissions
/installation_root/SASHome
/SAS/Config/Levn/FederationServer
Installer, Administrator
Read, Write, Execute
Process user
Read, Execute
/installation_root/SASHome/FederationServer/var
/SAS/Config/Levn/FederationServer/var
Installer, Administrator
Read, Write, Execute
Process user
Read, Write, Execute
The user who backs up SAS Federation Server; Backup Administrator
Read, Execute
TranPath as specified in the server configuration file, dfs_serv_common.xml
Installer, Administrator
Read, Write, Execute
Process user
Read, Write, Execute
The user who backs up SAS Federation Server; Backup Administrator
Read, Execute
Note: All other users have no access.

Setting Environment Variables

Overview

Before configuring SAS Federation Server drivers, you must set environment variables as outlined in the following sections.

Set the LANG Environment Variable

If using BASE data sets with SAS Federation Server, the LANG environment variable must be set before bringing up the server. This environment variable is needed for the VALIEDATEFMT table.
Most UNIX or Linux systems use the LANG environment variable to specify the desired locale and this variable is often already set in your environment. Locale names vary among different UNIX or Linux operating systems, so use a value that is supported by your version of UNIX or Linux.
  • Invoke the locale command to show your current locale.
  • Use locale —a to display a list of all the locales that are currently installed on the machine.
For more information about setting locale environment variables, consult the documentation for your operating system.

Setting Environment Variables for Data Sources

Before configuring your Federation Server, you should determine the following information about your data source:
  • The version or release of the client shared libraries installed on your operating system. This is important due to potential incompatibilities between DBMS versions or releases.
  • The location of the client shared libraries. This is important so that the correct client libraries can be loaded.
Note: The steps outlined in this chapter assume that the ODBC drivers were installed during installation of SAS Federation Server.

SAS Federation Server Driver for Apache Hive

Hadoop JAR files must be installed and the SAS_HADOOP_JAR_PATH environment variable defined before using the Driver for Hive. This environment variable is set during installation if Hadoop is included in the plan. The variable points to the location of the Hadoop JAR files, and is defined using the SetEnv option set in the dfs_serv.xml configuration file. Here is an example:
<OptionSet name="SetEnv">
       <Option name="SAS_HADOOP_JAR_PATH">\SAS\Config\Lev1\FederationServer
        \lib\Hadoop</Option>
 </OptionSet>
If the JAR file location changes, you must update the SAS Federation Server configuration file with the new location.

SAS Federation Server Driver for DB2

The SAS Federation Server Driver for DB2 uses shared libraries that are referenced as shared objects in UNIX. You must add the location of the shared libraries to one of the system environment variables, and, if necessary, indicate the DB2 version that you have installed at your site. Before setting the environment variables as shown in the examples below, you must also set the following environment variables:
  • The INSTHOME environment variable must be set to your DB2 home directory.
  • The DB2DIR environment variable should also be set to the value of INSTHOME. 
  • The DB2INSTANCE environment variable should be set to the DB2 instance configured by the administrator.
AIX
Bourne Shell
$ LIBPATH=$INSTHOME/lib:$LIBPATH
$ export LIBPATH
C Shell
$ setenv LIBPATH $INSTHOME/lib:$LIBPATH
HP-UX and HP-UX for the Itanium Processor Family Architecture
Bourne Shell
$ SHLIB_PATH=$INSTHOME/lib:$SHLIB_PATH
$ export SHLIB_PATH
C Shell
$ setenv SHLIB_PATH $INSTHOME/lib:$SHLIB_PATH
Linux for Intel Architecture, Linux for x64, Solaris, and Solaris for x64
Bourne Shell
$LD_LIBRARY_PATH=$INSTHOME/lib:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
C Shell
$ setenv LD_LIBRARY_PATH $INSTHOME/lib:$LD_LIBRARY_PATH

SAS Federation Server Driver for Greenplum

To use ODBC with Greenplum, you must set the ODBCINI environment variable to the odbc.ini file located in the Federation Server installation path:
export ODBCINI=$installpath/fedserver/etc/odbc.ini
When you run dfsadmin, the ODBCINST environment variable is set to the odbcinst.ini file located in the federation server installation path. Here is an example:
export ODBCINST=$installpath/fedserver/etc/odbc.ini

SAS Federation Server Driver for Netezza

The Netezza ODBC drivers are ODBC API-compliant shared libraries that are referenced as shared objects in UNIX. You must include the full path to the shared libraries in the shared library path as shown below so that the ODBC drivers can be loaded dynamically at run time.
AIX
Bourne Shell
$ LIBPATH=$ODBCHOME/lib64:$LIBPATH
$ export LIBPATH
C Shell
$ setenv LIBPATH $ODBCHOME/lib64:$(LIBPATH)
HP-UX for the Itanium Processor Family Architecture
Bourne Shell
$ SHLIB_PATH=$ODBCHOME/lib64:$SHLIB_PATH
$ export SHLIB_PATH
C Shell
$ setenv SHLIB_PATH $ODBCHOME/lib64:$(SHLIB_PATH)
Linux for Intel Architecture, Linux for x64, Solaris, and Solaris for x64
Bourne Shell
$LD_LIBRARY_PATH=$ODBCHOME/lib64:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
C Shell
$ setenv LD_LIBRARY_PATH $ODBCHOME/lib64:$(LD_LIBRARY_PATH)

SAS Federation Server Driver for ODBC

To configure ODBC data sources, you might have to edit the .odbc.ini file in your home directory. Some ODBC Driver vendors allow system administrators to maintain a centralized copy by setting the environment variable ODBCINI. Please refer to your vendor documentation for specific configuration information.
The Drivers for ODBC are ODBC API–compliant shared libraries, referred to as shared objects in UNIX. You must add the location of the shared libraries to one of the system environment variables so that drivers for ODBC are loaded dynamically at run time. You must also set the ODBCHOME environment variable to your ODBC home directory before setting the environment variables as shown in the following examples.
Linux for Intel Architecture and Linux for x64
Bourne Shell
$ LD_LIBRARY_PATH=$ODBCHOME/lib:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
C Shell
$ setenv LD_LIBRARY_PATH
$ODBCHOME/lib:$LD_LIBRARY_PATH
Solaris and Solaris for x64
Bourne Shell
$ LD_LIBRARY_PATH=$ODBCHOME/lib:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
C Shell
$ setenv LD_LIBRARY_PATH
$ODBCHOME/lib:${LD_LIBRARY_PATH}
AIX
Bourne Shell
$ LIBPATH=$ODBCHOME/lib:$LIBPATH
$ export LIBPATH
C Shell
$ setenv LIBPATH
$ODBCHOME/lib:${LIBPATH}
HP-UX and HP-UX for the Itanium Processor Family Architecture
Bourne Shell
$ SHLIB_PATH=$ODBCHOME/lib:$SHLIB_PATH
$ export SHLIB_PATH
C Shell
$ setenv SHLIB_PATH
$ODBCHOME/lib:${SHLIB_PATH}

SAS Federation Server Driver for Oracle

You can connect to any Oracle server from SAS Federation Server (Driver for Oracle) using the SAS Federation Server Driver for Oracle. Refer to SAS System Requirements for the supported releases of the Oracle client.
To use the Driver for Oracle, you must set the ORACLE_HOME environment variable. In addition, you must make sure that the shared library path variable (the name of this variable is operating system dependent) points to the location of the Oracle shared libraries. This is required since the driver executable uses Oracle shared libraries and needs to know where they are located at your site.
The following are examples for the various operating systems:
AIX
Bourne Shell
$ LIBPATH=$ORACLE_HOME/lib:$LIBPATH
$ export LIBPATH
C Shell
$ setenv
LIBPATH=$ORACLE_HOME/lib:$LIBPATH
HP-UX and HP-UX for the Itanium Processor Family Architecture
Bourne Shell
$
SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH
$ export SHLIB_PATH
C Shell
$ setenv SHLIB_PATH
$ORACLE_HOME/lib:$SHLIB_PATH
Linux for Intel Architecture, Linux for Itanium-based Systems, Solaris, and Solaris for x64
Bourne Shell
$
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
C Shell
$ setenv LD_LIBRARY_PATH
$ORACLE_HOME/lib:$LD_LIBRARY_PATH

SAS Federation Server Driver for SAP

SAP® software requires extensive configuration before it can be used. For more information, see See Installing and Configuring the SAS Federation Server Driver for SAP .

SAS Federation Server Driver for SAP HANA

The SAS Federation Server Driver for SAP HANA uses an ODBC interface to access SAP HANA. The SAS Federation Server Driver for SAP HANA requires the 64–bit ODBC driver for SAP HANA. The SAP HANA client includes the ODBC driver.
These are the prerequisites for configuration of the SAS Federation Server Driver for SAP HANA:
  • You have downloaded the SAP HANA client software from SAP Service Marketplace and installed and configured the ODBC driver.
  • For more information about how to obtain the software, see the SAP HANA Master Guide on http://help.sap.com/hana_appliance/.
  • For information how to install and configure the ODBC driver refer to the SAP HANA Client Installation Guide on http://help.sap.com/hana_appliance/.
  • You must include the full path to the shared library in the shared library path so that the ODBC drivers can load dynamically at run time.
AIX
Bourne Shell
$ LIBPATH=/usr/sap/hdbclient:$LIBPATH
$ export LIBPATH
C Shell
$ setenv LIBPATH /usr/sap/hdbclient:$LIBPATH
HP-UX for the Itanium Processor Family
Bourne Shell
$ SHLIB_PATH=/usr/sap/hdbclient:$SHLIB_PATH
$ export SHLIB_PATH
C Shell
$ setenv SHLIB_PATH /usr/sap/hdbclient:$SHLIB_PATH
Linux for Intel Architecture, Linux for x64, Solaris, and Solaris for x64
Bourne Shell
$ LD_LIBRARY_PATH=/usr/sap/hdbclient:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
C Shell
$ setenv LD_LIBRARY_PATH /usr/sap/hdbclient:$LD_LIBRARY_PATH
The SAS Federation Server Driver for SAP HANA can use data sources defined in the odbc.ini file to identify the SAP HANA server. The general format of the odbc.ini is:
[ODBC Data Source]
SERVERNODE=hana_host:hana_port
For example:
[SAPHHANADSN]
SERVERNODE=hanasrv1.mycompany.com:30015
Set the ODBCINI environment variable to the location and name of your odbc.ini:
Bourne Shell
ODBCINI=path-to/odbc.iniexport ODBCINI
C Shell
setenv ODBCINI path-to/odbc.ini

SAS Federation Server Driver for Teradata

The SAS Federation Server Driver for Teradata uses shared libraries, referred to in UNIX as shared objects. You must add the location of the shared libraries to one of the system environment variables.
AIX
Bourne Shell
$ LIBPATH=TERADATA-CLIENT-LOCATION:$LIBPATH
$ export LIBPATH
C Shell
$ setenv LIBPATH TERADATA-CLIENT-LOCATION:$LIBPATH
HP-UX
Bourne Shell
$ SHLIB_PATH=TERADATA-CLIENT-LOCATION:$SHLIB_PATH
$ export SHLIB_PATH
C Shell
$ setenv SHLIB_PATH TERADATA-CLIENT-LOCATION:$SHLIB_PATH
HP-UX for the Itanium Processor Family
Bourne Shell
$ SHLIB_PATH=TERADATA-CLIENT-LOCATION:$SHLIB_PATH
$ export SHLIB_PATH
$ LD_PRELOAD=/usr/lib/hpux64/libpthread.so.1
$ export LD_PRELOAD
C Shell
$ setenv SHLIB_PATH TERADATA-CLIENT-LOCATION:$SHLIB_PATH
$ setenv LD_PRELOAD /usr/lib/hpux64/libpthread.so.1
Linux for Intel Architecture, Linux for x64, Solaris, and Solaris for x64
Bourne Shell
$ LD_LIBRARY_PATH=TERADATA-CLIENT-LOCATION:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
C Shell
$ setenv LD_LIBRARY_PATH TERADATA-CLIENT-LOCATION:$LD_LIBRARY_PATH

Configuring ODBC Connections

Configuring ODBC Connections Using Third Party ODBC Drivers

  • To access a database through ODBC with SAS Federation Server, an ODBC driver for the specific database must be used. The database must also be configured as an ODBC data source when using an ODBC driver.
  • To access a database using a vendor supplied client, the client must be installed and configured according to the vendor documentation.
  • Verify the connection with a third-party client tool before attempting connection to SAS Federation Server.

unixODBC Driver Manager

unixODBC is an open-source product that implements the ODBC API. If unixODBC is required and not already installed, visit http://www.unixODBC.org and download the required software.
The following configurations are required when using the unixODBC driver manager with SAS Federation Server:
  1. Include unixODBC in the PATH and LD_LIBRARY_PATH.
  2. The odbcini and odbcinst.ini installed with SAS Federation Server are for use with the ODBC driver manager, also installed with SAS Federation Server. Since the third-party ODBC driver will likely use the unixODBC driver manager, you will need to update the odbcini and odbcinst files used by unixODBC and update the ODBCINI environment variable accordingly.
  3. DM_UNICODE=utf-16 is required in the advanced options of the ODBC data service that is used with the driver manager.
    Note: The DM_UNICODE connection option is also available with the SAS Federation Server Driver for ODBC.
Use the vendor supplied client configuration utility for non-ODBC connections. For more information about configuring third-party databases, See Setting Environment Variables for Data Sources .
Last updated: March 6, 2018