Linux + Informix background database system installation and configuration

Source: Internet
Author: User
Tags informix informix odbc driver

This article assumes that the use of Informix starts from scratch, and describes the detailed steps for maximizing the use of Informix from scratch. Note: The content about VI editing in this article is placed between the equal signs of two rows. You need to edit and save the disk.

 

1. Download the Informix-Online Database Server Linux Trial System

Address: http://www.intraware.com, register as a user of the Informix trial system, and tell the correct email address, then intraware will send you an email, tell you the installation authorization name and password of the system on this site that will be downloaded later. Of course, the name and password of the authorized user will also appear on the screen during the download. You must copy the name carefully. (Generally, the authorization name is different from your name)

After successful registration, go to the evlaute (or evaluation or trial download) Link Page, login in to enter the download page, and select the Informix product you want. This document uses Linux as an example to download Informix dynamic_server_2000bar, that is, informix_dynamic_server_2000_s_o_v9_21_uc2_for_linux.zip.

2. Install Informix-Online 2000/, decompress the downloaded file informix_dynamic_server_2000_s_o_v9_21_uc2_for_linux.zip (whether win download or Linux download)

In Linux, log on to the system as the root user.

1: Create an Informix User Name (adduser)

2: Create an Informix group (groupadd)

3: Changing the attributes of the Informix user's home directory

# Chown Informix. Informix/home/Informix

If you use win for download:

1: If Linux is not installed and started on the same machine, mount the hard disk partition where the downloaded file is located. For example, if I am D:

# Mkdir/mnt/win

# Mount-T vfat/dev/hda5/mnt/win

2: if Linux is installed on another machine, only Samba sharing is configured, upload the downloaded Informix Online 2000 System in windows to a directory on a Linux machine (in this example,/mnt/WIN)

3: If you downloaded it from Linux, use the stored directory. (In this example, it is still/mnt/WIN ).

Start 3

Go to the downloaded Informix online directory

# Cd/mnt/win

Set the installation environment

# Informixdir =/home/Informix

# Export informixdir

Since the directory structure of the Informix Online 921 installation package RPM downloaded by interware is/opt/Informix or/usr/Informix, not necessarily/home/Informix. The installation command is as follows:

# Rpm-IVH-Relocate/opt/Informix =/home/Informix informix_dynamic_server_2000_s_o_v9_21_uc2_for_linux.rpm

During installation, you are required to enter your authorization number and password. We recommend that you do not install this package in the GUI environment. Generally, the installation may fail.

Start 4: Set the Linux operating environment

# Cd/etc

# Vi hosts

========================================================== ========================================

# Add your NIC address, host name, and other computer addresses to access the machine as needed

========================================================== ========================================

# Vi services

========================================================== ========================================

Sqlexec 9999/tcp # Your Informix Database Server Service name will be sqlexec

========================================================== ========================================

# Cd/root (set the Root User Startup environment)

# Ls-

# Vi. bash_profile

========================================================== ======================================

Path = $ path: $ home/bin: $ home/etc:/home/Informix/bin:/home/Informix/etc

.......

Informixdir =/home/Informix

Informixsqlhosts =/home/Informix/etc/sqlhosts

Informixserver = demo_on # Name of the online server, which is different from the service name

Term = 100 # display the menu of Informix dbaccess

Export path ........ Informixdir informixserver informixsqlhosts term

========================================================== ========================================

Set the Informix user environment

# Cd/home/Informix

# Ls-

# Vi. bash_profile

========================================================== ========================================

Path = $ path: $ home/bin: $ home/etc

.......

Informixdir = $ home

Informixsqlhosts = $ home/etc/sqlhosts

Informixserver = demo_on # Name of the online server, which is different from the service name

Term = 100 # display the menu of Informix dbaccess

Export path ........ Informixdir informixserver informixsqlhosts term

========================================================== ==========================================

Create the data space file of the online service database server (assuming you plan to create it in/home/Informix, otherwise, please enter/home/Informix in the directory to be created ), obtain a name, such as root_chunk.

# Cd/home/Informix (Data Space Directory)

# Cat/dev/null> root_chunk

# Chmod 660 root_chunk

Set other attributes

# Cd/home/Informix

# CD etc

# Cp sqlhosts. STD sqlhosts

# Vi sqlhosts

========================================================== ==========================================

# Format: online server name protocol name Host Name Service name

Demo_on onsoctcp myhostname sqlexec

========================================================== ==========================================

# Cp onconfig. STD onconfig

# Vi onconfig

========================================================== ==========================================

# Change all such as/opt/Informix to/home/Informix

................

Rootpath/home/Informix/root_chunk

..................

Rootsize 40000 (set the size of the data space as per your needs, in kilobytes, for example, 40 MB)

..................

Dbservername demo_on (same as in sqlhosts)

========================================================== ==========================================

OK, set it. Press Ctrl + D to exit logout and use root to enter login.

Start Informix Online

At the first startup, You need to initialize Informix Online

# Oninit-I (in lower case, the parameter is used only for the first time). If there is anything, yes. Wait for half a minute.

# Ps-EF: the online server is started.

# Onmode-K shut down the online server,

# The oninit method directs the online server again in the normal way. No parameter is required.

Congratulations! Your Informix online has been running well.

5. How to configure ODBC access to Informix online in win

First download the Informix connect for WIN (Informix ODBC driver) or client software package. I was copied to me by someone else. You can consult someone else or find a specific website. If it is not too slow, you can go to http://winhelp.163.net/win_nt95-informix-odbc.zip to download the example and write it in a small article. Install it on the Windows server. For example, set the directory to C:/Informix.

1 run Informix setnet32

In enviroment, set:

Informixdir = C:/Informix Client ODBC/connect installation directory

Informixserver = demo_on (name of the online database server)

Informixsqlhosts =/home/Informix/etc/sqlhosts (same as sqlhosts on Linux)

Set in server information:

Informix Server = demo_on (online database server name)

Host Name = myhostname (host name of Linux)

Protocol name = onsoctcp

Service name = sqlexec (Service name)

Set in host Informix:

Current host = myhostname (host name of Linux)

User name = Informix (User Name in Linux, which can be left blank here, required)

Password option = Password

Password = move the cursor to the header of the edit box and fill in more than six letters

2. Set windows to a file similar to/etc/services on Linux.

On the Windows server, the services file is located in the win directory of your Windows Server, such as C:/Win98.

In a DOS environment,

C:/Win98> edit services

========================================================== ====================================

# Add the following lines

Sqlexec 9999/tcp

========================================================== ====================================

3. Set Informix ODBC.

Informix ODBC, connect, or client generally provides two drivers, one for Informix 9th (intersolve 3.10 32-bit Informix 9 ), another one can be used in earlier versions (Informix 2.80 32 bit ).

Go to the control panel and open the ODBC setting box.

(1) Add a data source for ODBC driver 9th, set the driver to intersolve 3.10 32-bit Informix 9, and define the data source name, for example, informix9, define data source description the data source description is arbitrary. Define the name of the database to be accessed, for example, mydbs (the name of the database you created in Linux ), the Default User Name Is Informix (the user name on Linux can be entered at will), and the host name is defined as myhostname (the machine name of your Linux Database Server) define Database Service name service name as demo_on (set in your Linux sqlhosts) Protocol to SET protocol type to onsoctcp

(2) Add a data source for the ODBC settings of previous versions, select the driver as Informix 2.80 32-bit, and define the data source name, for example, informix7, define data source description the data source description is arbitrary. Define the name of the database to be accessed, for example, mydbs (the name of the database you created in Linux ), the Default User Name Is Informix (the user name on Linux can be entered at will ),

Set host name to myhostname (the name of the machine where your Linux database server is located) and database service name to demo_on (set in your Linux sqlhosts)

SET protocol type to onsoctcp

OK. Now you can try other programs that support ODBC to view the database content, such as sqlexplorer in Delphi/cbuilder. The registration dialog box is displayed, you must enter the correct username and password on your Linux system that have the permission to access the Informix online database, you can see the table, content, and process of mydbs in your database on win.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.