- NWI Tech Support - http://www.nwitechsupport.com -
OpenGTS Install
Posted By tdurbin On November 10, 2011 @ 2:44 pm In Linux | 10 Comments
Recently we have become involved in a project that I figured I’d share with the community as it seems there are numerous build requests on freelancer.com as well as many other ‘rent-a-guru’ sites… and as always, this is our contribution back to the AWSOME world of Open Source!
Our goal was to build, but of course, an Open Source GPS (Global Positioning System) Tracking System to be used with Android devices.
Doing little research yielded that there was no better route than OpenGTS [1]… it’s been around for ages, implemented in over 90+ countries, has an enormous list of compatible devices, functionality that seems limitless, scalability, etc… Needless to say, we found our match.
Next came the core build/implementation phase to provide an environment for development. This was the part that was lacking without some background in Java, MySQL, Tomcat, and Linux in general…
Searching provided numerous ‘good’ posts on the subject, and the documentation on GeoTelematic Solutions website was helpful as well, but there was nothing that just “worked” out-of-the-box. Hence, the reason for this article.
To begin, we started with a fresh install of CentOS 6 “Minimal Desktop”, the DVD iso came from from the official CentOS mirror, have a look here [2] for the full locations list.
During the install you were requested to enter a ‘root’ password, you will need this password to run the script as sudo has not been setup for the user created during the initial start-up. When you reach the login you’ll notice your created user in a list above ‘other…’. Click on ‘other’ and type root as the username, then enter the password you created during the install. You will receive a warning about running under the ‘root’ account. You can dismiss this and even put a check in the box ‘…don’t show this again…’.
Here is where the hard part becomes simple… To install OpenGTS all you need to do is open a terminal window ‘Applications > System Tools > Terminal’. Then execute the following command:
mkdir ~/files; cd ~/files; wget http://www.nwitechsupport.com/download/opengts/opengts_cos6_r2a.sh
You just told Linux to create the directory ‘files’ under your home directory which is currently ‘/root’, move to that directory and download the Installer Script.
Next we’ll want to run the script by executing the following command:
sh opengts_cos6_r2a.sh
After the script completes you should have a fully functional OpenGTS system… problem is that you’ll need a way for your devices to communicate back to the system to track their locations. This will require some network environment information as you’ll need to open port 8080 TCP for tomcat (access to the web interface), as well as port 31000 TCP and UDP (to allow the OpenDMTP protocol through) and then pass the connection to your newly installed OpenGTS server.
How to go about these steps are dependent upon a number of factors within your environment including your Firewall/Router, Internet WAN IP (DHCP or Static), and LAN IP of the OpenGTS server.
You can acquire your LAN IP via the terminal with the command:
ifconfig
If you plan on keeping the install around, I would recommend setting a static IP, or better yet, set an IP via the DHCP server and lock it down by the MAC address… depending on your environment, of course.
You can acquire your WAN IP via any MYIP website such as our own here [3].
The firewall/router is going to depend on your specific firewall/router, as stated… and there are just too many to list. To narrow down your efforts search for ‘Port Mapping” or ‘Pinhole’ with regard to your specific device.
If you have a DHCP (Dynamic Host Configuration Protocol) address on the WAN side, as many subscribers do. You’ll want to look into Dynamic DNS as a permanent solution. We provide Dynamic DNS to our own client base, it’s just not been released to the public (formally)… if you’d like to be added send us a request and we’ll set up an account for you.
Bare in mind that the script provided is a crude BASH script, and we take no responsibility for any issues or damages this may cause. Just covering our own there. If you have any problems, questions, etc… Let us know.
Article printed from NWI Tech Support: http://www.nwitechsupport.com
URL to article: http://www.nwitechsupport.com/2011/11/10/opengts-install/
URLs in this post:
[1] OpenGTS: http://www.opengts.org/
[2] here: http://www.centos.org/modules/tinycontent/index.php?id=30
[3] here: http://myip.spcddns.com
[4] : http://pjwelsh.blogspot.com/2011/10/centos-60-opengts-238-install-and-setup.html
[5] : http://www.nwitechsupport/download/66/
Click here to print.
Copyright © 2010 NWI Tech Support. All rights reserved.
10 Comments To "OpenGTS Install"
#1 Comment By Alysson On November 10, 2011 @ 7:56 pm
Would explain to me the best configuration step in the ip and port opengts once created with this script?
#2 Comment By tdurbin On November 10, 2011 @ 9:39 pm
Alysson,
Unfortunately there isn’t a best configuration… it all depends on your environment. Let’s start with your LAN, do you have a router/firewall, if so what is the model and make (for example: Linksys WRT54G, Asus RT-N16, etc…)? What IP do you see on the OpenGTS server? These two questions may hold your answer. Let me know and I’ll do the best I can for you.
#3 Comment By pjwelsh On November 10, 2011 @ 10:19 pm
Errrrr… fix wget line
Decent auto install script otherwise. Not sure about chkconfig and run level “4″ (unused), however. Could use your $GTS_HOME variable in a few more places.
I do have to admit that I did not know about or had to use/create the /etc/init.d/opengts or the startServers.sh script it points too. My testing functioned without using them directly noted [4]
#4 Comment By tdurbin On November 11, 2011 @ 6:12 am
pjwelsh,
There’s an issue with wget? Thanks for the feedback, by the way.
Run level 4 doesn’t necessarily need to be there, but I figured I’d tag it just in-case anyone decided to define it.
I was having a problem with chown not respecting the $GTS_HOME variable and ran with it… sloppy, I know.
I found some great info from your site that lead me to piecing together this script, so I owe you another thank you for the inspiration.
#5 Comment By pjwelsh On November 11, 2011 @ 11:52 pm
“wget [5]”
I think you missed the “.com”. I don’t get much without adding it
I quick test script of the the export/mkdir/chown did not show there is an issue, but a “eval” at the beginning might help keep the variable in play in general.
#6 Comment By tdurbin On November 12, 2011 @ 7:47 am
Thank’s pjwelsh, I was looking at the script scratching my head… I now see you meant the post and added the .com.
The script is very sloppy and to tell you truthfully, I’m not much of a programmer/scripter.
If you have ideas or improvements, I would love to implement them and thank’s again for the feedback.
#7 Comment By Duc On December 22, 2011 @ 1:42 pm
tdurbun,
I wanted to thank you for the script… I was able to install opengts without any issues and tested it with gps2opengts…
But i do have question for you.
Do you know if i can configure additional add-on modules with opengts myself or do i have to get GTS Enterprise?
thanks for the script again.
#8 Comment By tdurbin On December 22, 2011 @ 6:39 pm
Duc,
No problem, good to hear all went as planned.
I’m not positive on this but I believe the add-ons listed under GeoTelematic’s site are related to the Enterprise package as I couldn’t find a ‘dcservers’ directory in the open source zip.
#9 Comment By Andreas On January 23, 2012 @ 1:09 am
Hey, thanks for this post. Great work!
Do you know any app for windows mobile devices to connect to OpenGTS? I looked at OpenDMTP for this, but I only got confused…
#10 Comment By tdurbin On January 23, 2012 @ 11:14 am
Andreas, thanks for the feedback. My pleasure, by the way… Have you tried compiling the OpenDMTP J2ME-Client? Unfortunately, I do not own a Windows mobile to test.