To install ScriptBasic (scriba & sbhttpd) on a CentOS 5 (Red Hat recompile), place the Linux files in the following directories.
/usr/bin
-rwxr-xr-x 1 root root 508070 Jan 25 21:30 sbhttpd
-rwxr-xr-x 1 root root 482077 Jan 24 19:21 scriba
/usr/lib/scriba
-rwxr-xr-x 1 root root 43894 May 11 2006 cgi.so
-rwxr-xr-x 1 root root 2016573 May 16 2006 curl.so
-rwxr-xr-x 1 root root 18328 May 11 2006 dbg.so
-rwxr-xr-x 1 root root 738419 May 11 2006 gd.so
-rwxr-xr-x 1 root root 11024 May 11 2006 hash.so
-rwxr-xr-x 1 root root 22367 Jul 24 2007 mt.so
-rwxr-xr-x 1 root root 21646 Jan 17 23:18 mysql.so
-rwxr-xr-x 1 root root 454982 May 11 2006 odbc.so
-rwxr-xr-x 1 root root 31223 May 16 2006 pgsql.so
-rwxr-xr-x 1 root root 358109 May 11 2006 psql.so
-rwxr-xr-x 1 root root 51669 May 11 2006 re.so
-rwxr-xr-x 1 root root 10581 May 11 2006 t.so
-rwxr-xr-x 1 root root 2772 May 11 2006 ux.so
-rwxr-xr-x 1 root root 595207 May 11 2006 zlib.so
/usr/include/scriba
-rw-r--r-- 1 root root 5438 May 11 2006 cgi.bas
-rw-r--r-- 1 root root 731 May 16 2006 curl.bas
-rw-r--r-- 1 root root 721 May 11 2006 dbg.bas
-rw-r--r-- 1 root root 8331 May 11 2006 error.bas
-rw-r--r-- 1 root root 2274 May 11 2006 gd.bas
-rw-r--r-- 1 root root 2028 May 11 2006 hash.bas
-rw-r--r-- 1 root root 214 May 11 2006 heb.bas
-rw-r--r-- 1 root root 9968 May 11 2006 modinst.bas
-rw-r--r-- 1 root root 1178 Jul 24 2007 mt.bas
-rw-r--r-- 1 root root 10 May 11 2006 my.bas
-rw-r--r-- 1 root root 1709 May 11 2006 mysql.bas
-rw-r--r-- 1 root root 590 May 11 2006 odbc.bas
-rw-r--r-- 1 root root 1592 May 16 2006 pgsql.bas
-rw-r--r-- 1 root root 2119 May 11 2006 re.bas
-rw-r--r-- 1 root root 945 May 11 2006 t.bas
-rw-r--r-- 1 root root 578 May 11 2006 time.bas
-rw-r--r-- 1 root root 551 May 11 2006 ux.bas
-rw-r--r-- 1 root root 997 May 11 2006 zlib.bas
/etc/scriba
-rw-r--r-- 1 root root 1682 Jan 25 20:37 basic.conf
-rw-r--r-- 1 root root 1102 Jan 25 20:35 basic.conf.txt
/var/log/scriba
-rw-r--r-- 1 root root 1626 Jan 25 21:32 app.log
-rw-r--r-- 1 root root 0 Jan 25 20:34 err.log
-rw-r--r-- 1 root root 976 Jan 25 21:33 hit.log
-rw-r--r-- 1 root root 0 Jan 25 20:30 panic.log
-rw-r--r-- 1 root root 5 Jan 25 21:32 pid.txt
-rw-r--r-- 1 root root 0 Jan 25 20:34 start.log
Note: Create empty log files to get started.
Here is a 'bare bones' basic.conf file for both scriba and sbhttp under CentOS 5.
dll ".so"
module "/usr/lib/scriba/"
include "/usr/include/scriba/"
preproc (
internal (
dbg "/usr/lib/scriba/dbg.so"
)
)
maxstep 0
maxlocalstep 0
maxlevel 55440
maxmem 0
servers (
server (
port 8080
ip "127.0.0.1"
protocol "http"
)
threads 1024
listenbacklog 3
home "/var/www/html/app-bin/"
proxyip 1
pid (
file "/var/log/scriba/pid.txt"
delay 10
wait (
period 10
length 1
)
)
errmsgdest 3
nolog 0
log (
panic (
file "/var/log/scriba/panic.log"
)
app (
file "/var/log/scriba/app.log"
)
err (
file "/var/log/scriba/err.log"
)
hit (
file "/var/log/scriba/hit.log"
)
stat (
file "/var/log/scriba/stat.log"
)
)
msg404 """
Error 404 page not found
Page not found
We regretfully inform you that the page you have requested can not be found
on this server.
In case you are sure that this is a server configuration error, please
contact the site administrator.
"""
code404 "200 OK"
)
The ScriptBasic interpreter and application server both use the same compiled configuration file. Maintain your basic.conf.txt file in a text editor. Next convert it to the binary format ScriptBasic uses by typing the following command at a console prompt in the /etc/scriba directory.
scriba -k basic.conf.txt
At a minimal, make sure these proxy modules are enabled.
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
Here is what I added to the end of Apache's httpd.conf file.
# ScriptBasic Application Server
ProxyPass /app-bin/ http://127.0.0.1:8080/
ProxyPassreverse /app-bin/ http://127.0.0.1:8080/
You can optionally set the SCRIBACONF environment variable to the full path and filename of where your basic.conf file is located and named. (/etc/scriba/basic.conf is the default location and name if the ScriptBasic environment variable isn't set)
After restarting Apache for the proxy addition, enter the following at a console prompt.
sbhttpd -start
All requests to the /app-bin directory are sent to the ScriptBasic application server to be process.
To stop the server, kill -9 the process ID # in the pid.txt file.
John