Further to my little exercise yesterday installing Oracle 11g on Debian, I thought that I’d have ago at installing Ingres. Lead by Michael Stonebraker at Berkerley, Ingres was the predecessor to the post-Ingres research project that later evolved into PostgreSQL.
Just as per my previous post we start out with a vanilla install of Debian Squeeze 6.0 from the netinst CD image. Without thinking I went ahead and installed a few of the packages I normally like to have on my servers, most of them are probably not required:
# apt-get install module-assistant build-essential zip unzip bzip2 apt-show-versions samba rsync ntp ntpdate screen sysstat dstat sudo iotop linux-headers-$(uname -r) cvs git-core
Next we fetch the installer:
# mkdir /usr/ingres_installer # cd /usr/ingres_installer # wget http://esd.actian.com/product/Community_Projects/Ingres_Database/Linux_X86_64-bit/Ingres_10.1_Build_125/ingres-10.1.0-125-gpl-linux-ingbuild-x86_64.tgz # tar xzf ingres-10.1.0-125-gpl-linux-ingbuild-x86_64.tgz # rm ingres-10.1.0-125-gpl-linux-ingbuild-x86_64.tgz
And create a user for ingress to run as:
# adduser --uid 1001 --ingroup daemon --disabled-login ingres (no password, Full name "Ingres Daemon") # groupadd ingres --gid 1001 # usermod -a -G ingres ingres
Then run the installer, the default install directory is /opt/Ingres/:
# cd ingres-10.1.0-125-gpl-linux-ingbuild-x86_64 # ./ingres_express_install.sh
The installer sets everything up, all we’re left to do is create any init scripts we want and set up our environment.
Next we add the following to the .bashrc of our ingres user, or to the global profile in /etc/profile to setup the environment:
export II_SYSTEM=/opt/Ingres/IngresII export PATH=$PATH:$II_SYSTEM/ingres/bin:$II_SYSTEM/ingres/utility export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$II_SYSTEM/ingres/lib export TERM_INGRES=konsolel
To start and stop ingres we can use the “ingstart” and “ingstop” commands respectively, I created the following init script in /etc/init.d/ingres:
#! /bin/sh ### BEGIN INIT INFO # Provides: ingres # Required-Start: $network $local_fs $remote_fs $syslog # Required-Stop: $network $local_fs $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start ingres daemon at boot time # Description: Enable ingres service. ### END INIT INFO # chkconfig: 2345 98 02 # description: Ingres RDBMS # Place this file at /etc/init.d/ingres (or # /etc/rc.d/init.d/ingres) and make symlinks to # /etc/rc.d/rc0.d/K02ingres # /etc/rc.d/rc1.d/K02ingres # /etc/rc.d/rc2.d/K02ingres # /etc/rc.d/rc3.d/S98ingres # /etc/rc.d/rc4.d/S98ingres # /etc/rc.d/rc5.d/S98ingres # Or, if you have chkconfig, simply: # chkconfig --add ingres # # Who to run ingstart as, usually "ingres". (NOT "root") IGUSER=ingres # The prefix of the ingres install II_SYSTEM="/opt/Ingres/IngresII" # Start script logfile IGLOG="$II_SYSTEM/ingres/serverlog" set -e # Parse command line parameters. case $1 in start) echo -n "Starting Ingres: " su - $IGUSER -c "date" >>$IGLOG 2>&1 su - $IGUSER -c "ingstart" >>$IGLOG 2>&1 echo "ok" ;; stop) echo -n "Stopping Ingres: " su - $IGUSER -c "date" >>$IGLOG 2>&1 su - $IGUSER -c "ingstop" >>$IGLOG 2>&1 echo "ok" ;; restart) echo -n "Restarting Ingres: " su - $IGUSER -c "date" >>$IGLOG 2>&1 su - $IGUSER -c "ingstop" >>$IGLOG 2>&1 su - $IGUSER -c "ingstart" >>$IGLOG 2>&1 echo "ok" ;; status) su - $IGUSER -c "ingstatus" ;; *) # Print help echo "Usage: $0 {start|stop|restart|status}" 1>&2 exit 1 ;; esac exit 0
And set it to run at startup:
# chmod 755 /etc/init.d/ingres # chown root:root /etc/init.d/ingres # update-rc.d ingres start 24 2 3 4 5 . stop 25 0 1 6
And that’s it, “invoke-rc.d ingres start” and we’re up and running.
Create a test database:
# createdb test
This creates the database named test in $II_SYSTEM/ingres/data/default/ by default
Connect to the database and give it a whirl:
# sql test
* CREATE TABLE test (id integer, desc varchar(50))\g * INSERT INTO test VALUES (1, 'test record 1'),(2, 'test record 2')\g * SELECT * FROM test\g
Update 16/03/2013 – I’ve upgraded this machine from Squeeze to Wheezy without any issues, I assume the Ingres setup is pretty standalone so the install process should be the same.
Hi,
Nice job!! I have tested it on debian stretch and works like a charm
only one thing, I’m trying to rebuild an old abf and I get the next error:
Linking host language procedures . . .
/usr/bin/ld: /opt/Ingres/IngresII/ingres/lib/abfimain.obj: relocation
R_X86_64_32 against symbol `IIOhl_proc’ can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
I can’t find anything, but I found that “recompile with -fPIC” refers to recompile ingres with -fPIC, is that posible? how can I do it?
Nice to know it still works on stretch.
Afraid I don’t know anything about ABFs, the linker is failing on that shared object not having been compiled as position independent code. I’d start off by looking at what flags your ABF build is using for any shared objects and try and add fPIC, else you’ll have to delve into the Ingres install specifically to see what you can find.
Hi, Glyn,
Just found this old blog post from over eight years ago (wow!)–and it even looks like you might still be monitoring the thing; thought I’d check, just in case:
Any chance you still have the ‘ingres-10.1.0-125-NPTL-gpl-linux-ingbuild-x86_64.tgz’ gzipped tarball anywhere? Actian has removed all the Ingres Community Project downloads, unfortunately, and I only have the ‘ingres-10.1.0-125-gpl-src.tgz’ file — which looks horribly complicated to build on even CentOS 7, given all sorts of antiquated libs etc.
Thanks in advance for any info!
Cheers,
Steve