Contact us Login LIVE DEMO FREE TRIAL

Manual installation

This section is a step-by-step manual installation guide for the Navixy On-premise solution.

This guide primarily deals with Debian 8 operating system – this is the OS we recommend. You can download the ISO file with Debian 8 using the following link:
https://cdimage.debian.org/mirror/cdimage/archive/8.8.0/amd64/iso-cd/debian-8.8.0-amd64-netinst.iso

If you wish to install on any other OS, this guide can be adapted as the basic principles are the same.

The installation can be done entirely from root.

Installing pre-requisites

To install software pre-requisites:

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list ;\
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list ;\
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 ;\
apt-get update ;\
apt-get -y install oracle-java8-installer curl nginx mysql-server runit

MySQL will ask for a new root password, you can leave it emtpy or set any password you wish, but be sure to remember it.
Also, Java might ask you to accept usage policy, answer “Yes”

Preparing databases

Next let’s prepare the databases. Log into MySQL with root and execute the following (Substitute $PASSWORD variable for a new password for user “Navixy”)

CREATE USER [email protected]'%' IDENTIFIED BY '$PASSWORD';
CREATE DATABASE google CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE tracking CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT USAGE ON *.* to [email protected]'%' WITH MAX_QUERIES_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT ALL PRIVILEGES ON google.* TO [email protected]'%';
GRANT ALL PRIVILEGES ON tracking.* TO [email protected]'%';

Installing Navixy components

First of all, create java user

useradd -s /bin/bash -m java

You should have received a distribution package from Navixy, typically in a .deb file.
Extract the package

dpkg -x $PACKAGENAME ./dist
cd dist

The components are already sorted in folders, so just copy them to root folder

cp -a * /

This will also copy runit scripts which will attempt to start the services immediately, but since we haven’t configured anything yet, let’s tell them to stop

sv stop {api-server,sms-server,navixyserver}

Assign the owners for java components

cd /home/java
chown -R java:java api-server sms-server tcp-server
cd /var/www
chown -R www-data:www-data panel-v2 pro-ui
cd /etc/sv
chown -R root:root api-server sms-server tcp-server

Next we will import the data into database. Don’t forget to use your MySQL root password instead of $PASSWORD

cd /home/java/db
mysql -uroot -p$PASSWORD < google.sql
rm google.sql updates.sql
cat *.sql | mysql -uroot -p$PASSWORD google

Configuring Navixy platform

Now it’s time to do some basic configuration

Open the following files:
/home/java/api-server/conf/db.properties
/home/java/sms-server/conf/db.properties
/home/java/tcp-server/conf/db.properties

and set MySQL user and password in each of them, use the password that you made up earlier

db.username=navixy
db.password=$PASSWORD

Next, open /home/java/api-server/conf/config.properties
And edit the following parameters

[email protected]
[email protected]

Set the feedback recepient address and default FROM field.

Open /home/java/tcp-server/conf/config.properties
And edit the following parameters

externalIP=127.0.0.1
externalHostname=myhost.ru

Set the external IP and hostname for your platform, they will be used for automatic tracker configuration

Next, open /var/www/panel-v2/PConfig.js
Edit the following strings

apiRoot: 'http://api.domain.com/panel',
paasCompanyUrl: 'saas.navixy.com',
terminalHost: 'ws://api.domain.com:8383/',

Where:
apiRoot – link to your API, typically you just need to change “domain.com” to your own domain
paasCompanyUrl – A domain which your customers will use to access their accounts. Note that it shouldn’t contain “http://”
terminalHost – A link to GPRS terminal used for GPS device diagnostics, typically it’s the same as your API domain

Open /var/www/pro-ui/Config.js
Edit the following

apiRoot: 'http://api.domain.com',

Same as above, change “domain.com” to your domain

Next, we should install the license key (fingerprint). You will receive the fingerprint from Navixy, it will be just a string of symbols.
Insert fingerprint into the database

UPDATE google.variables
SET value='$FINGERPRINT'
WHERE var='fingerprint';

If running the query from bash shell, it is necessary to escape the special characters in the fingerprint. For this reason, we recommend using some MySQL client, like MySQL workbench or similar, as they do this automatically. Alternatively, you can use any MySQL string escaping utility, or do this manually.

Configuring web server

Next we will create nginx configuration for your sites. Create config files named after your domain.

cd /etc/nginx/sites-available
touch api.domain.com
touch panel.domain.com
touch my.domain.com

We recommend leaving “api” and “panel” sub-domains as is, but for monitoring sub-domain, you can choose anything you wish (“my”, “gps”, e.t.c) or you can leave your second level domain for monitoring page.

Below is the typical configuration for each of the three sites. Replace “domain.com” with your domain

api.domain.com

server {
    listen 80;
    server_name api.domain.com;
    access_log /var/log/nginx/api.domain.com.access.log;
    client_max_body_size 20m;

    location / {
        proxy_pass http://127.0.0.1:8084;
    }

}

panel.domain.com

server {
    listen 80;
    server_name panel.domain.com;
    access_log /var/log/nginx/panel.domain.com.access.log;
    client_max_body_size 20m;   

    location / {
        index index.html;
        add_header Access-Control-Allow-Origin *;
        root /var/www/panel-v2/;
    }
}

my.domain.com

server {
    listen 80;
    server_name my.domain.com;
    access_log /var/log/nginx/my.domain.com.access.log;
    client_max_body_size 20m;   

    location / {
        index index.html;
        add_header Access-Control-Allow-Origin *;
        root /var/www/pro-ui/;
    }
}

Create symlinks to enable the configuration

cd /etc/nginx/sites-available
ln -s /etc/nginx/sites-available/api.domain.com ../sites-enabled/api.domain.com
ln -s /etc/nginx/sites-available/panel.domain.com ../sites-enabled/panel.domain.com
ln -s /etc/nginx/sites-available/my.domain.com ../sites-enabled/my.domain.com

Test and reload nginx configuration

nginx -t && nginx -s reload

If nginx returns an error, doble-check nginx configuration

Database tuning

On database level, Navixy always works with data in UTC timezone, so we should make this a default timezone for MySQL

Execute the following (replace $PASSWORD with your MySQL root password):

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -p$PASSWORD mysql

Open /etc/mysql/my.cnf, and under [mysqld] add

[mysqld]
default-time-zone = 'UTC'

Also, we should tune MySQL according to your hardware specs for the most efficient usage. There are many parameters, but in this guide we will cover one most important – InnoDB buffer pool size.

innodb_buffer_pool_size = 16G

If your server will be used only for Navixy platform, set this to 70% of your RAM.
Also, set sql-mode to the following:

sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Restart MySQL server

service mysql restart

Also, we recommend disabling swapping on the Navixy server

swapoff -a

Comment out the swap location in /etc/fstab, if you don’t have a particular reason to leave the swap on

Starting the platform

And now we can start Navixy services

sv start api-server
sv start sms-server
sv start navixyserver

Try logging into admin panel, in this example the address will be http://panel.domain.com
Default login: admin
Default password: admin

You can confirm that services are running by requesting their status

sv status {api-server,sms-server,navixyserver}

Also, by looking at java processes

ps aux | grep java

And in case if there’s some issue, you can check java services logs
/home/java/api-server/log/log.txt
/home/java/sms-server/log/log.txt
/home/java/tcp-server/log/log.txt

This concludes the installation, and you can start using Navixy GPS monitoring platform. For SMS gateway configuration, please refer to the corresponding documentaion page.

If you have more questions please contact our support team

Contacts

USA: +1 858 815 9045

Mexico: +52 334 1642158

UK: +44 808 1641499

Germany: +49 1573 5988250

Russia: +7 495 317 1622

Log in

Loading...

We use сookies to improve our website, products and related services, analyze site traffic, and serve targeted advertisements. If you continue to use our services, you consent to our use of сookies. Read more