Linux+informix Background Database System "= =" WINXX/ODBC/DELPHI/CBUILDER/VB Programming settings

Source: Internet
Author: User
Tags format define informix log connect odbc zip linux
This article assumes that everyone's use of informix starts from scratch, and will introduce the detailed steps from zero to maximize use of informix.
    The content of vi editing in this article is placed between two lines of equal signs.You must save it after editing.
1: Download the informix-online database server LINUX trial system
Address: http://www.intraware.com, register as a user of informix trial system, and tell the correct email address, then intraware will send you an email telling you the installation authorization name and password. Of course, when you download, the authorized user name and password will also appear on the screen, you must copy it down. (Generally the authorized name is different from your name)
    After successful registration, enter the evlaute (or evaluation or trial download) link page, login in to the download page, and select the informix product you want. As this article uses linux as an example, download informix dynamic_server_2000, ie informix_dynamic_server_2000_s_o_v9_21_uc2_for_linux.zip.

2: Ready to install informix-online 2000 /,
  Unzip the download file informix_dynamic_server_2000_s_o_v9_21_uc2_for_linux.zip (regardless of win download or linux download)
    In Linux, log in to the system as root
 
  1: create informix user name (adduser)
  2: establish informix group (groupadd)
  3: Change the attributes of the informix user home directory
  # chown informix.informix / home / informix
  If you are downloading with win:
  1: If you do not have dual-boot on the same machine to install LINUX, then mount the hard disk partition where the downloaded file is located. For example, I use d:
  # mkdir / mnt / win
  # mount --t vfat / dev / hda5 / mnt / win
  2: If LINUX is installed on another machine, only samba sharing is set, copy the informix online 2000 system downloaded under win into a directory on the LINUX machine (in this example, / mnt / win)
  3: If you downloaded using linux, use the saved directory. (This example is still / mnt / win).
Three: Start the installation
  Go to the download informix online directory
  # cd / mnt / win
  Setting up the installation environment
  # INFORMIXDIR = / home / informix
  # export INFORMIXDIR
  Because the directory structure of the informix online 921 installation package rpm downloaded by interware is / opt / informix or / usr / informix, it may not be / home / informix, and 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 the installation process you will be asked to enter your authorization number and password, just enter it.
  It is recommended that you do not install this package in a GUI environment.Generally, the installation may not be successful.
Four: start setting up the LINUX working environment
# cd / etc
# vi hosts
======================================================== =========================
      #Add your network card address, HOST host name, and other computer addresses to access this machine according to the actual situation
======================================================== =========================
# vi services
======================================================== =========================
        sqlexec 9999 / tcp #In the future your informix database server service service name is sqlexec
======================================================== =========================
# cd / root (Set the root user startup environment)
# ls --a
# 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 #online server name, not a concept with service
TERM = 100 #Display the informix dbaccess menu normally
EXPORT PATH. . . . . . . . INFORMIXDIR INFORMIXSERVER INFORMIXSQLHOSTS TERM
======================================================== =========================
  Then set the informix user environment
# cd / home / informix
# ls --a
# vi .bash_profile
======================================================== =========================
PATH = $ PATH: $ HOME / bin: $ HOME / etc
....
INFORMIXDIR = $ HOME
INFORMIXSQLHOSTS = $ HOME / etc / sqlhosts
INFORMIXSERVER = demo_on #online server name, not a concept with service
TERM = 100 #Display the informix dbaccess menu normally
EXPORT PATH. . . . . . . . INFORMIXDIR INFORMIXSERVER INFORMIXSQLHOSTS TERM
======================================================== ===========================
  Create an online service library server data space file (assuming you plan to create it in / home / informix, otherwise please enter the directory you want to create, such as / home / informix), and choose a name such as root_chunk
# cd / home / informix (data space directory)
# cat / dev / null> root_chunk
# chmod 660 root_chunk
  Setting other properties
# cd / home / informix
# cd etc
# cp sqlhosts.std sqlhosts
# vi sqlhosts
======================================================== ============================
        #Format: online server name protocol name HOST host name service service name
              demo_on onsoctcp myhostname sqlexec
======================================================== ============================
# cp onconfig.std onconfig
# vi onconfig
======================================================== ============================
#Change all e.g. / opt / informix to / home / informix
……………….
ROOTPATH / home / informix / root_chunk
………………
ROOTSIZE 40000 (Set the required data space size according to your needs, kilobytes, such as 40 megabytes)
………………
DBSERVERNAME demo_on (same as in sqlhosts)
======================================================== ============================
  OK, set up, ctrl + d to exit logout, and then log in with root.
  Start informix online
  The first time you start, initialize informix online
# oninit -I (lowercase, only the first time with parameters), yes if you have anything, wait half a minute
# ps -ef You can see that the online server has started.
# onmode -k shutdown the online server,
# oninit Reboot the online server as normal, no parameters required.
  Congratulations, your informix online is up and running.

Five: How to set up ODBC to access informix online in win
  First download the informix connect for win driver or client software package. Mine was copied to me, you can consult others or find the specific URL. If it is not too slow, you can go to http://winhelp.163.net/WIN_NT95-informix-odbc.zip to download it, pay attention to the case. Install it on a win machine, for example, the directory is c: \ informix
    Set up
1: Run informix Setnet32
Set in Enviroment:
INFORMIXDIR = c: \ informix Client ODBC / Connect installation directory
INFORMIXSERVER = demo_on (online database server name)
INFORMIXSQLHOSTS = / home / informix / etc / sqlhosts (same location as sqlhosts on Linux)
Set in Server Information:
Informix Server = demo_on (online database server name)
Host Name = myhostname (HOST host name for Linux)
Protocol Name = onsoctcp
Service Name = sqlexec
Set in HOST Informix:
Current Host = myhostname (HOST hostname for LINUX)
User Name = informix (username in linux, you can fill it here randomly, you must fill it in)
Password Option = password
Password = Move the cursor to the head of this edit box, and fill in more than six or seven letters
2: Set up the / etc / services file on the Linux machine similar to the Linux machine
On the win machine, the services file is located in the win directory of your win machine, such as c: \ win98
Under the DOS environment,
    c: \ win98> Edit services
======================================================== ======================
      #Join the following lines
      sqlexec 9999 / tcp
======================================================== ======================
3: start setting up Informix ODBC
Informix ODBC or Connect or Client generally provides two drivers, one can be used for informix version 9 (Intersolve 3.10 32-bit informix 9) and the other can be used for previous versions (Informix 2.80 32 bit).
Enter the control panel and open the ODBC settings box
    (1) Settings for the 9th edition ODBC driver
Add a data source, select the driver as Intersolve 3.10 32-bit informix 9,
Define the data source name (Data Source Name), such as: informix9,
Define the Data Source Description data source description as arbitrary,
Define the specific database name to be accessed, such as mydbs (that is, the name of the database you created under Linux),
The default user name is Informix (username on Linux, you can fill it in first),
Define Host Name as myhostname (the machine name where your Linux database server is located)
Define the database service name Service Name as demo_on (set in sqlhosts on your Linux)
Protocol Set Protocol Type to onsoctcp
(2) For previous version of ODBC settings
Add a data source and select the driver as Informix 2.80 32-bit
Define the data source name (Data Source Name), such as: informix7,
Define the Data Source Description data source description as arbitrary,
Define the specific database name to be accessed, such as mydbs (that is, the name of the database you created under Linux),
The default user name is Informix (username on Linux, you can fill it in first),
Define Host Name as myhostname (the machine name where your Linux database server is located)
Define the database service name Service Name as demo_on (set in sqlhosts on your Linux)
Protocol Set Protocol Type to onsoctcp

    OK, you can now try other programs that support ODBC to view the contents of the database, such as sqlexplorer in delphi / cbuilder. When you open it, the registration dialog box pops up. You must enter the correct user on Linux that has access to the informix online database Name and password, you can see the table, content, process, etc. of your database mydbs on win.

What specific suggestions do you have? Welcome your comments.

In addition, the author has a question, I do not know who can answer:

    I downloaded informix Se 7 from interware. XX version, I do n’t know if it supports win9x ODBC access and how to set it up. I don't know how to start the informix Se database background service, just like online using oninit to start the service? ? ?
Stay tuned: The new version of the online money cheating program is about to come out. After you open the banner, you don't need a browser to open it, whether you are programming in Delphi or typing in Word, or there are dialog boxes for other applications on the screen. , Regardless of any application, you can automatically simulate the system as a browser environment, any state can make the banner work! !! !! !!
A new generation of programs that support full Chinese PDF format decompilation to TXT is coming out (supporting CJK Chinese, Japanese, Korean, Taiwanese, and Hong Kong Character Sets) is being tested, so stay tuned.


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.