5. The Installation Process

In this section, the actual installation of Ingres takes place.

5.1. Starting the Installation Program

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:

  1. Log in as ingres.

  2. cd to $II_SYSTEM/ingres if it is not your home directory.

  3. Unpack the install subdirectory from the tar file.

  4. Start the ingbuild program.

$ cd $II_SYSTEM/ingres
$ tar xf /cdrom/int_lnx/ingres.tar install
$ install/ingbuild
	

For the full version:

  1. Log in as root.

  2. 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.

Tip

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.

5.2. Express Install

In the case of Express Install, the installer executes the following tasks:

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.

5.3. Manual Install

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:

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).

5.4. Completing the Initial Configuration

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.

Note

The setting of II_DATE_FORMAT has no effect on the way dates are stored in the database. Ingres always stores full date values, century included. Hence, you can change the setting of II_DATE_FORMAT without the risk of corrupting data. In order to avoid Y2K problems in your applications, you should use a date format that contains the century, such as MULTINATIONAL4 (dd/mm/yyyy) or FINLAND (yyyy-mm-dd). The latter seems especially proper under Linux :-)

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.

Note

Just like with dates, the value of II_MONEY_FORMAT has no impact on the storage format of money columns.

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.

Warning

Be careful: Ingres will not prevent you from changing the value of any Ingres environment variable, including II_DATABASE, II_CHECKPOINT, II_CHARSET, etc. (the "stable" parameters as we saw earlier). However, if you change one of these, prepare for the nastiest possible consequences, the mildest one of which is that Ingres will not run.

You can find information on how to setup Net and ICE in separate sections (Ingres/Net, and ICE, respectively).

5.5. Re-installation

If you want to re-install Ingres for any reason, remember to do the following first:

Warning

Databases that are not completely removed can cause problems when you try to re-create them.

5.6. Command Line Install (SDK)

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.

5.7. Client Installation (Full Version)

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.

5.8. The Installer's Log

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.

5.9. Checking the Installation

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.

mirror server hosted at Truenetwork, Russian Federation.