个人工具

“UbuntuHelp:Servers/Ingres”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Servers/Ingres}}
 
{{From|https://help.ubuntu.com/community/Servers/Ingres}}
 
{{Languages|UbuntuHelp:Servers/Ingres}}
 
{{Languages|UbuntuHelp:Servers/Ingres}}
 
 
 
== Ingres Quickstart ==
 
== Ingres Quickstart ==
 
How to build, install and set up an Ingres 2006 server in ubuntu.
 
How to build, install and set up an Ingres 2006 server in ubuntu.
 
 
== Introduction ==
 
== Introduction ==
 
Open source database solutions that provide enterprise-level functionality, services and support are revolutionizing today’s marketplace.
 
Open source database solutions that provide enterprise-level functionality, services and support are revolutionizing today’s marketplace.
 
 
=== Features ===
 
=== Features ===
 
Ingres is a complete relational solution, providing the following features:
 
Ingres is a complete relational solution, providing the following features:
 
 
* A robust, high-performance relational database management system (RDBMS) on which you can build the best in mission-critical applications.
 
* A robust, high-performance relational database management system (RDBMS) on which you can build the best in mission-critical applications.
 
* Support for the latest technology, such as multiple processors and 64-bit architecture, and standards such as XML and Unicode. The extensive list of supported platforms includes Linux for zSeries and S/390, UNIX, and Windows.
 
* Support for the latest technology, such as multiple processors and 64-bit architecture, and standards such as XML and Unicode. The extensive list of supported platforms includes Linux for zSeries and S/390, UNIX, and Windows.
第26行: 第21行:
 
== Building Ingres ==
 
== Building Ingres ==
 
Unfortunately, there is no Ingres pre-built package for Ubuntu. Therefore you should build Ingres from source.  
 
Unfortunately, there is no Ingres pre-built package for Ubuntu. Therefore you should build Ingres from source.  
 
 
=== Preparing to build ===
 
=== Preparing to build ===
 
Building Ingres from source requires installation of a few tools with a specific versions.
 
Building Ingres from source requires installation of a few tools with a specific versions.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# sudo apt-get install gcc-3.4 g++-3.4 make jam  
 
# sudo apt-get install gcc-3.4 g++-3.4 make jam  
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Also, you should make those tools your defaults,  
 
Also, you should make those tools your defaults,  
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# sudo rm /usr/bin/gcc
 
# sudo rm /usr/bin/gcc
第46行: 第37行:
 
# sudo ln -s /usr/bin/gcc-3.4 /usr/bin/cc
 
# sudo ln -s /usr/bin/gcc-3.4 /usr/bin/cc
 
</nowiki></pre>
 
</nowiki></pre>
 
 
so when query the version of each one you will get 3.4.*, as:
 
so when query the version of each one you will get 3.4.*, as:
 
<pre><nowiki>
 
<pre><nowiki>
第54行: 第44行:
 
This is free software; see the source for copying conditions.  There is NO
 
This is free software; see the source for copying conditions.  There is NO
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
# g++ --version
 
# g++ --version
 
g++ (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
 
g++ (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
第60行: 第49行:
 
This is free software; see the source for copying conditions.  There is NO
 
This is free software; see the source for copying conditions.  There is NO
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
# cpp --version
 
# cpp --version
 
cpp (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
 
cpp (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
第67行: 第55行:
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
</nowiki></pre>
 
</nowiki></pre>
 
 
For the compilation to be successfull you also have to install a few additional libraries and programs
 
For the compilation to be successfull you also have to install a few additional libraries and programs
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# sudo apt-get install librpm-dev libgtk2.0-dev jam  
 
# sudo apt-get install librpm-dev libgtk2.0-dev jam  
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now you should create a new user account in the system.
 
Now you should create a new user account in the system.
 
Add a new user, the username is not important, but I will use 'ingres' for example.
 
Add a new user, the username is not important, but I will use 'ingres' for example.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# adduser ingres
 
# adduser ingres
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Add the created user to the kmem group:
 
Add the created user to the kmem group:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# useradd -g kmem ingres
 
# useradd -g kmem ingres
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Switch the user to ingres:
 
Switch the user to ingres:
 
<pre><nowiki>
 
<pre><nowiki>
第92行: 第73行:
 
# cd /home/ingres
 
# cd /home/ingres
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Create a new folder 'ingres2006-src', and move there:
 
Create a new folder 'ingres2006-src', and move there:
 
<pre><nowiki>
 
<pre><nowiki>
第98行: 第78行:
 
# cd ingres2006-src
 
# cd ingres2006-src
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Then, you should download the source of the Ingres 2006 from http://downloads.ingres.com/download/ingres2006-9.0.4-103-gpl-src.tgz :
 
Then, you should download the source of the Ingres 2006 from http://downloads.ingres.com/download/ingres2006-9.0.4-103-gpl-src.tgz :
 
<pre><nowiki>  
 
<pre><nowiki>  
 
# wget http://downloads.ingres.com/download/ingres2006-9.0.4-103-gpl-src.tgz
 
# wget http://downloads.ingres.com/download/ingres2006-9.0.4-103-gpl-src.tgz
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Extract the archive:
 
Extract the archive:
 
<pre><nowiki>
 
<pre><nowiki>
 
# gunzip < ingres2006-9.0.4-103-gpl-src.tgz    | tar xvf -  
 
# gunzip < ingres2006-9.0.4-103-gpl-src.tgz    | tar xvf -  
 
</nowiki></pre>  
 
</nowiki></pre>  
 
 
Set ING_ROOT to the current folder:
 
Set ING_ROOT to the current folder:
 
<pre><nowiki>
 
<pre><nowiki>
 
export ING_ROOT=`pwd`
 
export ING_ROOT=`pwd`
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Building Dependencies ===
 
=== Building Dependencies ===
 
In addition to the Ingres source code itself, you will need the Xerces 2.5 headers and library (which provide the XML link between Ingres and the Apache web server), and you will need the Kerberos network authentication protocol headers.
 
In addition to the Ingres source code itself, you will need the Xerces 2.5 headers and library (which provide the XML link between Ingres and the Apache web server), and you will need the Kerberos network authentication protocol headers.
 
 
Also required for the build is a special version of pax (the Portable Archive Interchange program). Modifications have been made to this program to allow it to work with the Ingres checkpoint process. (Support has been added for the OCFS file system and for Linux files up to 8GB in length.  While the standard version of pax is adequate for creating the Ingres tar installation medium, it is not suitable for Ingres runtime operations.) All of these dependencies are included with the Ingres source package.  
 
Also required for the build is a special version of pax (the Portable Archive Interchange program). Modifications have been made to this program to allow it to work with the Ingres checkpoint process. (Support has been added for the OCFS file system and for Linux files up to 8GB in length.  While the standard version of pax is adequate for creating the Ingres tar installation medium, it is not suitable for Ingres runtime operations.) All of these dependencies are included with the Ingres source package.  
 
 
==== Building pax ====
 
==== Building pax ====
 
Building pax is so simple:
 
Building pax is so simple:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# cd $ING_ROOT/pax
 
# cd $ING_ROOT/pax
 
# jam
 
# jam
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
==== Building xerces-c ====
 
==== Building xerces-c ====
 
To build Xerces, you need to modify one file in its source code.
 
To build Xerces, you need to modify one file in its source code.
第135行: 第106行:
 
# vi RefArrayOf.hpp.patch
 
# vi RefArrayOf.hpp.patch
 
</nowiki></pre>
 
</nowiki></pre>
 
 
The patch file should contain this text:
 
The patch file should contain this text:
 
<pre><nowiki>
 
<pre><nowiki>
第141行: 第111行:
 
> #include <xercesc/framework/MemoryManager.hpp>
 
> #include <xercesc/framework/MemoryManager.hpp>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Patch RefArrayOf.hpp:
 
Patch RefArrayOf.hpp:
 
<pre><nowiki>
 
<pre><nowiki>
 
# patch RefArrayOf.hpp < RefArrayOf.hpp.patch
 
# patch RefArrayOf.hpp < RefArrayOf.hpp.patch
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Build Xerces-c  
 
Build Xerces-c  
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# cd $ING_ROOT/xerces-c-src_2_5_0  
 
# cd $ING_ROOT/xerces-c-src_2_5_0  
第157行: 第124行:
 
# make
 
# make
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Building Ingres itself ===
 
=== Building Ingres itself ===
 
You should move to $ING_ROOT, and then prepare the environment variable as:
 
You should move to $ING_ROOT, and then prepare the environment variable as:
第164行: 第130行:
 
# source src/tools/port/jam/bldenv
 
# source src/tools/port/jam/bldenv
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Next, bootstrap the build.  This includes building mkjam and mkjams, which automate the creation of Jamfiles, and then invoking mkjams to set up the build tree:
 
Next, bootstrap the build.  This includes building mkjam and mkjams, which automate the creation of Jamfiles, and then invoking mkjams to set up the build tree:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# cd $ING_SRC/tools/port/jam
 
# cd $ING_SRC/tools/port/jam
第173行: 第137行:
 
# cd $ING_SRC
 
# cd $ING_SRC
 
</nowiki></pre>
 
</nowiki></pre>
 
 
You are now ready to compile Ingres.  This is done with the following command:
 
You are now ready to compile Ingres.  This is done with the following command:
 
<pre><nowiki>
 
<pre><nowiki>
第183行: 第146行:
 
# tail -f jam.out
 
# tail -f jam.out
 
</nowiki></pre>
 
</nowiki></pre>
 
 
In my computer it took about 15 minutes to finish the compilation. In the end you should get no skipped or failed targets.
 
In my computer it took about 15 minutes to finish the compilation. In the end you should get no skipped or failed targets.
 
 
====  Auditing the build ====
 
====  Auditing the build ====
 
 
Some warning messages are expected during the build process (for explanations of some of these, see the Ingres building FAQ at http://www.ingres.com/).
 
Some warning messages are expected during the build process (for explanations of some of these, see the Ingres building FAQ at http://www.ingres.com/).
 
 
How can you tell, then, if the build was successful?  First, look at the final messages issued by jam.  Jam should report a (large) number of targets "updated", and should NOT report any targets as "failed" or "skipped".
 
How can you tell, then, if the build was successful?  First, look at the final messages issued by jam.  Jam should report a (large) number of targets "updated", and should NOT report any targets as "failed" or "skipped".
 
 
You should also run two programs to check the status of the build process for Ingres itself and for its testing tools.  To be sure that the building of all Ingres components is successful, use the buildrel program's audit option:
 
You should also run two programs to check the status of the build process for Ingres itself and for its testing tools.  To be sure that the building of all Ingres components is successful, use the buildrel program's audit option:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# buildrel -a
 
# buildrel -a
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Note that the buildrel audit step is required, since buildrel (in addition to checking for missing files) adjusts the file permissions of some of the built files.  If the Ingres build is successful, buildrel will not report any missing files.
 
Note that the buildrel audit step is required, since buildrel (in addition to checking for missing files) adjusts the file permissions of some of the built files.  If the Ingres build is successful, buildrel will not report any missing files.
 
 
As a final auditing step, make sure that all the files needed for Ingres acceptance testing were correctly built:
 
As a final auditing step, make sure that all the files needed for Ingres acceptance testing were correctly built:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# tartools -a
 
# tartools -a
 
</nowiki></pre>
 
</nowiki></pre>
 
 
If this command too reports no missing files, your build is complete!
 
If this command too reports no missing files, your build is complete!
 
 
==== Packaging Ingres ====
 
==== Packaging Ingres ====
 
 
Ingres can be packaged for installation either as a standard tar ball or as a set of RPM packages.  There is no documentation how to build a .deb packages for ubuntu for now.
 
Ingres can be packaged for installation either as a standard tar ball or as a set of RPM packages.  There is no documentation how to build a .deb packages for ubuntu for now.
 
 
In ubuntu, you will be using the tar format. Therefor you must first assemble the Ingres components for packaging using the buildrel program.
 
In ubuntu, you will be using the tar format. Therefor you must first assemble the Ingres components for packaging using the buildrel program.
 
 
First, set up a staging area for this assembly process.  Typically, you would want to name this staging directory based on the "build=" line in $ING_SRC/tools/port/conf/VERS.  For example, if the VERS file contains the line build=00 you would use the following commands:
 
First, set up a staging area for this assembly process.  Typically, you would want to name this staging directory based on the "build=" line in $ING_SRC/tools/port/conf/VERS.  For example, if the VERS file contains the line build=00 you would use the following commands:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# mkdir -p $ING_ROOT/release/r00
 
# mkdir -p $ING_ROOT/release/r00
第222行: 第170行:
 
# buildrel
 
# buildrel
 
</nowiki></pre>
 
</nowiki></pre>
 
 
To create an installable Ingres tar ball, simply create a tar file that contains the components of this staging area:
 
To create an installable Ingres tar ball, simply create a tar file that contains the components of this staging area:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# tar cvf ../ingres.tar *
 
# tar cvf ../ingres.tar *
 
</nowiki></pre>
 
</nowiki></pre>
 
 
There is nothing magic about the name "ingres.tar".  For clarity (keeping track of product builds and the resulting tar files) you
 
There is nothing magic about the name "ingres.tar".  For clarity (keeping track of product builds and the resulting tar files) you
 
could call this, for example, "r00.tar" or "ingres_r00.tar".
 
could call this, for example, "r00.tar" or "ingres_r00.tar".
 
 
== Installing Ingres ==
 
== Installing Ingres ==
 
 
To install Ingres in the simplest manner, unpack the ingres.tar in a directory, for example /opt/ingres
 
To install Ingres in the simplest manner, unpack the ingres.tar in a directory, for example /opt/ingres
 
<pre><nowiki>
 
<pre><nowiki>
第252行: 第195行:
 
export TERM_INGRES=konsolel
 
export TERM_INGRES=konsolel
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now you can use all the tools supplied by ingres as the ingres-user. I suggest you start with  
 
Now you can use all the tools supplied by ingres as the ingres-user. I suggest you start with  
 
<pre><nowiki>
 
<pre><nowiki>
第258行: 第200行:
 
</nowiki></pre>
 
</nowiki></pre>
 
to create your first database.
 
to create your first database.
 
 
For a more complex setup/configuration, as it is highly suggested, have a look at the Ingres documentation.  
 
For a more complex setup/configuration, as it is highly suggested, have a look at the Ingres documentation.  
 
 
 
== Further Reading ==
 
== Further Reading ==
 
 
== References ==
 
== References ==
 
1. The INSTALL file in the ingres source package.
 
1. The INSTALL file in the ingres source package.
 
 
2. A post from Michael Touloumtzis in http://groups.google.com/group/fa.ingres/browse_frm/thread/d6c232ec984d101c/28e793aa27600861?tvc=1#28e793aa27600861
 
2. A post from Michael Touloumtzis in http://groups.google.com/group/fa.ingres/browse_frm/thread/d6c232ec984d101c/28e793aa27600861?tvc=1#28e793aa27600861
 
 
3. Ingres® 2006 Getting Started (gs.pdf).
 
3. Ingres® 2006 Getting Started (gs.pdf).
 
 
4. Ingres® 2006 for Linux Getting Started (gs-linux.pdf).
 
4. Ingres® 2006 for Linux Getting Started (gs-linux.pdf).
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2007年11月30日 (五) 21:27的版本

Ingres Quickstart

How to build, install and set up an Ingres 2006 server in ubuntu.

Introduction

Open source database solutions that provide enterprise-level functionality, services and support are revolutionizing today’s marketplace.

Features

Ingres is a complete relational solution, providing the following features:

  • A robust, high-performance relational database management system (RDBMS) on which you can build the best in mission-critical applications.
  • Support for the latest technology, such as multiple processors and 64-bit architecture, and standards such as XML and Unicode. The extensive list of supported platforms includes Linux for zSeries and S/390, UNIX, and Windows.
  • Easy to manage environment that requires far less maintenance than the competition. Ingres is hard to beat in the area of long-term cost of ownership.
  • The Ingres Management Architecture (IMA) tools provide the framework that allows you to create system management applications using standard SQL tools and access multiple installations across Ingres Net.
  • Ingres Web Deployment Option provides users with a secure and reliable foundation for Internet-based electronic commerce. Applications developed with Ingres Web Deployment Option can be used to provide full read/write access to enterprise-wide corporate data. Database-driven web sites provide much greater flexibility and can reflect changes in dynamic content as they happen.
  • Open connectivity lets you integrate the entire enterprise—from PCs to mainframes. Ingres Net, coupled with the Ingres ODBC and JDBC drivers, let you take advantage of the technologies that drive the business environment. Through ODBC, Ingres allows transparent access to enterprise data repositories. Applications developed through ODBC are independent of hardware, networking protocols, and operating systems. The Ingres ODBC driver uses the native API (application programming interface), effectively making ODBC a native language for Ingres. If you prefer, you can use the OpenAPI to provide access to all distributed databases and take advantage of an alternative to embedded SQL.
  • Integration of data from multiple sources on different platforms from a single application. The Enterprise Access products provide a single, standard interface for both relational and pre-relational databases. Real-time access is provided for a variety of client applications running on Windows, OpenVMS, UNIX, and Linux workstations, as well as through web browsers. Popular application development tools can utilize this technology, meaning that your options are unlimited. Databases supported include all popular UNIX or Microsoft Windows-based database management systems such as Oracle, Informix, Sybase, and Microsoft SQL Server. On the OS/390 platform, a separate product called EDBC gives the same level of access to Advantage CA-IDMS Database, Advantage Datacom Database, DB2, VSAM, CICS/VSAM, and IMS — so you can truly take your data from anywhere.
  • Ingres Distribution Option supports distributed databases across a wide variety of hardware, software, and networking architectures. Regardless of whether the data resides on desktops or mainframes, Ingres Distributed Option lets you treat all your enterprise data as a single, global Ingres database.
  • Ingres Replicator Option provides fault-tolerant data replication and guaranteed data integrity. Two-way replication allows your business to carry on when the network link is down. This process holds the data and completes the replication as soon as the network becomes available. Data is readily available to users at anytime or anywhere, and can be administered using the graphical user interface of Visual DBA.
  • The Ingres character-based tools including Embedded SQL and Vision are available for more traditional environments. Embedded SQL programming kits are available for C, COBOL, Fortran, and several other 3GLs.
  • Additional platform-specific, TP monitoring, and cluster support options, provide the integrity and reliability you need in a distributed environment by ensuring that transactions do not get lost or damaged.
  • The Ingres Cluster Solution on Linux provides support for Linux Cluster environments. Ingres exploits open source and third party software to provide extensions to the base operating system. This software includes cluster file systems such as Oracle Cluster File System (OCFS) and the Red Hat Global File System (GFS), and the OpenDLM Distributed Lock Manager (DLM) based on the AIX DLM released by IBM to the open source community. Linux Cluster support lets you achieve scalability and reliability on a low-cost clustering platform.

Building Ingres

Unfortunately, there is no Ingres pre-built package for Ubuntu. Therefore you should build Ingres from source.

Preparing to build

Building Ingres from source requires installation of a few tools with a specific versions.

# sudo apt-get install gcc-3.4 g++-3.4 make jam 

Also, you should make those tools your defaults,

# sudo rm /usr/bin/gcc
# sudo rm /usr/bin/g++
# sudo rm /usr/bin/cpp
# sudo rm /usr/bin/cc
# sudo ln -s /usr/bin/gcc-3.4 /usr/bin/gcc
# sudo ln -s /usr/bin/g++-3.4 /usr/bin/g++
# sudo ln -s /usr/bin/cpp-3.4 /usr/bin/cpp
# sudo ln -s /usr/bin/gcc-3.4 /usr/bin/cc

so when query the version of each one you will get 3.4.*, as:

# gcc --version
gcc (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# g++ --version
g++ (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# cpp --version
cpp (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For the compilation to be successfull you also have to install a few additional libraries and programs

# sudo apt-get install librpm-dev libgtk2.0-dev jam 

Now you should create a new user account in the system. Add a new user, the username is not important, but I will use 'ingres' for example.

# adduser ingres

Add the created user to the kmem group:

# useradd -g kmem ingres

Switch the user to ingres:

# sudo -u ingres -s
# cd /home/ingres

Create a new folder 'ingres2006-src', and move there:

# mkdir ingres2006-src
# cd ingres2006-src

Then, you should download the source of the Ingres 2006 from http://downloads.ingres.com/download/ingres2006-9.0.4-103-gpl-src.tgz :

 
# wget http://downloads.ingres.com/download/ingres2006-9.0.4-103-gpl-src.tgz

Extract the archive:

# gunzip < ingres2006-9.0.4-103-gpl-src.tgz    | tar xvf - 

Set ING_ROOT to the current folder:

export ING_ROOT=`pwd`

Building Dependencies

In addition to the Ingres source code itself, you will need the Xerces 2.5 headers and library (which provide the XML link between Ingres and the Apache web server), and you will need the Kerberos network authentication protocol headers. Also required for the build is a special version of pax (the Portable Archive Interchange program). Modifications have been made to this program to allow it to work with the Ingres checkpoint process. (Support has been added for the OCFS file system and for Linux files up to 8GB in length. While the standard version of pax is adequate for creating the Ingres tar installation medium, it is not suitable for Ingres runtime operations.) All of these dependencies are included with the Ingres source package.

Building pax

Building pax is so simple:

# cd $ING_ROOT/pax
# jam

Building xerces-c

To build Xerces, you need to modify one file in its source code. Move to '$ING_ROOT/xerces-c-src_2_5_0/src/xercesc/util' folder, and create a patch file 'RefArrayOf.hpp.patch'

# cd $ING_ROOT/xerces-c-src_2_5_0/src/xercesc/util
# vi RefArrayOf.hpp.patch

The patch file should contain this text:

103a104 
> #include <xercesc/framework/MemoryManager.hpp>

Patch RefArrayOf.hpp:

# patch RefArrayOf.hpp < RefArrayOf.hpp.patch

Build Xerces-c

# cd $ING_ROOT/xerces-c-src_2_5_0 
# export XERCESCROOT=`pwd` 
# cd $XERCESCROOT/src/xercesc 
# autoconf 
# runConfigure -plinux -cgcc-3.4 -xg++-3.4 -minmem -nsocket -tnative -rpthread 
# make

Building Ingres itself

You should move to $ING_ROOT, and then prepare the environment variable as:

# cd $ING_ROOT
# source src/tools/port/jam/bldenv

Next, bootstrap the build. This includes building mkjam and mkjams, which automate the creation of Jamfiles, and then invoking mkjams to set up the build tree:

# cd $ING_SRC/tools/port/jam
# jam
# mkjams
# cd $ING_SRC

You are now ready to compile Ingres. This is done with the following command:

# jam

Because of the voluminous output of the build process and because you may want to examine the full output, it is wise to redirect the jam output to a file. For example:

# jam >& jam.out &
# tail -f jam.out

In my computer it took about 15 minutes to finish the compilation. In the end you should get no skipped or failed targets.

Auditing the build

Some warning messages are expected during the build process (for explanations of some of these, see the Ingres building FAQ at http://www.ingres.com/). How can you tell, then, if the build was successful? First, look at the final messages issued by jam. Jam should report a (large) number of targets "updated", and should NOT report any targets as "failed" or "skipped". You should also run two programs to check the status of the build process for Ingres itself and for its testing tools. To be sure that the building of all Ingres components is successful, use the buildrel program's audit option:

# buildrel -a

Note that the buildrel audit step is required, since buildrel (in addition to checking for missing files) adjusts the file permissions of some of the built files. If the Ingres build is successful, buildrel will not report any missing files. As a final auditing step, make sure that all the files needed for Ingres acceptance testing were correctly built:

# tartools -a

If this command too reports no missing files, your build is complete!

Packaging Ingres

Ingres can be packaged for installation either as a standard tar ball or as a set of RPM packages. There is no documentation how to build a .deb packages for ubuntu for now. In ubuntu, you will be using the tar format. Therefor you must first assemble the Ingres components for packaging using the buildrel program. First, set up a staging area for this assembly process. Typically, you would want to name this staging directory based on the "build=" line in $ING_SRC/tools/port/conf/VERS. For example, if the VERS file contains the line build=00 you would use the following commands:

# mkdir -p $ING_ROOT/release/r00
# cd $ING_ROOT/release/r00
# export II_RELEASE_DIR=`pwd`
# buildrel

To create an installable Ingres tar ball, simply create a tar file that contains the components of this staging area:

# tar cvf ../ingres.tar *

There is nothing magic about the name "ingres.tar". For clarity (keeping track of product builds and the resulting tar files) you could call this, for example, "r00.tar" or "ingres_r00.tar".

Installing Ingres

To install Ingres in the simplest manner, unpack the ingres.tar in a directory, for example /opt/ingres

# mkdir /opt/ingres
# cd /opt/ingres
# tar xvf /path/to/ingres.tar

then set the environment variable II_SYSTEM to this directory and execute ingbuild

# $II_SYSTEM/ingres/install/ingbuild -all /path/to/ingres.tar

In order to work with your Ingres installation, you should set some environment variables for the ingres-user. Add the following to the .bashrc of your ingres-user

export II_SYSTEM=/opt/ingres
export PATH=$II_SYSTEM/ingres/bin:$II_SYSTEM/ingres/utility:$PATH
export LD_LIBRARY_PATH=$II_SYSTEM/ingres/lib:$LD_LIBRARY_PATH
export TERM_INGRES=konsolel

Now you can use all the tools supplied by ingres as the ingres-user. I suggest you start with

# createdb <database name>

to create your first database. For a more complex setup/configuration, as it is highly suggested, have a look at the Ingres documentation.

Further Reading

References

1. The INSTALL file in the ingres source package. 2. A post from Michael Touloumtzis in http://groups.google.com/group/fa.ingres/browse_frm/thread/d6c232ec984d101c/28e793aa27600861?tvc=1#28e793aa27600861 3. Ingres® 2006 Getting Started (gs.pdf). 4. Ingres® 2006 for Linux Getting Started (gs-linux.pdf).