Difference between revisions of "How to set up Sql-Ledger to serve from AOLserver"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 1404)
 
(formatting tweaks, copy editing)
Line 1: Line 1:
Install sql-ledger with the following modifications:
+
Install SQL-Ledger with the following modifications:
  
Note that I'm using this on an isolated LAN so have not done any testing  to verify the integrity of sql-ledger security on it.
+
Note that I'm using this on an isolated LAN so have not done any testing  to verify the integrity of SQL-Ledger security on it.
  
Be sure aolserver is installed, and shutdown.
+
Be sure AOLserver is installed, and shutdown.
  
Get sql-ledger
+
* Get [http://sql-ledger.org/cgi-bin/nav.pl?page=source/index.html&title=Download SQL-Ledger].
http://sql-ledger.org/cgi-bin/nav.pl?page=source/index.html&title=Download
 
  
Follow the directions for: INSTALLATION WITHOUT setup.pl
+
* Follow the directions for [http://sql-ledger.org/cgi-bin/nav.pl?page=source/readme.txt&title=README INSTALLATION WITHOUT setup.pl].  Be sure to '''skip''' using the sql-ledger supplied "setup.pl" file.
http://sql-ledger.org/cgi-bin/nav.pl?page=source/readme.txt&title=README Be sure to *Skip* using the sql-ledger supplied "setup.pl" file.
 
  
 
We adapt the instructions for setting setting up httpd (aolserver's nsd in this case):
 
We adapt the instructions for setting setting up httpd (aolserver's nsd in this case):
  
Download and build the aolserver nscgi module the corresponds to the version of aolserver you are using. Usually nscgi is already included with the aolserver distribution.
+
* Download and build the AOLserver [[nscgi]] module. Usually [[nscgi]] is already included with the AOLserver distribution.
  
You can see examples of how to build aolserver modules by reading the aolserver install docs for openacs5.1, basically gmake, gmake install..
+
You can see examples of how to build AOLserver modules by reading the [http://openacs.org/doc/openacs-5-1/aolserver4.html AOLserver install docs for OpenACS 5.1].
http://openacs.org/doc/openacs-5-1/aolserver4.html
 
  
In the openacs config.tcl file, activate the cgi module in this section:
+
In the OpenACS config.tcl file, activate the [[nscgi]] module in this section:
  
 
  ns_section ns/server/${server}/modules  
 
  ns_section ns/server/${server}/modules  
  # add the below ns_param in this section
+
  ns_param  nscgi              ${bindir}/nscgi.so
 
 
    # nscgi used by sql-ledger
 
    ns_param  nscgi              ${bindir}/nscgi.so
 
 
 
  
 
And modify the nscgi module configuration in config.tcl to this:
 
And modify the nscgi module configuration in config.tcl to this:
 
#---------------------------------------------------------------------
 
# CGI interface -- nscgi. Tcl or ADP files inside
 
# AOLserver are vastly superior in performance compared with to CGIs.
 
  
 
  ns_section "ns/server/${server}/module/nscgi"
 
  ns_section "ns/server/${server}/module/nscgi"
 
+
ns_param  map "GET  /sql-ledger/*.pl /usr/local/sql-ledger"
    ns_param  map "GET  /sql-ledger/*.pl /usr/local/sql-ledger"
+
ns_param  map "POST /sql-ledger/*.pl /usr/local/sql-ledger"
    ns_param  map "POST /sql-ledger/*.pl /usr/local/sql-ledger"
+
ns_param  Interps CGIinterps
 
+
    ns_param  Interps CGIinterps
 
 
 
 
  ns_section "ns/interps/CGIinterps"
 
  ns_section "ns/interps/CGIinterps"
      ns_param .pl "/usr/bin/perl"
+
ns_param   .pl "/usr/bin/perl"
 
 
#---------------------------------------------------------------------
 
  
Put the sql-ledger directory in the aolserver's www serverroot directory, assuming it has been untarred in the /usr/local directory per SL docs:
+
Put the SQL-Ledger directory in the AOLserver's pageroot directory, assuming it has been untarred in the /usr/local directory per SL docs:
  
 
  cd /usr/local
 
  cd /usr/local
 
  mv /sql-ledger /usr/local/sql-ledger/.
 
  mv /sql-ledger /usr/local/sql-ledger/.
  
# set permissions to match the rest of the aolserver files, for example:
+
# set permissions to match the rest of the aolserver files, for example:
 
 
 
  cd /usr/local/
 
  cd /usr/local/
 
  chown -R nsadmin:web sql-ledger
 
  chown -R nsadmin:web sql-ledger
 
  chmod -R 770 sql-ledger  
 
  chmod -R 770 sql-ledger  
  
 +
Follow the SL directions to create a SQL-Ledger database and user for PostgreSQL, and proceed with the configuration in the SL README.  Hopefully you see a login page at http://yourservername:port/sql-ledger/admin.pl and are able to follow standard SQL-Ledger configuration directions.
  
Follow the SL directions to create an sql-ledger db and user for postgreSQL, and proceed with the configuration in the SL README.  Hopefully you see a login page at http://yourservername:port/sql-ledger/admin.pl and are able to follow standard sql-ledger configuration directions.
+
[[Category:Tutorial]]

Revision as of 14:19, 5 November 2005

Install SQL-Ledger with the following modifications:

Note that I'm using this on an isolated LAN so have not done any testing to verify the integrity of SQL-Ledger security on it.

Be sure AOLserver is installed, and shutdown.

We adapt the instructions for setting setting up httpd (aolserver's nsd in this case):

  • Download and build the AOLserver nscgi module. Usually nscgi is already included with the AOLserver distribution.

You can see examples of how to build AOLserver modules by reading the AOLserver install docs for OpenACS 5.1.

In the OpenACS config.tcl file, activate the nscgi module in this section:

ns_section ns/server/${server}/modules 
ns_param   nscgi              ${bindir}/nscgi.so

And modify the nscgi module configuration in config.tcl to this:

ns_section "ns/server/${server}/module/nscgi"
ns_param   map "GET  /sql-ledger/*.pl /usr/local/sql-ledger"
ns_param   map "POST /sql-ledger/*.pl /usr/local/sql-ledger"
ns_param   Interps CGIinterps

ns_section "ns/interps/CGIinterps"
ns_param   .pl "/usr/bin/perl"

Put the SQL-Ledger directory in the AOLserver's pageroot directory, assuming it has been untarred in the /usr/local directory per SL docs:

cd /usr/local
mv /sql-ledger /usr/local/sql-ledger/.
# set permissions to match the rest of the aolserver files, for example:
cd /usr/local/
chown -R nsadmin:web sql-ledger
chmod -R 770 sql-ledger 

Follow the SL directions to create a SQL-Ledger database and user for PostgreSQL, and proceed with the configuration in the SL README. Hopefully you see a login page at http://yourservername:port/sql-ledger/admin.pl and are able to follow standard SQL-Ledger configuration directions.