|
|
|
1. Get source code from http://www.hughes.com.au 2.
Fast track to compiling mSQL
[root@bluenote src] tar xzvf msql-2.0.3.tar.gz
[root@bluenote src] cd msql-2.0.3
[root@bluenote msql-2.0.3] more INSTALL
[root@bluenote msql-2.0.3] make target
[root@bluenote msql-2.0.3] cd targets/Linux-2.0.32-i686/
[root@bluenote msql-2.0.3] ./setup
[root@bluenote msql-2.0.3] make all
[root@bluenote msql-2.0.3] make install
[root@bluenote msql-2.0.3] cp /usr/local/Hughes/bin/w3-msql /opt/web/cgi-bin
3.
Create a startup script
#!/bin/sh
MSQLD="/usr/local/Hughes/bin/msql2d"
MSQLADMIN="/usr/local/Hughes/bin/msqladmin"
MSQLMESSAGES="/tmp/mSQLd.log"
DEPENDENCIES="$MSQLD $MSQLADMIN"
# Save argument
arg=$1
set `id`
if [ $1 != "uid=0(root)" ]
then
echo "$0: script must be run by root. Exiting..."
exit 1
fi
for FILE in $DEPENDENCIES
do
if [ ! -f $FILE ]
then
echo "$0: Missing component '$FILE'. Exiting"
exit 1
fi
done
# See how we were called.
case "$arg" in
start)
echo -n "Starting mSQLd: "
$MSQLD > $MSQLMESSAGES 2>1 &
# should really check return code here
echo "msqld"
;;
stop)
echo -n "Shutting down mSQLd: "
$MSQLADMIN shutdown > $MSQLMESSAGES 2>1
# should really check return code here
echo "msqld"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
4. Start it up!
[root@bluenote msql-2.0.3] /etc/rc.d/init.d/msqld start
|
|
|
|
|
Last Modified: 17 December 1997 St. Louis Unix Users Group - Linux SIG |
|