
How to create a new installation of the IPP datastore:

* create a database to host the relevant tables:
  * create a mysql user:
  > create user 'ipp'@'localhost' identified by 'XXX'
  > grant all on *.* to 'ipp'@'localhost'

  * in mysql, create the test database:
  > create database datastore;

  * create the tables:
  # mysql -h localhost -u ipp -p datastore < scripts/tabledefs.sql

  This generates the tables needed by the datastore web pages and tools

* choose a psbuild location:
  # psconfig ipp-pstamp
  * sets the build / install environment for code below which does not go into
    the apache server cgi location

* in psconfig, to install needed perl libraries:
  # pscheckperl pstamp-ubuntu -build

* in DataStoreServer, to install the apache CGI elements:
  # ./autogen.sh --with-cgidir=/MY/DATASTORE/ds-cgi --with-dsroot=/MY/DATASTORE/dsroot
  # make cgi
  * then edit /MY/DATASTORE/ds-cgi/dsshellconfig
    ** supply the perl path of the user built to support the datastore
    ** supply the database server information
    ** supply the dsroot location

* install the apache vhost configuration file:
  * NOTE: this likely needs root access
  * cp DataStoreServer/web/conf/ubuntu-datastore.conf /etc/apache2/sites-available
  * edit to match location of datastore/dsroot and ds-cgi
  * enable the new site (a2ensite)
  * enable required modules: rewrite, cgi, includes
  * start or restart the apache server

==============================================================

* datastore apache elements consist of CGI scripts and the directory hierarchy for data products

* Things to be installed in ds-cgi:
  * dsindex.cgi
  * dstxtindex.cgi
  * dsgetindex
  * dsfsindex
  * dsprodindex
  * dsrootindex
  * dsshellconfig -- NEEDS to be modified to define the configuration

* Things needed in the user build by the apache server:
  * dsdbh.pm (installed as part of DataStoreServer : make cgi)
  * Devel::CheckLib
  * DBD/mysql.pm

* Edit the ippconfig/site.config to point at the datastore:
  * DS_DBSERVER     
  * DS_DBNAME       
  * DS_DBUSER       
  * DS_DBPASSWORD   
  * DATA_STORE_ROOT

* Things installed as user tools:
  * dsreg
  * dsprodtool

----------

Here is the current (2026.04.11) directory listing of /export/ipp113.0/datastore/ds-cgi:

UNKNOWN:
-rwxrwxr-x 1 eugene users 4551 Oct 17  2017 Smfpermissions.pm*
-rwxrwxr-x 1 mhuber users 3759 Oct 12  2017 Smfpermissions.pm.old20160830*

TRASH:
drwxrwxr-x 2 eugene users   30 Jul  8  2009 dsroot/

in web/cgi:
-rwxr-xr-x 1 eugene users  618 Jul  8  2009 dodsfits*         [UP TO DATE]
-rw-rw-r-- 1 eugene users  565 Jul  8  2009 dsdbh.pm          [UP TO DATE] [**** also in /scripts ****]
-rwxrwxr-x 1 eugene users   44 Jul  8  2009 dsfits.cgi*       [UP TO DATE]
-rwxrwxr-x 1 eugene users 7703 Apr 25  2013 dsgetindex*       [UP TO DATE]
-rwxrwxr-x 1 eugene users   60 Apr 22  2013 dsindex.cgi*      [UP TO DATE]
-rw-rw-r-- 1 eugene users  525 May  1  2018 dsshellconfig     [Has changes relevant to the local installation]
-rwxrwxr-x 1 eugene users   57 Jul  8  2009 dstxtindex.cgi*   [UP TO DATE]
-rwxrwxr-x 1 eugene users 4951 Sep 15  2017 findskycalcmf.pl* [Has changes relevant to the local installation -- does this work??]
-rwxrwxr-x 1 eugene users 7820 Sep 15  2017 findsmf.pl*       [Has some changes related to permissions]
-rwxrwxr-x 1 eugene users 4724 Aug 30  2016 listsmfs.pl*      [minor commented-out change]

TEST / CONFIG files:
-rw-rw-r-- 1 eugene users   40 Aug 29  2016 foo.smf
-rw-rw-r-- 1 eugene users   50 Jul  8  2009 index.txt
-rwxrwxr-x 1 eugene users 1426 Apr 25  2013 myecho*
-rwxrwxr-x 1 eugene users   52 Apr 25  2013 myecho.cgi*
-rw-r--r-- 1 eugene users   40 Oct 22  2009 passwords
-rw-rw-r-- 1 eugene users  119 Sep 29  2009 redirectroot
-rwxrwxr-x 1 eugene users  292 Jun 21  2011 test.cgi*

in scripts/
-rw-rw-r-- 1 eugene users  565 Jul  8  2009 dsdbh.pm       [UP TO DATE]
-rwxr-xr-x 1 eugene users 3406 Sep 10  2009 dsfsindex*     [UP TO DATE]
-rwxr-xr-x 1 eugene users 4044 Aug 23  2016 dsprodindex*   [UP TO DATE]
-rwxr-xr-x 1 eugene users 1470 Apr 22  2013 dsrootindex*   [UP TO DATE]

the following are in DataStoreServer directories, but missing from /ds-cgi:
scripts/dsprodtool
scripts/dsreg
scripts/installscripts
scripts/Makefile
scripts/Makefile.am
scripts/Makefile.in
scripts/tabledefs.sql
web-cgi/index.txt.template

---------

