There are some details missing, but the jist of what needs to happen is here.
*Please keep in mind that I live VERY near St. Louis and was writing this during the World Series Championship game 6 and game 7! I've been distracted to say the least ;)
OpenGTS Config manual is the REAL source for what needs to be done, but here are the steps for CentOS 6.0 with a little strategy difference (I wanted to use the CentOS provided version of most everything).
If you want to use the "real" java SDK, fine, download it from HERE and change the rest of the java install accordingly:
yum install ant mysql-connector-java java-1.6.0-openjdk tomcat6 apache-tomcat-apis httpd classpathx-mail cd /opt wget "http://sourceforge.net/projects/opengts/files/server-base/2.3.8/OpenGTS_2.3.8.zip/download" unzip OpenGTS_2.3.8.zip ln -s OpenGTS_2.3.8 OpenGTS
Create environment file
cat >> /etc/profile.d/opengts.sh << EOF #The Java JDK (NOT the JRE) installation directory. #export JAVA_HOME=/usr/java/latest export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 #The Apache Ant installation directory. #export ANT_HOME=/usr/lib64/gcj/ant #The Apache Tomcat installation directory. export CATALINA_HOME=/usr/share/tomcat6 #The OpenGTS installation directory. export GTS_HOME=/opt/OpenGTS EOF . /etc/profile.d/opengts.sh
If you don't want to use the "classpathx-mail" javamail.jar you can download the mail.jar from Oracle or here:
OR just use the one installed:unzip javamail1_4_4.zip cp -p ~/javamail-1.4.4/mail.jar $JAVA_HOME/jre/lib/ext/
ln -s /usr/share/java/javamail.jar $JAVA_HOME/jre/lib/ext/
Here are a couple of symlinks that help out:
mkdir /usr/share/tomcat6/common/lib cd /usr/share/tomcat6/common/lib ln -s /usr/share/java/tomcat6-servlet-2.5-api-6.0.24.jar servlet-api.jar ln -s /usr/share/java/mysql-connector-java-5.1.12.jar $JAVA_HOME/jre/lib/ext/
The real meat of the install of the java stuff:
cd $GTS_HOME ant all ant track.war ant track.deploy
A couple of housekeeping commands to silence warnings/errors before running the checkInstall.sh:
ln -s $JAVA_HOME java ln -s $CATALINA_HOME tomcat ln -s $GTS_HOME gts $GTS_HOME/bin/checkInstall.sh
Correct issue noted from the checkinstall script.
Initialize the database and get the demo stuff up and going:
service mysqld restart service tomcat6 restart echo "create database demo;"|mysql $GTS_HOME/bin/initdb.sh -rootUser=root -rootPass= $GTS_HOME/bin/admin.pl Account -account=demo -nopass -create $GTS_HOME/bin/admin.pl Device -account=demo -device=demo -create $GTS_HOME/bin/admin.pl Device -account=demo -device=demo2 -create $GTS_HOME/bin/dbAdmin.pl -load=EventData -dir=./sampleData
Look at $GTS_HOME/logs/TrackWar.log or /var/log/tomcat6/catalina.2011-10-26.log for issues.
Next part will be connecting a real test client to this server... coming soon!
http://www.opengts.org/FAQ.html
http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS#RHEL.2FCentOS.2FSL_6_:_Packages_Status_Summary
Not a bad start... but quite lacking in the sense of a complete install procedure. Have a look here for a simple bash script installer ready to use out-of-the-box... Tested via the Android application GPS2OpenGTS_Free found on the Market.
ReplyDeleteFunny, the GPS2OpenGTS_Free is the one I choose, also to test. I didn't like that GPS2OpenGTS_Free hard codes a single fixed name, but that's why it's free.
ReplyDeleteYou have a good script from your link -- when you fix the wget line ;) . I just think that knowing why sections of code or script is needed is part of learning.
I finished the installation but not sure how to test. I tried GPS2OpenGTS_Free but couldn't find any thing on the server. Could anyone please guide me how to use a device for testing?
ReplyDeleteThe GPS2OpenGTS_Free client connection guide is next on my list. I have an incomplete draft started. I just got lazy and haven't completed ;) I might be able to sink some time into it tonight.
ReplyDeleteIs there any special setting needed for gps2opengts_free? I am getting this error in the server log.
ReplyDelete[ERROR|11/22 15:30:13|DMTPClientPacketHandler._parsePacket:927] Exception: Error:
Invalid packet header [ServerError=F111, Packet=6465]
at org.opendmtp.server.base.Packet.(Packet.java:656)
at org.opendmtp.server.base.DMTPClientPacketHandler._parsePacket(DMTPClientPacketHandler.java:871)
at org.opendmtp.server.base.DMTPClientPacketHandler.getHandlePacket(DMTPClientPacketHandler.java:197)
at org.opengts.util.ServerSocketThread$ServerSessionThread.run(ServerSocketThread.java:1554)
[ERROR|11/22 15:30:13|Packet.encode:859] Unknown encoding: -1
ALSO GETTING SAME ERROR.
ReplyDeleteStarted the server with the command:
sudo $GTS_HOME/bin/runserver.sh -s gtsdmtp -i
The client running on HTC Android: Configured to connect using UDP
THIS IS WHAT I SEE ON THE OpenGTS console:
[INFO_|01/19 20:29:31|ServerSocketThread$ServerSessionThread.run:1463] Remote client port: /66.87.88.133:34412[31000]
[INFO_|01/19 20:29:31|AbstractClientPacketHandler.printSessionStart:204] Begin TCP communication: 66.87.88.133
[INFO_|01/19 20:29:31|DMTPClientPacketHandler.sessionStarted:127] Begin Simplex communication: 66.87.88.133
[ERROR|01/19 20:29:31|DMTPClientPacketHandler._parsePacket:927] Exception: Error:
Invalid packet header [ServerError=F111, Packet=6465]
at org.opendmtp.server.base.Packet.(Packet.java:656)
at org.opendmtp.server.base.DMTPClientPacketHandler._parsePacket(DMTPClientPacketHandler.java:871)
at org.opendmtp.server.base.DMTPClientPacketHandler.getHandlePacket(DMTPClientPacketHandler.java:197)
at org.opengts.util.ServerSocketThread$ServerSessionThread.run(ServerSocketThread.java:1554)
[ERROR|01/19 20:29:31|Packet.encode:859] Unknown encoding: -1
[INFO_|01/19 20:29:31|ServerSocketThread$ServerSessionThread.run:1626] End of session ...
[INFO_|01/19 20:29:31|DMTPClientPacketHandler.sessionTerminated:162] End Simplex communication: 66.87.88.133
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
BELOW IS THE TCPDUMP OUTPUT:
20:29:31.180382 IP 66-87-88-133.pools.spcsdns.net.34412 > gps-server.local.31000: UDP, length 79
0x0000: 0023 4ee0 33a2 687f 7420 b7b0 0800 4500 .#N.3.h.t.....E.
0x0010: 006b 0000 4000 2d11 f084 4257 5885 c0a8 .k..@.-...BWX...
0x0020: 0179 866c 7918 0057 8ce7 6465 6d6f 2f74 .y.ly..W..demo/t
0x0030: 6573 7430 312f 2447 5052 4d43 2c30 3232 est01/$GPRMC,022
0x0040: 3935 382c 412c 3337 3039 2e30 3634 322c 958,A,3709.0642,
0x0050: 4e2c 3134 3230 372e 3833 3135 2c57 2c30 N,14207.8315,W,0
0x0060: 2e30 3934 3832 342c 3130 382e 3532 2c32 .094824,108.52,2
0x0070: 3030 3131 322c 2c2a 34 00112,,*4
20:29:31.190255 IP gps-server.local.31000 > 66-87-88-133.pools.spcsdns.net.34412: UDP, length 15
0x0000: 687f 7420 b7b0 0023 4ee0 33a2 0800 4500 h.t....#N.3...E.
0x0010: 002b 0000 4000 4011 ddc4 c0a8 0179 4257 .+..@.@......yBW
0x0020: 5885 7918 866c 0017 2dad 2445 3045 303a X.y..l..-.$E0E0:
0x0030: 4631 3131 3634 3635 0d F1116465.
This comment has been removed by the author.
ReplyDeletehow installed opengts 2.5.0?
ReplyDeleteSorry, I haven't yet played with 2.5.0 yet. I may try it soon.
ReplyDeleteThanks for the quick reply. can add a tracker?
ReplyDeleteI know this is an old thread, but this post saved me many hours of head scratching, many thanks.
ReplyDeleteDavid Brown:
ReplyDeleteThe same about me. Many many thanks to pjwelsh