In this section, the actual installation of Ingres takes place.
In the following I will presume that you install directly from the CD which is mounted under /cdrom. Depending on whether you install the SDK or the full version of Ingres, you have to start the installation differently.
For the SDK:
Log in as ingres.
cd to $II_SYSTEM/ingres if it is not your home directory.
Unpack the install subdirectory from the tar file.
Start the ingbuild program.
$ cd $II_SYSTEM/ingres $ tar xf /cdrom/int_lnx/ingres.tar install $ install/ingbuild |
For the full version:
Log in as root.
Start the installer.
# /cdrom/install.sh |
In this latter case, you have to let the installer know the owner of
the installation (ingres), and the value of II_SYSTEM
.
After that, install.sh starts ingbuild
for you.
From this point on, the installation process is the same for both options.
On the starting screen of ingbuild you have to specify the path to the tar file and select the type of install: Custom or Package. I suggest you go for Custom Install to be able to choose exactly those elements you want to install.
After choosing Custom Install, a table on the next screen shows all components of your Ingres version together with their respective sizes. Because of common parts in different components, the sizes added up indicate much more disk space than is really needed for the installation.
By default every component is set to be installed.
If you want to exclude some of them, write "No"
in their "Install?"
field.
You had previously decided if the default values for the "stable"
Ingres environment variables were acceptable
for your installation.
If this is the case, you can choose Express Install
here.
Remember that you can alter the value of II_LOG_FILE
as well as
the size of the transaction log at any time later.
If this is your first Ingres install, you have the necessary space under $II_SYSTEM/ingres and the "stable" parameters' default values are OK, I suggest you choose Express Install. |
Therefore, let us see this option first.
In the case of Express Install, the installer executes the following tasks:
It untars all chosen components from the ingres.tar file to the $II_SYSTEM/ingres/install/tmp directory.
Checks the integrity of the components.
Puts the components in appropriate subdirectories under $II_SYSTEM/ingres.
Sets the Ingres environment variables to their default values.
Starts Ingres.
Creates the iidbdb database.
Takes a checkpoint of iidbdb.
Stops Ingres.
Sets up those components that require this (ABF, Enhanced Security, etc).
If the installation process went OK, the program tells you that every
installed component is ready to use.
In the table on the screen the "Install?"
column shows
"Ready"
for every selected component.
Ingres is installed on your machine. Jump to Completing the Initial Configuration.
If you choose Install rather than Express Install, the installer untars ingres.tar, checks the integrity of the components and puts them in their respective directories. Then it asks you if you want to setup these components now.
If you decide to do the setup later, the installer stops.
In the table containing the components the "Install?"
column shows "Not Set Up"
for every
selected component.
You can run ingbuild again at any time and choose one of
the options Setup All or
Setup to set up all or one of the components.
A component cannot be used until it has been set up.
Let us see what happens if you choose to set up the components.
First, you have to set up the DBMS server. On the screens to follow you will see a fair amount of explanatory text about the parameters we have covered earlier.
During the setup phase, the installer prompts you for the values of the Ingres environment variables and the other necessary parameters:
II_INSTALLATION
.
II_DATABASE
.
II_CHECKPOINT
: if you set it to the same value
as II_DATABASE
, the installer warns you of the dangers
of losing a database and its backup at the same time.
You have to repeat II_CHECKPOINT
's value for the
program to accept it.
II_JOURNAL
.
II_DUMP
.
II_WORK
.
II_LOG_FILE
: the installer reminds you of
Ingres' capability of mirroring the
transaction log.
Naturally, it only makes sense if the mirrored log file is on a
different disk than the primary log file.
The installer asks you if you want to disable
dual logging.
Then you have to specify the size of the log (16 Mb by default,
make it bigger if you have free disk space as I suggested earlier).
After this you have to tell the installer where to put the primary
log file, and, if you did not switch off dual logging, the dual log
file (II_DUAL_LOG
).
II_NUM_OF_PROCESSORS
.
II_TIMEZONE_NAME
.
II_CHARSET
.
Expected number of concurrent users.
SQL-92 compatible databases.
At every prompt, enter the appropriate parameter's previously decided value.
The installer may also ask you about other components you have chosen to install. Accept the defaults for these.
Full Version |
---|
If you requested the installation of Net, make ingbuild set it up. Do not bother setting an installation password, unless you know what it is: we will complete Net's configuration later, in its own section (Ingres/Net). |
After an Express Install (but perhaps after a manual install as well), you may want to change the values of some of the Ingres environment variables. You will see how to do this here. Stay logged in as ingres.
You can view the current values of Ingres environment variables with the ingprenv command:
$ ingprenv |
You can change the value of any variable with the ingsetenv command:
$ ingsetenv II_TIMEZONE_NAME GMT1 |
In the example we set II_TIMEZONE_NAME
to
GMT1
(Greenwich Mean Time + 1 hour),
which happens to be the time zone Hungary is placed in.
You can find all possible values for II_TIMEZONE_NAME
in the
file $II_SYSTEM/ingres/files/tz.crs (look for the lists
beginning with the word VALID
).
You can change the value of any other Ingres environment variable in a similar way. ingprenv and ingsetenv do not require a running Ingres server.
The System Reference Guide contains the description of every Ingres environment variable. Let me mention two of those that we have not covered yet.
II_DATE_FORMAT
determines the display format of dates.
By default, its value is US
which provides the format
dd-mmm-yy
.
The setting of |
Another Ingres environment variable that
has a good chance to be changed from its default value is
II_MONEY_FORMAT
.
This one is responsible for how values of money type are displayed.
Just like with dates, the value of |
II_MONEY_FORMAT
consists of two parts: the first part
tells whether the currency sign precedes the amount (L
= Leading or T
= Trailing), the second part describes
the currency itself ($
, DM
,
Ft
, etc.: this part is a string of maximum 4 characters).
The two parts are separated by a colon.
II_MONEY_FORMAT
defaults to L:$
.
Only the ingres user is allowed to use ingsetenv,
since these Ingres environment variables apply to
the whole installation.
However, some Ingres environment variables
(including II_DATE_FORMAT
and II_MONEY_FORMAT
)
can be overridden in the users' shell, via Linux variables of the same name.
You can check the System Reference Guide about which
other variables fall into this category.
Be careful: Ingres will not prevent
you from changing the value of any Ingres
environment variable, including |
You can find information on how to setup Net and ICE in separate sections (Ingres/Net, and ICE, respectively).
If you want to re-install Ingres for any reason, remember to do the following first:
Backup everything you need from $II_SYSTEM/ingres (user databases, source code of applications stored there, etc.). Also backup any other databases you want to keep that are stored in different locations. You can use the unloaddb utility for creating portable copies of databases. On unloaddb see the System Reference Guide.
Stop Ingres.
Remove everything under $II_SYSTEM/ingres. Also remove the contents of every other location where you stored any part of any database.
Databases that are not completely removed can cause problems when you try to re-create them. |
For installing the SDK, you can run ingbuild in batch mode as well. The easiest way to do an Express Install is to start ingbuild in the following way (logged in as ingres):
$ cd $II_SYSTEM/ingres $ tar xf /cdrom/int_lnx/ingres.tar install $ install/ingbuild -express /cdrom/int_lnx/ingres.tar |
In this case a regular Express Install takes place without having to press another key.
If you have the full Ingres version, you may want to set up a client installation. If your application will run on a different machine than the database server, all you need on the application server is a client Ingres installation.
For a client install, choose PackageInstall in ingbuild, then mark "Ingres Networked Client" to be installed. After the installation has been finished, go to section Ingres/Net to set up Net.
No matter which type of install you have chosen (Express or Manual), you can find all of ingbuild's messages in $II_SYSTEM/ingres/files/install.log. I suggest you check this file after an Express Install to see what happened during the installation process. On the other hand, if ingbuild stops with an error message, also check this log for possible clues to the cause of the error.
After you have installed and configured Ingres, it is time to check if it works properly. Supposing you are still logged in as ingres, start the Ingres system:
$ ingstart |
Create a new database:
$ createdb test |
Start the command line SQL interface:
$ sql test |
Create a table, insert a row into it and query the table's contents:
create table t1 (col1 char(10)); insert into t1 values ('abcde'); select * from t1; \g |
If everything went OK, you should see something like the following:
$ sql test INGRES TERMINAL MONITOR Copyright (c) 1981, 1998 Computer Associates Intl, Inc. Ingres Linux Version II 2.0/9808 (lnx.us5/95)libc6 login Sun Oct 3 03:43:54 1999 continue * create table t1 (col1 char(10)); * insert into t1 values ('abcde'); * select * from t1; * \g Executing . . . (1 row) col1 abcde (1 row) continue * |
You can leave sql with the command \q.