
Wireless Sensor Networks
Stargate Developer’s Guide
Page 22
Doc. # 7430-0317-13 Rev. B
$ cd /lib
$ ln -s libdb.so.3 libdb.so2
Edit the /etc/hosts file and make sure there is an entry for the Stargate IP address similar to the
following but using your specific IP address:
192.168.2.3 Stargate Stargate.domain
Modify the Apache default configuration to fix the cgi-bin path.
$ cd /etc/apache
Edit the Apache configuration file named
httpd.conf
. Make sure you update the cgi-bin path to
be /home/apache/cgi-bin in the sections below:
ScriptAlias /cgi-bin/ /home/apache/cgi-bin/
#
# "/usr/lib/cgi-bin" could be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory /home/apache/cgi-bin/>
AllowOverride None
Options ExecCGI FollowSymLinks Indexes Includes
Order allow,deny
Allow from all
</Directory>
Create the Apache cgi-bin folder and set the permissions -
$ cd /home/apache
$ mkdir cgi-bin
$ chown apache:www-data cgi-bin
Start the Apache web server to test.
$ /etc/init.d/apache start
Start a web browser session and enter http://<Stargate IP address>/index.html - you should see
the default Apache web page appear.
The web root is located in /home/apache/public_html. CGI applications can be placed into the
/home/apache/cgi-bin folder to provide dynamic application content.
3.2.7
Java Runtime
This section describes how to add the ability to run Java based applications on the Stargate. There
are two Java runtimes available: Open Wonka and Sun CDC (Connected Device Configuration).
Open Wonka has been reported to be slow and not very stable. Crossbow recommends using the
CDC runtime version augmented with the Open Wonka class library – wre.jar.
Due to the size of the CDC java runtime installation it is recommended that it be installed on the CF
card as follows:
1.
Copy the <CDROM>\8160-0025-14_A\config\stargate-j2me-cdc-wre.tgz archive into the
/mnt/cf1 folder on the Stargate using scp from a PC Cygwin session.
2.
Unarchive the file and create a symbolic link to the Java CDC runtime as follows:
$ cd /mnt/cf1
$ tar zxvf stargate-j2me-cdc-wre.tgz
$ ln –s /mnt/cf1/cdc/bin/jre /usr/sbin/jre
Summary of Contents for Stargate
Page 1: ...Stargate Developer s Guide Rev B January 2006 Document 7430 0317 13 ...
Page 50: ......
Page 51: ......