-
Red Hat® Enterprise Linux® / RHEL or CentOS is recommended for your server's operating system, but the program also runs on Windows and Mac.
-
Install node.js. The latest Node.js long-term support (LTS) version is recommended. Node Source provides pacakges for enterprise Linux.
-
Start a RethinkDB instance. To start a rethinkdb instance, run the command
rethinkdb
. RethinkDB will create its working files in the current directory. -
Verify you can access the RethinkDB admin console at http://localhost:8080
-
In the cloned agilegps folder, run
npm install
to install the dependencies from package.json. -
Run
npm run webpack
. This builds the front-end. -
Place your Google Maps key in
agilegps/public/app/index.html
on the Google Maps script tag. This is necessary for the map to work. Generate a key from https://console.cloud.google.com/ "API & Services" > Credentials > "Create Credentials" > "API Key" -
(Optional) replace the Google Analytics code with your Google Analytics in
agilegps/public/app/index.html
for site analytics.
-
cd agilegps/src/tools
-
Run
node schema.js
to create the DB, tables, and indexes. It’s safe to run this multiple times because it does not drop any DB objects. Verify that the tables exist in the RethinkDB admin console. It should only take a few seconds to run. -
Run
node createAnAdmin.js admin password
to create an Admin user named "admin" with password "password". Use a username and password of your choosing.
cd agilegps/src/server
node server
starts the server without listening for file system changes.- You should be able to access and login to the app at http://localhost:3000
The message listener (also known as the message gateway or just gateway) is a separate process from the web server that receives messages from tracker devices and inserts their reported data into the database. The message listener can be started and stopped independently of the web server.
cd agilegps/src/listener
- Run:
node listen.js
The processes.json
file is pre-configured for PM2 which is a convenient way to run the app in production. PM2 can be installed to automatically run the app at system startup, log process output, etc.
-
(Optional) Put your Google Maps API key in
config/geocoding.js
if using Google Reverse Geocoding -
Configure
agilegps/config/listener.js
-
Configure
agilegps/config/web.json
- isReverseProxied - if you are behind a reverse proxy, set this to true
- cluster - set this to true to use all CPUs
- jwtSecret - you should generate a random long string here using a command like
pwgen 64
. This string is used to sign the JWT tokens. - cookieKeys - you should generate an array of two more strings using a command like
pwgen 64
. These are used to sign the session cookies. The array allows you to rotate in new keys.
-
pm2 start processes.json
- location generator - generate random GPS data for an IMEI
- faker - Load event data from a file and send as if it came from GPS units.
- Create an Admin