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
SASHome
SASHome/SAS Federation Server
Installer, Administrator
Read, Write, Execute
Process user
Read, Execute
SASHome/SAS Federation Server//server instance/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 driver software, set environment variables as outlined in the following sections.

Set the LANG Environment Variable

If using BASE data sets with the Federation Server, the LANG environment variable must be set before bringing up the Federation Server. This environment variable is primarily needed for the VALIEDATEFMT table.
Most UNIX or Linux systems use the LANG 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 LANG 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 DBMS-Based Drivers

Before configuring your Federation Server, you should determine the following information about your DBMS:
  • The version or release of the DBMS client shared libraries installed on your operating system. This is important due to potential incompatibilities between DBMS versions or releases.
  • The location of the DBMS 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.
Refer to the following sections for detailed instructions on configuring your environment to interface with your Federation Server driver software:
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 DB2®
The SAS Federation Server Driver for DB2 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, 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 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 to find specific information. Additional information for ODBC can be found in Configuring ODBC Connections.
The Drivers for ODBC are ODBC API–compliant 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 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}
Setting ODBC for Greenplum
To use ODBC with Greenplum, you need to set the ODBCINST and ODBCINI environment variables to point to the configuration files that are installed with SAS Federation Server.
  1. Set the ODBCINST environment variable to the odbcinst.ini file located in the Federation Server installation path:
    export ODBCINST=$installpath/fedserver/etc/odbcinst.ini
  2. Set the ODBCINI environment variable to the odbc.ini file located in the Federation Server installation path:
    export ODBCINI=$installpath/fedserver/etc/odbc.ini
SAS Federation Server Driver for Oracle
Connecting to an Oracle Database
You can connect to any Oracle server from SAS Federation Server using the Oracle driver, client versions 10g or 11g. If you are using Oracle client version 11g, run these additional commands to successfully connect with Oracle from SAS Federation Server:
cd
/installation_directory/fedserver/lib
cp tkeora11.so tkeora.so
Note: For HP64, the file extensions are .sl.
Setting the ORACLE_HOME Variable
In order to use the SAS Federation Server 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 where the Oracle shared libraries are located. This is required since the SAS Federation Server Driver for Oracle 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 Teradata
Access to Shared Libraries
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
TTU 8.2 and HP-UX
HP–UX users with TTU 8.2 must create two symbolic links from the /usr/lib/pa20_64 directory with the following commands:
$ ln -s /usr/lib/pa20_64/libicudatatd.sl libicudatatd.sl.34
$ ln -s /usr/lib/pa20_64/libicuuctd.sl libicuuctd.sl.34

Configuring ODBC Connections

Overview

To access a database through ODBC with SAS Federation Server, an ODBC driver for the specific database must be used. SAS Federation Server is delivered with branded ODBC drivers for several databases. You can opt to use one of these ODBC drivers or you can use a third party driver. The database must also be configured as an ODBC data source when using an ODBC driver.

Configuring ODBC Connections Using the SAS Federation Server Drivers

SAS Federation Server includes an ODBC configuration tool used to configure the ODBC data sources that are installed with SAS Federation Server.
Note: If you are upgrading SAS Federation Server, see Modifying ODBC for UNIXin Upgrading SAS Federation Server.

ODBC Configuration Tool

Use the ODBC configuration tool, dfdbconf, to add new data sources to your ODBC configuration.
To add a new data source:
  1. From the root directory of SAS Federation Server installation, run: ./bin/dfdbconf.
  2. Select A to add a data source.
  3. Select a template for the new data source by choosing a number from the list of available drivers.
  4. Set parameters for the driver as you are prompted to do so. The new data source is added to the odbc.ini file.
Tip
You can also use dfdbconf to modify an existing data source if it is no longer needed.

Testing the Connection

Once you have added all of your data sources, use the interactive ODBC Viewer application, dfdbview, to test your connection. For example, if you added a data source calledmy_oracle, run ./bin/dfdbview my_oracle (from the installation root) to test the connection. You might be prompted for a user name and password. If the connection succeeds, you will see a prompt from which you can enter SQL commands and query the database. If the connection fails, dfdbview displays error messages describing one or more reasons for the failure.

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 through 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 prior to attempting connection through 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 OBCDINI environment variable accordingly.
  3. DM_UNICODE=utf-16 is required in the advanced options of any data service that is used with the driver manager.
Use the vendor supplied client configuration utility for non-ODBC connections. For more information about configuring third-party databases, See Setting Environment Variables for DBMS-Based Drivers.

Starting and Stopping the Server Daemon

Start and stop the SAS Federation Server daemon using the dfsadmin application, located in the bin directory of the installation root. This application is run using the command syntax: ./bin/dfsadmin yourcommand where yourcommand is one of the following:
To start SAS Federation Server: ./bin/dfsadmin start
To stop SAS Federation Server: ./bin/dfsadmin stop
Additional information for the dfsadmin application can be found in the dfsadmin Utility topic.