[ic] Installation answers for IC 4.8.3 on Redhat

interchange-users@interchange.redhat.com interchange-users@interchange.redhat.com
Mon Dec 17 00:21:00 2001


Here is the quick path to getting IC 4.8.3 running on a RedHat 7.0 system.  
Including some hints that others have missed....

If you trust CPAN to auto install the perl modules required for IC, you
can skip this next step, and the installation will get them for you,
provided you are connected to the net...

Otherwise, if you are more cautious, like me, you should download and
install the following modules by hand before going further:

Storable-1.0.14.tar.gz
Bundle-libnet-1.00.tar.gz
MIME-Base64-2.12.tar.gz
URI-1.17.tar.gz
HTML-Parser-3.25.tar.gz
SQL-Statement-0.1021.tar.gz  
libnet-1.0901.tar.gz
HTML-Tagset-3.03.tar.gz
Safe-Hole-0.08.tar.gz        
libwww-perl-5.62.tar.gz

Next, you need to create a user, under which the IC daemon will run.  The 
convention is to name this user interch, so create a user called interch.

I wanted to be able to set up catalogs for individual users, and give them 
some privacy, and to do that, you first need to create the account for 
that user.  I called my first catalog sam, for sample.  Create a new user 
sam.  Now, go into the /etc/group file and add the user interch to the 
group for sam.  The entry should look something like:

sam:x:1121:interch

Finally, and this is important, Redhat will create the users home 
directory with perms 700.  This will prevent the interch user from being 
able to read the catalog.cfg file that will be created within the 
/home/sam/catalog/sam folder.  So you must change the perms on the home 
directory to 770.  If you get an error when starting IC that says 
something like:

config error -- Couldn't change to /home/sam/catalogs/sam: Permission 
denied

Then you may have forgotten this step..

Now you are ready to un-tar the IC distribution and do the install...

Grab the tarball (I gave up trying to get the RPM's to work, but I think I 
was missing a perl module YMMV).  I used: interchange-4.8.3.tar.gz

Untar and cd into the source folder.

WARNING...  The configure command does more than configure the
compilation, it will initiate the config, compile, then the configure will
proceed, without pause, to installation which includes auto installation
of the CPAN modules and after a few questions (take the defaults is my
recommendation) will complete the installation on your system.  It is best
to have the users already created before you proceed with this step.

Finally, the configure will instruct you to issue the final command from 
the /usr/local/interchange folder... bin/makecat.

Here are the answers I gave it (sorry for the length).

snip......snip......snip

USER mode is appropriate when only one user owns all catalogs running
on this server, and the Interchange daemon is run by the same user.

  M) MULTIPLE GROUP
  G) GROUP
  U) USER

Permission Mode? [M] 

Since there was no master configuration file, we will ask
some questions to help set initial defaults for making this
and future catalogs.

Default server? [secure.servers.com] 


We need to know if all of your CGI programs are run as a file ending
in .cgi or some other extension, or whether you have your own personal
CGI directory.

Do you have a CGI directory? [y] 

# The location of the normal CGI directory. This is a
# file path, not a script alias.
#
# If all of your CGI programs must end in .cgi, this is
# should be the same as your HTML directory.
#


CgiDir? [/var/www/cgi-bin] 

#
# The URL-style location of the normal CGI directory.
# Only used to set the default for the CgiUrl setting.
# 
# http://www.virtual.com/cgi-bin/prog
#                       ^^^^^^^^
#
# If you have no CGI-bin directory, (your CGI programs end
# in .cgi), leave this blank.
#


CgiBase? [/cgi-bin] 

# The base directory for HTML for this (possibly virtual) domain.
# This is a directory path name, not a URL -- it is your HTML
# directory.
#


DocumentRoot? [/var/www/html] 

# This is a directory path name (not a URL) where the administration user
# interface images from share/ should be copied to. These will normally be
# shared by all catalogs. Often this is the same as your DocumentRoot.
#


ShareDir? [/var/www/html] 

# The URL base for the administration user interface images.
# This is a URL fragment, not an entire URL.
#
#         <IMG SRC="/interchange/en_US/bg.gif">
#                   (leave blank)
#
#         <IMG SRC="/~yourname/interchange/en_US/bg.gif">
#                   ^^^^^^^^^^
#


ShareUrl? 

# The directory where the Interchange software is installed.
#


VendRoot? [/usr/local/interchange] 

# 
# DIRECTORY where the Interchange catalog directories will go. These
# are the catalog files, such as the ASCII database source,
# Interchange page files, and catalog.cfg file. Catalogs will
# be an individual subdirectory of this directory.
#


BaseDir? [~/catalogs] 

# The user name the Interchange server runs under on this machine. This
# should not be the same as the user that runs the HTTP server (i.e.
# NOT nobody).
#


InterchangeUser? [interch] 

# Interchange can use either UNIX- or internet-domain sockets.
# Most ISPs would prefer UNIX mode, and it is more secure.
#


Link mode? [UNIX] 
#########     END BASE CONFIGURATION      #########

######### BEGINNING CATALOG CONFIGURATION #########
# The server name, something like: www.company.com
#                                  www.company.com:8000
#                                  www.company.com/~yourname
#
Server name? [secure.servers.com]

# The type of demo catalog to use. The standard one distributed is:
#
#    foundation
#
# If you have defined your own custom template catalog,
# you can enter its name.
#
# If you are new to Interchange, use "foundation" to start with.


DemoType? [foundation] 

# The type of permission structure for multiple user catalogs.
# Select M for each user in own group (with interchange user in group)
#        G for all users in group of interchange user
#        U for all catalogs owned by interchange user (must be catuser as 
well)
#
#        M is recommended, G works for most installations.


permtype? [M] 

# The user name the Interchange server runs under on this machine. This
# should not be the same as the user that runs the HTTP server (i.e.
# NOT nobody).
#


InterchangeUser? [interch] 

#
# The user name the catalog will be owned by.
#


CatUser? interch

# The group name the server-owned files should be set to.  This is
# only important if Interchange catalogs will be owned by multiple users
# and the group to be used is not the default for the catalog user.
#
# Normally this is left blank unless G mode was selected above.
# 


InterchangeGroup? 

# The email address where orders for this catalog should go.
# To have a secure catalog, either this should be a local user name and
# not go over the Internet -- or use the PGP option.
#


MailOrderTo? [interch] sam

# Where the Interchange files for this catalog will go, pages,
# products, config and all.  This should not be in HTML document
# space! Usually a 'catalogs' directory below your home directory
# works well. Remember, you will want a test catalog and an online
# catalog.
#


CatRoot? [/var/lib/interchange/catalogs/foundation] 

# The location of the normal CGI directory. This is a
# file path, not a script alias.
#
# If all of your CGI programs must end in .cgi, this is
# should be the same as your HTML directory.
#


CgiDir? [/var/www/cgi-bin] 

# The URL location of the CGI program, without the http://
# or server name.
#
# http://www.virtual.com/cgi-bin/prog
#                       ^^^^^^^^^^^^^
#
# http://www.virtual.com/program.cgi
#                       ^^^^^^^^^^^^
#


CgiUrl? [/cgi-bin/foundation] 

#
# Additional URL locations for the CGI program, as with CgiUrl.
# This is used when calling the catalog from more than one place,
# perhaps because your secure server is not the same name as the
# non-secure one.
#
# http://www.secure.domain/secure-bin/prog
#                         ^^^^^^^^^^^^^^^^
#
# We set it to the name of the catalog by default to enable the
# internal HTTP server.
#


Aliases? [/foundation] 

# The base directory for HTML for this (possibly virtual) domain.
# This is a directory path name, not a URL -- it is your HTML
# directory.
#


DocumentRoot? [/var/www/html] 
[root@secure interchange]# bin/makecat

Select a short, mnemonic name for the catalog. This will be
used to set the defaults for naming the catalog, executable,
and directory, so you will have to type in this name frequently.

NOTE: This will be the name of 'vlink' or 'tlink', the link CGI
program. Depending on your CGI setup, it may also have the 
extension .cgi added.

Only the characters [-a-zA-Z0-9_] are allowed, and it is strongly 
suggested
that the catalog name be all lower case.

If you are doing the demo for the first time, you might use "foundation".

Catalog name? sam
makecat -- Interchange catalog installation program.

*** We will be making a catalog named 'sam'. ***

######### BEGINNING CATALOG CONFIGURATION #########
# The server name, something like: www.company.com
#                                  www.company.com:8000
#                                  www.company.com/~yourname
#
Server name? [secure.servers.com] 

# The type of demo catalog to use. The standard one distributed is:
#
#    foundation
#
# If you have defined your own custom template catalog,
# you can enter its name.
#
# If you are new to Interchange, use "foundation" to start with.


DemoType? [foundation] 

# The type of permission structure for multiple user catalogs.
# Select M for each user in own group (with interchange user in group)
#        G for all users in group of interchange user
#        U for all catalogs owned by interchange user (must be catuser as 
well)
#
#        M is recommended, G works for most installations.


permtype? [M] 

# The user name the Interchange server runs under on this machine. This
# should not be the same as the user that runs the HTTP server (i.e.
# NOT nobody).
#


InterchangeUser? [interch] 

#
# The user name the catalog will be owned by.
#


CatUser? sam

# The group name the server-owned files should be set to.  This is
# only important if Interchange catalogs will be owned by multiple users
# and the group to be used is not the default for the catalog user.
#
# Normally this is left blank unless G mode was selected above.
# 


InterchangeGroup? 

# The email address where orders for this catalog should go.
# To have a secure catalog, either this should be a local user name and
# not go over the Internet -- or use the PGP option.
#


MailOrderTo? [sam] 

# Where the Interchange files for this catalog will go, pages,
# products, config and all.  This should not be in HTML document
# space! Usually a 'catalogs' directory below your home directory
# works well. Remember, you will want a test catalog and an online
# catalog.
#


CatRoot? [/home/sam/catalogs/sam] 

# The location of the normal CGI directory. This is a
# file path, not a script alias.
#
# If all of your CGI programs must end in .cgi, this is
# should be the same as your HTML directory.
#


CgiDir? [/var/www/cgi-bin] 

# The URL location of the CGI program, without the http://
# or server name.
#
# http://www.virtual.com/cgi-bin/prog
#                       ^^^^^^^^^^^^^
#
# http://www.virtual.com/program.cgi
#                       ^^^^^^^^^^^^
#


CgiUrl? [/cgi-bin/sam] 

#
# Additional URL locations for the CGI program, as with CgiUrl.
# This is used when calling the catalog from more than one place,
# perhaps because your secure server is not the same name as the
# non-secure one.
#
# http://www.secure.domain/secure-bin/prog
#                         ^^^^^^^^^^^^^^^^
#
# We set it to the name of the catalog by default to enable the
# internal HTTP server.
#


Aliases? [/sam] 

# The base directory for HTML for this (possibly virtual) domain.
# This is a directory path name, not a URL -- it is your HTML
# directory.
#


DocumentRoot? [/var/www/html] 

# Where the sample HTML files (not Interchange pages) should be installed.
# There is a difference. Usually a subdirectory of your HTML directory.
#


SampleHtml? [/var/www/html/sam] 

# Where the image files should be copied. A directory path
# name, not a URL.
#


ImageDir? [/var/www/html/sam/images] 

# The URL base for the sample images. Sets the ImageDir
# directive in the catalog configuration file. This is a URL
# fragment, not a directory or file name.
#
#         <IMG SRC="/foundation/images/icon.gif">
#                   ^^^^^^^^^^^^^^^^^^
#


ImageUrl? [/sam/images] 

Interchange can use either UNIX- or internet-domain sockets.
Most ISPs would prefer UNIX mode, and it is more secure.

If you already have a program there, or use a common program
and the FullURL directive, select NONE. You will then need
to copy the program by hand or otherwise ensure its presence.

INET or UNIX mode? [UNIX] 
Do you use CGIWRAP or SUEXEC? [n] 
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for environ declaration in unistd.h... no
checking return type of signal handlers... void
checking for select... yes
checking for socket... yes
checking for strerror... yes
updating cache ./config.cache
creating ./config.status
creating syscfg
creating config.h
Checking directories........................................
/var/www/html/sam: directory exists!
The above directories already exist. Overwrite files? [n] y
mkdir /home/sam/catalogs
mkdir /home/sam/catalogs/sam
done.
Copying demo files..........................................found more to 
ask.

Your company name: ...............................[Foundation Store] 

You can choose to pre-populate your Foundation template with some
data which might be illustrative. You can always delete it later
and replace it with your own.

The types are:

    tools      Construct Something, includes products, users, orders
    reports    Marketing reports, downloadable softgoods, products, users
    none       No data. Same as leaving blank.

Sample data type?: ...............................[tools] 

Interchange has a workable internal database, but many things will
work better (and a few worse) if you use a SQL database. Interchange
can configure MySQL, PostgreSQL, and Oracle in a test configuration.

Set to 1 if you want to use MySQL, PostgreSQL, Oracle, or DB2: ..

You can use Interchange's companion configuration
interface, to do upload/download of files, manipulation of
the database, reconfiguration of the catalog, and much more.

To enable the UI, you will need a "super-user" account
name that has full access.

The initial password is "pass". CHANGE IT! You can do this
by going to the admin menu and selecting the superuser and
then "Change password".

Account name that will control this catalog: .....[sam] 
Administrative password: .........................[pass]
Set to 1 to display demo helper features in your store: ..

Found system commands to run.

done.
Moving link program to /var/www/cgi-bin/sam.................done.
Copying share/ files to /var/www/html.......................done.
Moving HTML files to /var/www/html/sam......................done.
Moving image files to /var/www/html/sam/images..............done.

Found additional system commands to run.

We need to make some directories to store sessions, logs, and such.

run "sh /home/sam/catalogs/sam/config/makedirs"? [y] 
You can install some sample data to start with in this catalog.
This script will install the sample (tools) you selected.

run "sh /home/sam/catalogs/sam/config/installsample"? [y] 
Add catalog to interchange.cfg? [y] 

Done with installation. If my reading of your input is correct, you
should be able to access the demo catalog with the following URL:

        http://secure.servers.com/sam

In any case, you should get direct access at:

        http://secure.servers.com/cgi-bin/sam

That is, after you START or RESTART the Interchange server.  8-)
It is best done with:

        su -c "/usr/local/interchange/bin/interchange -r" interch

For session expiration, you might want to place a line like this in your
crontab:

44 4 * * * /usr/local/interchange/bin/expireall -r

It will prevent the session databases from getting too large.

[root@secure interchange]# bin/restart

The Interchange server should not be run as root. It should run
as a the user name you configured in when you set up the catalogs.

The name we think should run it is: interch

If you are starting the server from /etc/rc.local or another
startup file, you can use this:

su -f -c /usr/local/interchange/bin/restart interch

or if that fails:

        su interch <<EOF
/usr/local/interchange/bin/restart
EOF

Do you want me to start it as 'interch' now? [y] 
The Interchange server was not running 
(/usr/local/interchange/etc/interchange.pid).
Low traffic settings.
Calling UI......UI is loaded...
Interchange V4.8.3
Configuring catalog sam...
Couldn't change to /home/sam/catalogs/sam: Permission denied

sam: error in configuration. Skipping.
sam: config error -- Couldn't change to /home/sam/catalogs/sam: Permission 
denied. Skipping.
Interchange server started in INET and UNIX mode(s) (process id 24350)

---------------------------------------

Note that I had not yet changed the perms on the /home/sam folder to 770, 
so I got the Permission Denied Error...

--------------------------------------

You will still need to create your /etc/init.d/rc files and add a cron 
entry and more.  But at least you should be able to access the sample 
store without getting the dreaded 404 page not found error.

I hope that you find this information helpful and my apolologies for the 
length, but if it saves you an hour, it will be worth it.  It could have 
saved me several hours of trial and error.

-----------------------------------

Thanks to the many list participants who helped guide me in getting this 
up and running.  I am looking forward to getting my first store up!

And Thank You Mike Heins for bringing us this fine application!

-- 
--------------------
Timothy Burt
Internet Specialist