Installing SAS92 in CentOS
By Bart Heinsius, Owner and Consultant, EOM, the Netherlands
--bheinsius 20:39, 29 June 2009 (GMT+1)
Being a Linux fan, I had to install SAS92 on it, especially after hearing that its supported better on Linux than SAS913 was. So, I took the plunge, which didn't appear to be such a plunge afterwards.
Ubuntu is my favorite flavor but SAS decided to support SAS92 on RedHat Enterprise Linux instead. Being a poor guy, I installed CentOS 5.3 instead, since its the same distribution except for the label and the price. For the real geeks, my CentOS 5.3 install was a bootstrapped version running in a Xen 3.2 DomU on a Ubuntu Server 8.04 (Hardy) Dom0 on a 6 year old 3.2GHz Dell PowerEdge 2850 with 4GB of RAM, which is still working amazingly well with its 15KRPM SCSI disks. Getting the bootstrap process working took quite some time because of bugs in the Xen supplied scripts. I had to install bc, unzip, libXp, and compat‐libstdc++‐33‐3.2.3‐61 in the CentOS guest domain for the SAS installation scripts to work. I allocated a 25GB disk, 1.5GB memory and a 2GB swap file to the CentOS guest.
I installed SAS EBI and EDI Server on a single machine using one of the pre-configured configurations. The installation itself aborted a couple of times, mainly because of Linux permissions caused by not installing JBoss under the sas account. The good thing is that when something goes wrong during installation, a dialog pops up telling you where to find the log file and it has a Retry button! So you can look in the log, fix what's broken and retry, which solved all my problems except for number 1 below since I only found that out after contacting SAS Technical Support.
In short, I have, in addition to the installation instructions, the following tips:
1. Create operating system users sas and sassrv before starting. Make sassrv a member of the sas group using usermod -a -G sas sassrv.
2. Don't install from an NX session because it fails, use a regular X session instead.
3. Install JBoss as the sas user.
Having done this, installation went without a glitch. Amazing, being used to SAS913. It's running pretty good too. JBoss takes around 10 minutes to start up and takes a lot of memory. When all is up and running the complete SAS deployment uses around 2GB of memory. A colleague of mine added a page to the Portal and when I select it, JBoss hangs. Have to look into that, there's a BI Dashboard on it, I'm probably running out of memory there.
Good luck and let me know if I can help.
11JUL10: Configuring SAS/ACCESS to MySQL
To get SAS92 to connect to MySQL, I installed the MySQL Client as root:
su - yum install mysql exit
This installs both the 32 and 64-bit versions of the MySQL Client.
I then followed the instructions in the Configuration Guide for SAS 9.2 Foundation for UNIX Environments at :
1. Setting Up the Symbolic Link to sasmyl through sassetup
2. Adding the following two lines to level_env.sh in your SAS Server context directory (/sasserver/Lev1 in my case):
export MYSQL_LIBDIR=/usr/lib/mysql export LD_LIBRARY_PATH=$MYSQL_LIBDIR:$LD_LIBRARY_PATH
Important to note here is that I link to the 32-bit client (/usr/lib/mysql instead of /usr/lib64/mysql) since I have 32-bit SAS running on 64-bit CentOS.
The Configuration Guide says it should work now so I created a SAS program to test it:
libname x mysql user=root password=xxxxxxxx database=ehour server=ehour port=3306; libname x clear;
It didn't work for me, I got the following error:
1 libname x mysql user=root password=XXXXXX database=ehour server=ehour port=3306; ERROR: The SAS/ACCESS Interface to MYSQL cannot be loaded. The libmysqlclient code appendage could not be loaded.
In directory /usr/lib/mysql, I found the following files:
-rwxr-xr-x 1 root root 6215 May 28 03:10 mysql_config -rwxr-xr-x 1 root root 13169 May 28 03:10 mysqlbug -rwxr-xr-x 1 root root 1449864 May 28 03:10 libmysqlclient.so.15.0.0 -rwxr-xr-x 1 root root 1460748 May 28 03:10 libmysqlclient_r.so.15.0.0 lrwxrwxrwx 1 root root 24 Jul 10 23:19 libmysqlclient.so.15 -> libmysqlclient.so.15.0.0 lrwxrwxrwx 1 root root 26 Jul 10 23:19 libmysqlclient_r.so.15 -> libmysqlclient_r.so.15.0.0
I created two symbolic links:
lrwxrwxrwx 1 root root 20 Jul 11 00:07 libmysqlclient.so -> libmysqlclient.so.15 lrwxrwxrwx 1 root root 22 Jul 11 00:08 libmysqlclient_r.so -> libmysqlclient_r.so.15
using the commands:
ln -s /usr/lib/mysql/libmysqlclient.so.15 /usr/lib/mysql/libmysqlclient.so ln -s /usr/lib/mysql/libmysqlclient_r.so.15 /usr/lib/mysql/libmysqlclient_r.so
and I can now access MySQL from SAS. Note that you have to restart the Object Spawner to access the library through a Workspace Server session.