This install procedure is written based on Scientific Linux 4 and required superuser account i.e. root in below case.
download cernlib : wget http://cernlib.web.cern.ch/cernlib/download/2006_source/tar/2006_src.tar.gz at /cern or visit http://cernlib.web.cern.ch/cernlib/version.html and click 2006 source compressed tar files then download 2006_src.tar.gz
create script for install like below that install.sh %CODE{lang="py"}%
#!/bin/sh
CERN_LEVEL=2006
CERN=`pwd`
CERN_ROOT=$CERN/$CERN_LEVEL
CVSCOSRC=$CERN/$CERN_LEVEL/src
PATH=$CERN_ROOT/bin:$PATH
export CERN
export CERN_LEVEL
export CERN_ROOT
export CVSCOSRC
export PATH
# Create the build directory structure
cd $CERN_ROOT
mkdir -p build bin lib build/log
# Create the top level Makefile with imake
cd $CERN_ROOT/build
$CVSCOSRC/config/imake_boot
# Install kuipc and the scripts (cernlib, paw and gxint) in $CERN_ROOT/bin
gmake bin/kuipc > log/kuipc 2>&1
gmake scripts/Makefile
cd scripts
gmake install.bin > ../log/scripts 2>&1
# Install the libraries
cd $CERN_ROOT/build
gmake > log/make.`date +%m%d` 2>&1
%ENDCODE%