Koozali.org: home of the SME Server

Interchange 4.8.3 (RPM)

Tom Carroll

Interchange 4.8.3 (RPM)
« on: December 18, 2001, 08:19:46 AM »
I've installed interchange and I can get the store front to come up but when I click the link for customer or admin I get the "We're sorry but the store is not available right now or the server is busy."

I'm not sure but I think it could be permissions problem.  Here's what I've done so far:

The interchange RPM installs interchange under the usr/lib/interchange and /var/lib/interchange directories.  I think the latter is is just data storage and templates for new catalogs.  Docs do not explain this.

Here's what I've done so far:

I created the interch user and group via useradd as suggested vice through the webadmin panel.

ln -s /etc/rc.d/init.d/interchange /etc/rc.d/rc7.d/S95interchange

chmod -R 770 /usr/lib/interchange
chmod -R 770 /var/lib/interchange
chmod -R 770 /var/log/interchange
chown -R interch /usr/lib/interchange
chown -R interch /var/lib/interchange
chown -R interch /var/log/interchange
chgrp -R interch /usr/lib/interchange
chgrp -R interch /var/lib/interchange
chgrp -R interch /var/log/interchange

I configured makecat with the following:

Catalog name:                                     store
Server name:                                       www.datawarecomp.com
(this is a virtual domain/ibay on my SME server)
DemoType:                                          foundation
permtype:                                            M
InterchangeUser:                                  interch
CatUser:                                              interch
InterchangeGroup:                                
MailOrderTo:                                        orders@datawarecomp.com
CatRoot:                                              /var/lib/interchange/store
CgiDir:                                                 /home/e-smith/files/ibays/dataware/cgi-bin
CgiUrl:                                                 /cgi-bin/store
Aliases:                                               /store
DocumentRoot:                                    /home/e-smith/files/ibays/dataware/html
SampleHtml:                                        /home/e-smith/files/ibays/dataware/html/store
ImageDir:                                             /home/e-smith/files/ibays/dataware/html/store/images
ImageUrl:                                             /store/images
INET or UNIX mode:                              UNIX
Do you use CGIWRAP or SUEXEC:       Y

At this point it checks and/or creates the directories and copies the demo files.

Your company name:                            Dataware Computers
Sample data type:                                 tools
Set to 1 if you want MySQL...:                
Account name:                                      interch
Administrative password:                        pass
Set to 1 to display demo helper:              1

At this point it finds some system commands to run.

It moves a link to /home/e-smith/files/ibays/dataware/cgi-bin/store

It tells me the standard warning about selecting SUEXEC/CGIWrap option and
being root.  However it does correctly select 5013/5013 which is the interch
user and group.

This is where the error "chown sampledata.xls: No such file or directory"

I've spent about 18 hours researching forums and documentation but I haven't had any luck.

Anyone here experienced with this?

Thanks for any help,

Tom Carroll

BK

Re: Interchange 4.8.3 (RPM)
« Reply #1 on: December 18, 2001, 12:27:04 PM »
Hi Tom,

Where did you get this interchange from?

Regards,
BK

Tom Carroll

Re: Interchange 4.8.3 (RPM)
« Reply #2 on: December 18, 2001, 11:18:25 PM »
It's available from http://interchange.redhat.com/

Tom

BK

Re: Interchange 4.8.3 (RPM)
« Reply #3 on: December 19, 2001, 04:42:00 AM »
is your server running perl 5.5

Tom Carroll

Re: Interchange 4.8.3 (RPM)
« Reply #4 on: December 19, 2001, 08:34:21 AM »
I'm using perl 5.6.0-12.  Not sure if it was standard with SME v5.0 or if I had upgraded it.

Tom

AlecN

Re: Interchange 4.8.3 (RPM)
« Reply #5 on: December 20, 2001, 03:59:42 PM »
Re Interchange. I am running SME5/3 - does anyone know which modules I would have to install. I notice that there are:
1. core
2. foundation
3. foundation-demo
4. CPAN modules.

The Demo at http://demo.ic.redhat.com/cgi-bin/ic3 looks interesting

Tom Carroll

Re: Interchange 4.8.3 (RPM)
« Reply #6 on: December 21, 2001, 06:51:34 AM »
> Re Interchange. I am running SME5/3 - does anyone know which modules I would
> have to install. I notice that there are:
> 1. core
> 2. foundation
> 3. foundation-demo
> 4. CPAN modules.
>
> The Demo at http://demo.ic.redhat.com/cgi-bin/ic3 looks interesting

You will need all.  Now let me qualify that. :)

The core is a definate, otherwise you can not run anything.  Foundation is the empty foundation database.  You'll need to start with that.  Foundation-demo is the data and a sample store front (Hardware items, such as a Truevalue) that fills the foundation database with illustrative examples of an e-commerce site.

The CPAN modules is where the tricky part comes.  I just installed them all and a few others.  I'm sure I don't need them all, but there is little documentation, at least I could not find any concise documents, outlining which module is required for what.  Someone else is working on that right now.

There are three modules not listed with the CPAN modules, but easily found at www.rpmfind.net.  You'll need to grab perl-DBI, mysqldevel and perl-DBD-MySQL if you plan to use MySQL, which is what I decided to use.

I am presently working on a contrib rpm that will install it on SME 5 and create the necessary custom templates, create the interch user and set all the correct permissions.

There is a lot of overhead to get it up and running smoothly on SME.  I hope to have in done within two weeks.

Tom Carroll
Dataware Computers

Jeff Coleman

Re: Interchange 4.8.3 (RPM)
« Reply #7 on: December 21, 2001, 09:51:31 PM »
Tom,

When you get your contrib rpm working, I'd sure like to get a copy.....

-jeff

Tom Carroll

Re: Interchange 4.8.3 (RPM)
« Reply #8 on: December 21, 2001, 11:43:37 PM »
I'm going to mess around with the RPM this weekend.  Really all I need to do is change the paths, permissions and templates, then just rebuild it.

I've been reviewing the RPM manual and the RPM guide in the developers section.  Appears to be pretty straight forward but I do occasionally find a hitch. ;->


Tom Carroll
Dataware Computers

AlecN

Re: Interchange 4.8.3 (RPM)
« Reply #9 on: December 28, 2001, 01:51:24 AM »
Tom, thanks for the reply. Are you still on track with your contrib rpm?

AlecN

Tom Carroll

Re: Interchange 4.8.3 (RPM)
« Reply #10 on: January 07, 2002, 09:37:02 AM »
I ahve not created an RPM.  It is not necessary.

I've also attempted to install Interchange into the /opt/ directory without any luck as Darrell had suggested.

Interchange has a special cgi link file that actually carrys out all the communications for page serving and database operations.  There are minimal files installed in the iaby, therefore I just updated/corrected some things on a how-to I received.

Here it is:

How to set up Interchange 4.8.3 in Mitel SME v5
-----------------------------------------------
Originally written by Justin Funke (March 12, 2001)
Contributions provided by Jon Pamment (November 2001)
Modifications made by Tom Carroll (January 4, 2002) (egor@carrollweb.net)

Thanks to Justin and Jon for their earlier work!


Description
-----------
This how-to will get you started with the RedHat e-commerce package
Interchange.


Notes
-----
There may be better ways of setting up Interchange under SME v5, but this
will at least get you up and running with a demo catalog and allow you to
start the IC learning process.  This has not been used in a production
environment!  The Interchange package is installed on the system through
the use of an ibay.  The ibay is built with permissions for everyone to
access and this is a major security problem if you have other users on
your LAN.  TEST AT YOUR OWN RISK!


Details
-------
Your catalogs are located in the /var/lib/interchange/~ directory.  An
e-smith specific rpm was contemplated, however after getting familiar with
the application the decision was made that it is not necessary since all
security is handled through the CGI script for the store.  The primary
risk is that your store pages can be modified by others within your own
lan.  Nothing of importance is stored within the ibay itself.  After many
failed attempts, Interchange would not work like Gallery or PHPMyAdmin
through the /opt/~ directory.


Procedures
----------
1.  Make an ibay on your e-smith server with permissions set to "edit and
read" for everyone no password required. Make sure execute cgi is enabled.

2.  Install the interchange rpms and required support files.

    Note:  Not all these modules are needed, but a minimum required
           listing has not been put together to show what modules.you need
           for various features.  This is what I have downloaded and
           installed personally:

rpm -ivh http://ftp.interchange.redhat.com/interchange/4.8/rpm/interchange\
-4.8.3-1.noarch.rpm
rpm -ivh http://ftp.interchange.redhat.com/interchange/4.8/rpm/interchange\
-foundation-4.8.3-1.noarch.rpm
rpm -ivh http://ftp.interchange.redhat.com/interchange/4.8/rpm/interchange\
-foundation-demo-4.8.3-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Archive-Tar-0.22-10.i\
386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Archive-Zip-0.11-1.i3\
86.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Business-UPS-1.13-10.\
i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Compress-Zlib-1.13-1.\
i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Crypt-SSLeay-0.27-1.i\
386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-DBD-Pg-1.00-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-File-CounterFile-0.12\
-10.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-HTML-Parser-3.25-1.i3\
86.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-HTML-Tagset-3.03-1.i3\
86.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-IO-stringy-1.220-1.i3\
86.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Image-Size-2.93-1.i38\
6.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-MIME-Base64-2.12-1.i3\
86.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Mail-Sendmail-0.78-10\
.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Newt-1.08-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-OLE-Storage_Lite-0.09\
-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Parse-RecDescent-1.80\
-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-SOAP-Lite-0.50-1.i386\
.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-SQL-Statement-0.1020-\
1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Safe-Hole-0.08-1.i386\
.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Spreadsheet-ParseExce\
l-0.22.3-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Spreadsheet-WriteExce\
l-0.32-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Storable-1.0.11-1.i38\
6.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Term-ReadLine-Perl-0.\
9908-10.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-TermReadKey-2.14-10.i\
386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Tie-Watch-1.0-10.i386\
.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-Time-HiRes-01.20-10.i\
386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-URI-1.12-1.i386.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-XML-Parser-2.30-1.i38\
6.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-libnet-1.0703-10.i386\
.rpm
rpm -ivh http://ftp.interchange.redhat.com/perl/perl-libwww-perl-5.53-1.i3\
86.rpm

** The following rpm's are not listed in the CPAN list, but were required
   for me to use Interchange with MySQL support on SME v5:

rpm -ivh ftp://rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/perl-DB\
D-MySQL-1.2215-1.i386.rpm
rpm -ivh ftp://rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/mysql-d\
evel-3.23.36-1.i386.rpm
rpm -ivh ftp://rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/perl-DB\
I-1.14-10.i386.rpm


3.  Add a soft link to start interchange server on e-smith reboot run level
    7.

    ln -s /etc/rc.d/init.d/interchange /etc/rc.d/rc7.d/S95interchange


4.  Be sure to set the interch user password using the passwd utility.

5.  Set permissions and ownerships on the installed interchange files and
    directories.

    chown interch.interch /usr/lib/interchange -R

6. Make the catalog  - The catalog is based on the server www.myserver.com
and an ibay name "pub"

    /usr/lib/interchange/bin/makecat    

       Catalog name = "foundation"
       Enter path to httpd.conf file: "/etc/httpd/conf/httpd.conf"
       Server name: "www.myserver.com/pub"
       DemoType? "foundation"
       permtype? "M"
       InterchangeUser? "interch"
       CatUser? "root"
       InterchangeGroup?
       MailOrderTo? "orders@myserver.com"
       CatRoot? "/var/lib/interchange/foundation"
       CgiDir? "/home/e-smith/files/ibays/pub/cgi-bin"
       CgiUrl? "/pub/cgi-bin/foundation"
       Aliases? "/foundation"
       DocumentRoot? "/home/e-smith/files/ibays/pub/html"
       SampleHtml? "/home/e-smith/files/ibays/pub/html/foundation"
       ImageDir? "/home/e-smith/files/ibays/pub/html/foundation/images"
       ImageUrl? "/pub/foundation/images"
       INET or UNIX mode? "UNIX"
       Do you use CGIWRAP or SUEXEC? "n"

       Your company name "Foundation Store"

       Sample data type?:   "tools"

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

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

       run "sh /var/lib/interchange/test/config/makedirs"? "y"
       run "sh /var/lib/interchange/test/config/installsample"? "y"

       Add catalog to interchange.cfg? "y"

7.  Let it finish and watch for any errors.

8.  Change ownership and group for the catalog back to "interch" since we
    just built the catalog as root.

    chown interch.interch /var/log/interchange/error.log
    chown interch.interch /var/lib/interchange -R

9.  Check the following permissions

    ls -al /home/e-smith/files/ibays/pub/cgi-bin/foundation

         -rwsrwxr-x    1 interch  interch      foundation
    if it does not have these permissions use the following:
    chmod 4771 /home/e-smith/files/ibays/pub/cgi-bin/foundation

    ls -al /usr/lib/interchange/etc/socket

         srw-rw-rw-    1 interch  interch         socket
    if it does not have these permissions use the following:
    chmod 666 /usr/lib/interchange/etc/socket

10.  The makecat utility has a bug in it that copies support files to the
     /var/www/html/~ directory instead of where the files should be copied
     to on a SME O/S.  To correct this, just do the following:

     mv /var/www/html/foundation /home/e-smith/files/iabys/pub/html/
     mv /var/www/html/interchange /home/e-smith/files/ibays/pub/html/

11.  Restart the interchange server as user interch.

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

12.  Check to make sure it is working at
     http://www.myserver.com/pub/foundation

13.  If you receive any errors, you may need to do a full reboot,

     shutdown -r now


Note:  If you experience a problem on the links at the top of the page not
       working because the "pub" directory is coming up twice - redo the
       catalog configuration and remove the italicized "pub" from line 3 of
       the catalog configuration script.

It is recommended you download all the documentation from http://interchange.redhat.com.


Tom Carroll
Dataware Computers

Gwenael

Re: Interchange 4.8.3 (RPM)
« Reply #11 on: January 09, 2002, 11:08:39 AM »
Hi,

I have installed all the package(thanks for the configuration), made config but:

Customer page work well but one modification to make (makecat ):
   *  Server name: "www.myserver.com/pub"  ---->  Server name: "www.myserver.com"

   because when you are in the shop, all the links are in the following format:
  www.myserver.com/pub/pub/....

Is it wrong?

I cannot go to the  admin interface: I've got  HTTP 404 - File not found

Did you have the same problem?

Thanks in advance,

Regards,

Gwenael

Tom Carroll

Re: Interchange 4.8.3 (RPM)
« Reply #12 on: January 09, 2002, 11:12:10 AM »
Yes, that was mentioned at the bottom of the document.

I left it there because one of the other authors put it in there that way.  I did not have a problem with mine just being www.myserver.com.  I suppose it should have been changed and a note made at the bottom telling you to do it the other way.


Tom Carroll
Dataware Computers