Go to TogaWare.com Home Page.
GNU/Linux Desktop Survival Guide
by Graham Williams
Google

Teradata Data Warehouse


To install the Teradata packages (which come as rpm packages) on Debian amd64, we need a mix of manual install and use of the alien command. alien works fine for amd64 but we need the 32 bit libraries for some of the functionality.

The script below automatically install the packages assuming the sourced .tar.gz files are in a folder called tar. The tar files are downloaded from Teradata. This then allows 32 bit bteq to work just fine, as well as 32 bit SAS version 9.1. For the 64 bit side, SAS 9.2 and ODBC with R and isql work just fine.



#!/bin/sh 
# 
# Copyright (c) 2010 Graham.Williams@ato.gov.au 
# 
# Install TD12 from tar files in the tar folder. 
# Convert where possible to Debian packages. 
# Install both 32 bit (for bteq and sas_9.1) and 64 bit (for sas, odbc) 
# Use Debian's alien to convert to Debian packages then install. 
# For 32 bit use alien to extract all files, and then manually install. 
# 
######################################################################## 
# Ensure directories are setup appropriately.

if [ ! -d /opt/teradata ]; then sudo mkdir /opt/teradata; fi

TGZ=".tar.gz"

# 
######################################################################## 
# Install 32 bit - can't create deb pacakges because of different arch

ARCH="__linux_i386." 
RPM=".i386.rpm" 
BIT=""

# 32 bit tdicu

PKG="tdicu" 
DIS="" 
VER="12.00.00.02" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dcs ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/opt/teradata /opt/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/lib/* /usr/lib32/ 
sudo sh ${PKG}${DIS}${BIT}-${VER}/debian/postinst 
rm -rf ${PKG} ${PKG}${DIS}${BIT}-${VER}

# 32 bit TeraGSS

PKG="TeraGSS" 
DIS="_redhatlinux-i386" 
VER="12.00.03.09" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dcs ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/opt/teradata /opt/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/teragss /usr/ 
# The postinst script finally aborts, but does set other things up 
# first. It aborts at the end with run_tdgssconfig. This should create 
# the .bin file, but does not. So copy a previous .bin file across. 
sudo sh ${PKG}${DIS}${BIT}-${VER}/debian/postinst 
sudo install tdgssconfig.bin /opt/teradata/teragss/redhatlinux-i386/${VER}/etc/ 
rm -rf ${PKG} ${PKG}${DIS}${BIT}-${VER}

# 32 bit piom

PKG="piom" 
DIS="" 
VER="12.00.00.04" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dcs ${PKG}/${PKG}${DIS}-${VER}${REL}${RPM} 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/opt/teradata /opt/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/lib/* /usr/lib32/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/include /usr/ 
sudo sh ${PKG}${DIS}${BIT}-${VER}/debian/postinst 
rm -rf ${PKG} ${PKG}${DIS}${BIT}-${VER}

# 32 bit cliv2

PKG="cliv2" 
DIS="" 
VER="12.00.00.06" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dcs ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/opt/teradata /opt/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/lib/* /usr/lib32/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/include /usr/ 
sudo sh ${PKG}${DIS}${BIT}-${VER}/debian/postinst 
rm -rf ${PKG} ${PKG}${DIS}${BIT}-${VER}

# 32 bit bteq

PKG="bteq" 
DIS="" 
VER="12.00.00.04" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dcs ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/opt/teradata /opt/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/bin /usr/ 
sudo cp -R ${PKG}${DIS}${BIT}-${VER}/usr/include /usr/ 
sudo sh ${PKG}${DIS}${BIT}-${VER}/debian/postinst 
rm -rf ${PKG} ${PKG}${DIS}${BIT}-${VER}

# 
######################################################################## 
# 64 bit

ARCH="__linux_x8664." 
RPM=".x86_64.rpm"

# 64 bit cliv2

PKG="cliv2" 
pkg=$(echo ${PKG} | tr [:upper:] [:lower:]) 
DIS="" 
BIT="_64" 
VER="12.00.00.07" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dck ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
wajig install ${pkg}${DIS}-64_${VER}${REL}_amd64.deb 
rm -rf ${PKG} ${PKG}${DIS}-64_${VER}${REL}_amd64.deb

# 64 bit TeraGSS

PKG="TeraGSS" 
pkg=$(echo ${PKG} | tr [:upper:] [:lower:]) 
DIS="_suselinux-x8664" 
dis=$(echo ${DIS} | tr _ -) 
BIT="" 
VER="12.00.02.13" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dck ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
wajig install ${pkg}${dis}_${VER}${REL}_amd64.deb 
rm -rf ${PKG} ${pkg}${dis}_${VER}${REL}_amd64.deb

# 64 bit tdicu

PKG="tdicu" 
pkg=$(echo ${PKG} | tr [:upper:] [:lower:]) 
DIS="" 
dis=$(echo ${DIS} | tr _ -) 
BIT="_64" 
VER="12.00.00.02" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dck ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
wajig install ${pkg}${dis}-64_${VER}${REL}_amd64.deb 
rm -rf ${PKG} ${PKG}${DIs}-64_${VER}${REL}_amd64.deb

# 64 bit ODBC

PKG="tdodbc" 
pkg=$(echo ${PKG} | tr [:upper:] [:lower:]) 
DIS="" 
dis=$(echo ${DIS} | tr _ -) 
BIT="" 
VER="12.00.00.05" 
REL="-1"

tar xvf tar/${PKG}${DIS}${ARCH}${VER}${REL}${TGZ} 
fakeroot alien -dck ${PKG}/${PKG}${DIS}${BIT}-${VER}${REL}${RPM} 
wajig install ${pkg}${dis}_${VER}${REL}_amd64.deb 
rm -rf ${PKG} ${PKG}${DIs}_${VER}${REL}_amd64.deb

# All Done 
########################################################################


Copyright © 1995-2014 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.