Solved and How-To
Posted in 1999
Hello All,
Thank you so much for your help. My Informix on Linux is now alive and happy
thanks to MANY e-mails and much support I received from all of you here. I
decided to create a brief 'How I Did It' kind of document and post it here
for people in my position. I've only been using Linux for a year and getting
something as complex as a RDBMS set up on it and useable for our purposes
was quite a challenge for me, but I did it. I hope this document isn't too
long. I figured since it was just plain text it would be ok. Sorry in
advance if it was not.
Looking forward to getting to know more about this great DB as I come to use
it.
Regards,
Effrem Norwood
Managing Partner
Neoa Resources, Ltd.
t. 937.767.9417 x201
This configuration performed on an Intel PII350 running Redhat Linux 6.1
using
Informix 7.30.UC7-2 for Linux. I have no idea if it is secure or correct,
but it
worked for me. Use at your own risk!
Please send comments or suggestions to informixATneoaDOTcom.
If you can improve on this document, please do!
1. Don't use or enable MD5 or Shadow passwords on Linux. If you did, you
might try
to use the 'pwunconv' command to disable the encryption which makes a mess
later on.
2. Before you install Informix, you need to create a user named Informix and
a group
of the same name. To do this, type 'useradd Informix' and then 'passwd
Informix' to change that users password. Next type 'groupadd Informix' to
create the group.
3. Next, you have to create a home for Informix and set up paths to it so
the OS knows
where to find it. I created a directory at the '/' level of my machine
called Informix.
To do this for yourself, type 'cd /' and then 'mkdir Informix' to create the
directory.
4. Next, I set up the paths by typing the following:
'export INFORMIXDIR=/Informix'
and then
'export PATH=$PATH:$INFORMIXDIR/bin'
You can add these commands to your login script and save lots of your time.
Otherwise
you must type them in each time you log in to the terminal.
5. My Informix came to me as two RPM files. I was glad because the idea of
using make or
some other tool to compile my own program is still one I need help with. So,
I just typed
'rpm -i informix.rpm' and then 'rpm -i informix2.rpm' and I was done. During
this process
I was asked for my serial number and password.
6. After this process, there were lots of entries in my /Informix directory.
Two very
important files are located in /Informix/etc named 'onconfig' and
'sqlhosts'. They are
files you will need to edit to make Informix work.
7. First, edit sqlhosts. In my case, I am using Informix as the my backend
database which
must connect to Windows NT 4.0. So, in my sqlhosts file, I have just a
single tab delimited
line which reads 'anisoptera <tab> onsoctcp <tab> 192.168.1.137 <tab>
infserv'. Save and exit.
8. Next, edit the onconfig file. In the first few lines is a line which
begins ROOTPATH.
Mine looked like this:
ROOTPATH /dev/online_root
This is the path to an area of disk space that Informix will use as a
database device
upon which it creates your database. This of course means that you will have
to
create this device, which will be described shortly. For now, just make note
of where
it is pointing to. As you continue down the onconfig file, you will come to
a line which
begins DBSERVERNAME. Right next to DBSERVERNAME, on the same line, insert
your server name.
This must be the SAME name as in your sqlhosts file. In my case this was
anisoptera, so
it looks like this:
DBSERVERNAME anisopteraNow save and exit.
9. Now you need to create that online_root device. Since mine pointed to
/dev, I typed
'cd /dev' to switch to that directory. To make the device, you will need to
reference
something called null. Mine was located in the same directory, so to create
my device I
typed 'cat /null >online_root' but, you may have to do something else if
your null is
in a different spot. If you were in /mydir and null was in /dev/files, you
would have to
type 'cat /dev/files/null>online_root' to create the file while you were IN
/mydir.
10. You now have to change the acl or "permissions" on this file. Type
'chmod 660 online_root' to set the appropriate "permissions".
11. Now you have to change the owner and group of this new device to the
Informix user and
group you created earlier. Type 'chown Informix online_root' to change
owners and then
'chgrp Informix online_root' to change groups.
12. You must create some service entries next to add appropriate ports to
your computer
for Informix. Change to '/etc' and edit your services file. Add the
following lines:
'infserv <tab> 1536/tcp <tab> #Informix Listener' Notice that this is the
service you
defined in you sqlhosts file. The very last entry on that one line.
Next type:
'anisoptera <tab> 8000/tcp <tab> #Informix'
and finally:
'anisoptera <tab> 8000/udp <tab> #Informix'
Now save and exit.
Once this is done, I think you need to restart you inet service, but I'm not
sure.
I did by typing 'cd /' and then '/etc/rc.d/init.d/inet restart'.
13. Now I typed 'export INFORMIXSERVER=anisoptera' to let the OS know which
server
I wanted to talk to.
14. I now typed 'oninit -ivy' which much to my astonishment actually brought
the
thing to life. It worked away for a few seconds and was then ready. FYI, you
only need to
used the -ivy extension to oninit ONCE to initialize the device you created
in setp 9.
15. I then typed dbaccessdemo7 and Informix created a test database for me
called Stores7.
16. I then went over to NT, and added the lines in step 12 to NT's services
file, which
is in the WINNT directory somewhere.
17. The Informix SDK, which I found at http://www.intraware.com had an NT
ODBC driver in
it for Informix. It's called INFORMIX 3.30 32 BIT and is an Informix driver.
Once you
choose to use it, it asks for the following information which I have filled
in with the
appropriate responses based on this example:
Server Name: anisoptera
Host Name: 192.168.1.137
Service: infserv
Protocol: onsoctcp
Database Name: Stores7
User ID: Informix
Password: *********
When I hit the test connect button, it was successful, and that was it. Now
there's
a lot more to learn, but at least it's working. A HUGE THANK YOU to everyone
on
comp.databases.informix who helped me to get this going and prompted me to
write this.