5.4. Setup the development catalog
Now we have a branch in CVS, but we need to tie it to something in the real world, namely, an Interchange catalog.
Like we did in
cd /var/lib/interchange cvs co -d foundation_dev foundation
Depending on how complete your catalog is in CVS, you may need to create or copy directories/files.
cd /var/lib/interchange/foundation cp -a catalog.cfg orders/* \ /var/lib/interchange/foundation_dev
Note: A lot of the following steps are performed by the /usr/local/interchange/bin/makecat script, but here is how to do it manually:
Most often, I find it profitable to make use of a second database for the development catalog, rather than having both catalogs reference the same database (especially if the first catalog is live).
Use the means of your database platform to create a separate database. For example, PostgreSQL users might do something like:
You can rely on the catalogs internal products/*.txt data to generate the database tables and populate them, or you can export another catalog's database and import it for the development catalog, like the example below for PostgreSQL users.
pg_dump foundation > ~/foundation.dump psql foundation_dev < ~/foundation.dump
#Must be root su - root #Copy HTML cd /var/www/html/ cp -a foundation foundation_dev #Copy CGI cd /var/www/cgi-bin cp -a foundation foundation_dev
Perform the necessary modifications to interchange.cfg. For example:
/usr/local/interchange/interchange.cfg: Catalog found /var/lib/interchange/foundation /cgi-bin/foundation Catalog found_dev /var/lib/interchange/foundation_dev /cgi-bin/foundation_dev
The development catalog will differ at least a little bit from the standard catalog, such as in the CGI_URL and database parameters. I recommend using a separate "local" configuration file to hold the separate values, such as config/local.cfg, and then include it from catalog.cfg.
/var/lib/interchange/config/local.cfg: Variable CGI_URL /cgi-bin/foundation_dev Variable IMAGE_DIR /foundation_dev/images
Now you can restart Interchange to make your changes take effect.