embarc information technology (p vt) ltd. · • php 5.5+ • zend guard 7.0+ follow the following...

56

Upload: others

Post on 28-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate
Page 2: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Embarc Information Technology (Pvt) Ltd.

Copyright © 04th January, 2016

All rights reserved

Notice

This manual, as well as the software described in it, is furnished under license granted by Embarc Information Technology (Pvt) Ltd. to authorized clients and may be used only in accordance with the terms of license granted. The content of this manual is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Embarc Information Technology (Pvt) Ltd. While every care has been taken for the correctness of the information, Embarc Information Technology (Pvt) Ltd. assumes no responsibility or liability for any inaccuracies that may have inadvertently crept in this manual.

Embarc Information Technology (Pvt) Ltd. reserves right to make changes to specifications/features/utilities at any time and without notice. The information furnished by Embarc Information Technology (Pvt) Ltd. in this manual is believed to be accurate and reliable. Embarc Information Technology (Pvt) Ltd. assumes no responsibility for its use, or for infringements of patents or other rights of third parties resulting from its use. No license will be granted under any patents or patent rights owned by Embarc Information Technology (Pvt) Ltd.

Please check up for updated version of user manual at: http://www.findnsecure.com/download.html

Use of Google API

Find’n’Secure software uses Google API. Use of Google API is governed by the Terms and Conditions as described in the Google Maps API signup page (https://developers.google.com/maps/signup)

Printed in India

Page 3: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

TABLE OF CONTENTS

Introduction ................................................................................................................ 4

GPS tracking system ............................................................................................... 4

GPS Tracking Unit .................................................................................................. 4

Common uses .......................................................................................................... 5

Find’n’Secure® ........................................................................................................ 5

Linux Installation ...................................................................................................... 6

Linux Configuration ................................................................................................ 20

Software Installation ............................................................................................... 36

User Settings .......................................................................................................... 40

Map Settings .......................................................................................................... 40

SMTP Settings ....................................................................................................... 43

Understanding Configuration File (config.sys) .................................................... 44

Setting up triggers ................................................................................................. 51

Final Steps ............................................................................................................. 54

Summary................................................................................................................ 55

Page 4: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

INTRODUCTION

GPS TRACKING SYSTEM The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. GPS was originally intended for military applications, but in the 1980s, the US government made the system available for civilian use free of cost. Initially the highest quality signal was reserved for military use, while the signal available for civilian use was intentionally degraded ("Selective Availability"). Selective Availability was ended in 2000, improving the precision of civilian GPS from about 100m to about 20m. GPS works in any weather conditions, anywhere in the world, 24 hours a day.

GPS satellites circle the earth twice daily and transmit signal information. GPS receivers use the information to calculate the user's location by the method of triangulation. Basically, the GPS receiver compares the time a signal was transmitted by a satellite with the time it was received. The time difference tells the GPS receiver how far away the satellite is. The receiver must lock on to the signal of at least three satellites to calculate a 2-D position, the latitudinal and longitudinal position, and track movement. Using four or more satellites, the receiver can determine the user's 3-D position, the latitude, longitude, and altitude. Once the position has been determined, the GPS unit can calculate other information such as speed, track, trip distance, bearing and more.

GPS TRACKING UNIT A GPS tracking unit is a device that uses the Global Positioning System to determine the precise location of a vehicle, person, or any other asset to which it is attached and to record the position of the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it may be transmitted to a central location data base, or internet-connected computer, using a cellular (GSM/CDMA), radio, or satellite modem embedded in the unit. This allows the asset's location to be displayed against a map backdrop either in real-time or when analyzing the track later, using customized software.

Page 5: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

COMMON USES Most common application of GPS tracking system is applied for tracking of moving objects, such as, vehicles. Vehicle tracking systems are commonly used by fleet operators for fleet management functions such as routing, dispatch, on-board information and security. Other applications include monitoring driving behavior, such as an employer of an employee, or a parent with a teen driver. Vehicle tracking systems are also popular in consumer vehicles as a theft prevention and retrieval device. Police can simply see the vehicle in real-time over the tracking system and locate the stolen vehicle.

Remote controlling of the vehicle through GPS tracking system is also possible. In such a case owner of the vehicle can give commands to the tracking unit for various operations like blocking the engine or cutting fuel supply to engine etc.

GPS personal tracking system is commonly used for tracking of persons, pets etc. You can keep track of your loved ones in real time using a completely accurate and totally reliable GPS software package via the internet so you know exactly where your kids, parents, pets, asset are at any given point in time.

FIND’N’SECURE® Embarc Information Technology Pvt. Ltd., a leading provider of GPS tracking and security system from India, aims at offering innovative and cost effective tracking and security solutions comprising of hardware as well as software.

GPS tracking technology is best suited for fleet management. It is a unique way for companies and individuals to monitor and control their cars, jeeps, trucks and other vehicles to their precise details by sitting in the office. Find’n’Secure® GPS tracking system will enable you to monitor the movements of your employees, drivers, vehicles or any other asset accurately. With Find’n’Secure® vehicle tracking system in your company's fleet of vehicles, you will find a smart way of fleet management by tracking your vehicles.

Whether you own one truck or a fleet of thousands of vehicles, our highly skilled GPS fleet consultants will assist you in selecting the right type of vehicle tracking system that will give an edge to your company.

Page 6: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

C H AP T ER 1

LINUX INSTALLATION This section of the manual will help you in complete installation of the Linux operating system and Find’n’Secure software. For 500 trackers:

Recommended Optimum Processor Intel® Core™ i5 Intel® Core™ i7 HDD 256 GB (SSD) 512 GB (SSD) RAM 32 GB 64 GB LAN 100 Mbps/1 Gbps 1 Gbps Optical Drive DVD Reader DVD Reader Monitor 19 Inch. LCD 22 Inch. LED Internet Connection 1+ Mbps with Static IP 2+ Mbps with Static IP

For 2000 trackers:

Recommended Optimum Processor Intel® Core™ i7 Intel® Xeon® Processor

E3-1270 HDD 512 GB (SSD) 512 GB (SSD) RAM 32 GB 64 GB LAN 1 GBps 1 GBps Optical Drive DVD Reader DVD Reader Monitor 19 Inch. LCD 22 Inch. LED Internet Connection 4+ Mbps with Static IP 8+ Mbps with Static IP

For 5000 trackers:

Recommended Optimum Processor Intel® Xeon® Processor

E3-1270 Intel® Xeon® Processor E5-1650

HDD 1 TB (SSD) 1 TB (SSD) RAM 128 GB 256 GB LAN 100 Mbps/1 GBps 1 GBps

Page 7: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

7

Optical Drive DVD Reader DVD Reader Monitor 19 Inch. LCD 22 Inch. LED Internet Connection 8+ Mbps with Static IP 10+ Mbps with Static IP

Software Requirements Operating System Ubuntu Server Edition 64 Bit Database MySQL 5.5+ and MongoDB Web Server Apache with PHP 5.5+ Support Others Zend Optimizer

Linux Installation

Download the latest version of Ubuntu Server Edition 64 Bit from http://www.ubuntu.com/download/server. At the time of printing of this manual the latest LTS release of Ubuntu Server Edition is 14.04. After downloading the ISO file you can make use of any DVD burning software to prepare the DVD for Installation. Once you have prepared the DVD for installation boot the server with this DVD disk to begin Installation of Ubuntu. To begin installation of the Ubuntu server, select the option “Install Ubuntu Server”.

Page 8: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

8

Next screen sets the default language and location for this Ubuntu Server

Page 9: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

9

Follow the guided tour of the installation process to completely install Ubuntu Server. During the installation process Ubuntu presents you with the Software selection screen as shown below:

Page 10: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

10

Select LAMP Server and OpenSSH server for installation and press Continue. LAMP = Linux Apache MySQL PHP, pretty much explains it: This package containes an Apache web server (a server that e.g. delivers websites), with a MySQL backend (A database management system), and a PHP interpreter (PHP is a scripting language that is executed on the server before sending the result to the client, in this setup through the Apache server). SSH (Secure Shell) is a protocol to get encrypted remote access to a machine. The machine you want to access needs to run a SSH server to accept incoming requests. OpenSSH is an implementation of SSH. Next to shell access and file transfer (SFTP, SCP), SSH enables fancy things, such as starting an application on the server, but show the GUI on the client (X11 forwarding). You will be asked to enter password for MySQL root user. Please keep this password handy for later use. After the installation is complete, server is automatically restarted and login prompt is presented. Login to the server by entering the credentials you created during the setup process. Once you have successfully logged into the Server you will be presented with the Linux prompt. Issue the following command to enable root user login for easy setup of the server $ sudo passwd root Enter the new UNIX password that you want to use for the root account. Once you have set the password type exit to exit this login prompt and login using the username root This will complete the basic setup of the server and now in the next section we shall setup the server for running the Find’n’Secure software.

Page 11: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

11

Installing Graphical User Interface (GUI)

Issue the following commands to start the Graphical User Interface installation over Ubuntu: $ apt-get update $ apt-get install ubuntu-desktop To enable root login in GUI mode, type in the following commands: sudo sh -c 'echo "greeter-show-manual-login = true" >> /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf' sudo sh -c 'echo "allow-guest = false" >> /usr/share/lightdm/ lightdm.conf.d/50-ubuntu.conf' Once the GUI installation is complete you should reboot the Server by issuing: $ shutdown -r now This completes the GUI installation process and now you will be presented with the login screen in GUI mode.

Installing additional packages

To install packages, you need to install ‘Synaptic Package Manager’. To install ‘Synaptic Package Manager’, use the following command from CLI: apt-get install synaptic It is recommended to upgrade all previously installed packages at this moment, use the following command for the same: apt-get upgrade Start ‘Synaptic Package Manager’ from System > Administration > Synaptics Package Manager 1. Wireshark - Network traffic analyser 2. UnixODBC - ODBC Connection to MS SQL etc.

Page 12: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

12

Installing Zend Optimizer

Download the latest version of the Zend optimizer from http://www.zend.com for the following configuration:

• Linux 64 Bit operating system • PHP 5.5+ • Zend Guard 7.0+

Follow the following steps to install on Ubuntu Server:

1. Extract the Zend Loader package.

2. Locate and extract the ZendGuardLoader.so (Linux) that corresponds to your PHP version. Create a new folder by name /root/zend (mkdir ~/zend) and copy the file into this folder.

3. Add the following line to your php.ini file for loading the

ZendGuardLoader: zend_extension=/root/zend/ZendGuardLoader.so Note: php.ini file can be found in /etc/php5/apache2

4. Add an additional line to your php.ini for enabling ZendGuardLoader;

Enables loading encoded scripts. (default: On) zend_loader.enable=1

5. Add the following line to disable license key check: zend_loader.disable_licensing=0

6. Modify obfuscation level support by adding the following line: zend_loader.obfuscation_level_support=3

7. Set Zend Loader license path: zend_loader.license_path=/etc/php5/apache2/Embarc_private_key.zl

8. Restart your Web server by issuing the following command: service apache2 restart

Zend optimizer is now installed on the server.

Page 13: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

13

Installing Webmin for easy administration of the Server

Webmin is a web-based interface for system administration for Unix. Using any browser that supports tables and forms (and Java for the File Manager module), you can setup user accounts, Apache, DNS, file sharing and so on. Webmin consists of a simple web server, and a number of CGI programs which directly update system files like /etc/inetd.conf and /etc/passwd. The web server and all CGI programs are written in Perl version 5, and use no non-standard Perl modules. Download the Debain Webmin package from http://www.webmin.com/download.html and open it using the Synaptics Package Manager. This will begin the installation of the Webmin package. Once the installation is complete, you can access the Webmin Web Interface on the server using the following URL: https://localhost:10000 Standard modules supported by Webmin 1.780

Name Description

ADSL Client Set up a PPP client with the RP-PPPoE package.

Apache Webserver Configure almost all Apache directives and features.

BIND 4 DNS Server Create and edit domains and DNS records.

BIND DNS Server Create and edit domains, DNS records, BIND options and views.

BSD Firewall Configure a BSD firewall using IPFW, by creating and editing rules.

Backup Configuration Files Perform manual or scheduled backups and restores of configuration files managed by Webmin modules.

Bacula Backup System Configure Bacula to perform backups and restores manually or on schedule, for one or many systems.

Bandwidth Monitoring View reports on bandwidth usage by host, port, protocol and time on a Linux system.

Bootup and Shutdown Setup scripts to be run at boot time from /etc/init.d or /etc/rc.local.

CD Burner Burn data CDs from ISO images or selected directories.

CVS Server Setup a remotely-accessible CVS server, manage users and browse the repository.

Page 14: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

14

Change Language and Theme Allows the current Webmin user to change his language, theme and possibly password.

Change Passwords Change the password of any user on the system.

Cluster Change Passwords Change passwords on multiple systems in a Webmin cluster at once.

Cluster Copy Files Schedule the transfer of files from this server to multiple servers in a Webmin cluster.

Cluster Cron Jobs Create scheduled Cron jobs that run on multiple servers simultaneously.

Cluster Shell Commands Run commands on multiple servers at once.

Cluster Software Packages Install RPMs, debian and solaris packages across multiple servers from one source.

Cluster Usermin Servers Install and manage modules and themes across multiple Usermin servers.

Cluster Users and Groups Create, update and delete users and groups across multiple servers. Unlike NIS, each server has its own passwd and group files which are remotely updated by this module.

Cluster Webmin Servers Install and manage modules, themes, users, groups and access control settings across multiple Webmin servers.

Command Shell Execute shell commands and view their output.

Configuration Engine Configure the CFengine program, for checking and maintaining various system-administration settings.

Custom Commands Create buttons to execute commonly used commands or edit files on your system.

DHCP Server Manage shared networks, subnets, hosts and groups for ISC DHCPD.

Disk Quotas Setup and edit user or group disk quotas for local filesystems.

Disk and Network Filesystems Mount filesystems and swap files usually configured in /etc/fstab or /etc/vfstab.

Dovecot IMAP/POP3 Server Configure the Dovecot IMAP and POP3 mail retrieval server.

Fetchmail Mail Retrieval Configure the popular fetchmail program for automatically retrieving mail from other servers.

File Manager View, edit and change permissions on files and directories on your system with a Windows-like file manager.

Filesystem Backup Backup and restore filesystems using the dump and restore family of commands.

Filter and Forward Mail Create rules to filter and forward incoming email.

Frox FTP Proxy Configure Frox, a transparent proxy for FTP clients.

GRUB Boot Loader Configure the Linux GRUB boot loader to allow the selection of various operating systems and kernels at boot time.

HTTP Tunnel Connect to another HTTP server via a tunnel through the Webmin server.

Heartbeat Monitor Configure the Heartbeat package for automatic server failover in a cluster.

IPFilter Firewall Configure a firewall using the IPFilter package, by creating and editing rules.

IPsec VPN Configuration Set up a client or server for an IPsec VPN using FreeSWAN.

Initial System Bootup Configure low-level services to be run at boot time, and select the initial runlevel.

Page 15: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

15

Jabber IM Server Configure the multi-protocol Jabber messaging server.

Kerberos5 Configure the Kerberos 5 client on your system.

LDAP Client Configure your system as an LDAP client for users and groups.

LDAP Server Manage the OpenLDAP server and objects in its database

LDAP Users and Groups Manage users and groups stored in an LDAP database, used for Unix, Samba and Cyrus IMAP authentication.

Linux Bootup Configuration Edit kernels and partitions selectable at boot time with LILO.

Linux Firewall Configure a Linux firewall using iptables. Allows the editing of all tables, chains, rules and options.

Linux RAID Create RAID 0, 1, 4, 5 and linear devices on a Linux system.

Log File Rotation Set up the automatic rotation of Apache, Squid, Syslog and other log files.

Logical Volume Management Configure volume groups, physical volumes and logical volumes for Linux LVM.

MIME Type Programs Edit the /etc/mailcap file, which maps MIME types to handler programs

MON Service Monitor Setup MON, a powerful service monitor and alerting system.

Majordomo List Manager Create and configure mailing lists for Majordomo.

MySQL Database Server Setup databases, tables and permissions in your MySQL database server.

NFS Exports Edit file shares as defined in the Irix /etc/exports file

NFS Exports Edit NFS file shares defined in /etc/exports.

NFS Exports Edit file shares from the FreeBSD /etc/exports file.

NFS Exports Edit NFS file shares defined in /etc/exports.

NFS Exports Edit file shares as defined in the HPUX /etc/exports file.

NFS Shares Edit file shares as defined in the /etc/dfs/dfstab file.

NIS Client and Server Setup a system as an NIS client, master or slave server. Note that NIS+ is not supported.

Network Configuration Configure boot time and active interfaces, DNS, routing and /etc/hosts.

Network Services Edit servers handled by Xinetd, a replacement for inetd.

Network Services and Protocols Edit services in /etc/inetd.conf, /etc/services and /etc/rpc.

OpenSLP Server Configure the service location protocol server.

PAM Authentication Configure the PAM authentication steps used by services such as telnet, POP and FTP.

PHP Configuration Configure PHP settings for the whole system or invidivual Apache virtual servers.

PPP Dialin Server Set up a dialin server using mgetty and PPP.

PPP Dialup Client Configure the WV-Dial package to connect to the Internet with a modem PPP connection

Page 16: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

16

PPTP VPN Client Configure and establish connections to a VPN server using the PPTP protocol.

PPTP VPN Server Set up your system as a PPTP server so that Linux or Windows VPN clients can connect.

Partitions on Local Disks Create and edit paritions on local disks on Solaris.

Partitions on Local Disks Create and edit paritions on local SCSI and IDE disks on Linux.

Perl Modules Install new Perl modules on your system, and view those already installed.

Postfix Mail Server Configure the Postfix mail server.

PostgreSQL Database Server Manage databases, tables and users in your PostgreSQL database server.

Printer Administration Create and edit local and remote printers. Supports Windows print servers and Ghostscript print drivers.

ProFTPD Server Configure the powerful ProFTPD FTP server. Supports all options in most of the standard modules.

Procmail Mail Filter Edit recipes in the global /etc/procmailrc file, which apply to all incoming email.

Protected Web Directories Create .htaccess and htpasswd files to protect web-acessible directories.

QMail Mail Server Configure the QMail mail server, a simpler alternative to Sendmail.

RBAC and Projects Manage RBAC user attributes, profiles and authorizations.

Read User Mail Read email in users’ mailboxes.

Running Processes List, kill and renice running processes on your system.

SMART Drive Status Check the status of IDE drives to detect problems and potential failures.

SSH Login Login to your system with SSH or telnet.

SSH Server Setup the SSH server for remote secure logins.

SSL Tunnels Setup SSL tunnels to encrypt services like POP3 and IMAP, using stunnel run from inetd.

Samba Windows File Sharing Create and edit samba file and print shares.

Scheduled Commands Schedule the execution of one-off commands or scripts.

Scheduled Cron Jobs Create, edit and delete Cron jobs.

Scheduled Webmin Functions

Define Webmin module functions that are called on a regular schedule by the Webmin webserver

Security Sentries Configure the portsentry, hostsentry and logcheck system security monitoring programs.

Sendmail Mail Server Manage sendmail aliases, masquerading, address rewriting and other features.

Service Management Facility Configuration Edit services under control of Service Manangement Facility SMF(1).

Shorewall Firewall Lets you edit the most useful tables of the Shorewall Firewall

Software Package Updates Displays available package updates from YUM, APT or other update systems

Software Packages Manage software packages on your system, and install new packages.

Page 17: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

17

Solaris Zones Create and manage Solaris 10 zones.

SpamAssassin Mail Filter Set up and configure SpamAssassin to filter email received by your system.

Squid Proxy Server Configure Squid options, ACLs, caching parameters and proxy users.

Squid Report Generator Configure and schedule SARG, a tool for generating reports from Squid access logs.

System Documentation View man pages, HOWTOs and other package documentation.

System Logs Configure the syslog server on your system and view its log files.

System Logs NG Configure the Syslog-NG server on your system and view its log files.

System Status Background system status collection libraries

System Time Set the sytem and hardware time either manually or from a time server.

System and Server Status View the status of services on your system and on remote systems.

TCP Wrappers Configure the TCP wrappers networking access control files

Thirdlane PBX Manager Thirdlane PBX Manager

Upload and Download Upload multiple files to the server, and download multiple URLs either immediately or in the background at a scheduled time.

Usermin Configuration Configure global options for the Usermin user account management server.

Users and Groups Create and edit Unix users and groups from the /etc/passwd and /etc/group files.

Voicemail Server Set up your system as an answering machine using vgetty

WU-FTP Server Configure the access control, anonymous FTP and other options of WU-FTPd.

Webalizer Logfile Analysis Generate reports from webserver, proxy server and FTP log files

Webmin Actions Log View detailed logs of actions by Webmin users.

Webmin Configuration Configure Webmin itself, such as allowed hosts, SSL, installed modules and themes.

Webmin Servers Index Displays an index of other Webmin servers for easy linking.

Webmin Users Create Webmin users and configure which modules and features they are allowed to access.

idmapd daemon Manage the NFS ID mapping daemon.

Page 18: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

18

Additional PHP Modules

Many components of the software make use of additional libraries which doesn’t install when installing the default LAMP Server. Please perform the following additional steps to install the libraries.

1. Click System > Administration > Synaptic Package Manager 2. Type php5 in the Quick filter box 3. Select the following packages

php5 php5-dbg php5-dev php5-common php5-recode php5-ldap php5-pspell php5-snmp php5-curl php5-xsl php5-xmlrpc php5-gmp php5-gd php5-pgsql php5-odbc php5-cli php5-sqlite php5-cgi php5-tidy libapache2-mod-php5 php5-mysql php5-mcrypt php5-curl

4. Type mysql in Quick filter box 5. Select the following packages:

libdbd-mysql-perl libdbi-perl libmysqlclient-dev

Page 19: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

19

libmysqlclient18 librdf0 mysql-client mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 rsyslog libmyodbc libmysql++-dev libmysql++3

6. Click on Apply

Installation Complete

This completes the Operating System installation and required components for the Find’n’Secure Server. In the next chapter we shall be configuring the Server with the required settings and for optimal performance.

Page 20: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

20

C H AP T ER 2

LINUX CONFIGURATION In the previous chapter we have seen how to do a fresh installation over the Server. In this section, will we learn how to configure Linux to maximize throughput. Once your system completes the boot cycle it will come to the login screen, enter username as ‘root’ and your system administrator password and proceed to login. You will see the screen similar to the one shown below: Ubuntu Desktop is pretty intuitive and fairly simple to configure. We will now take you quickly through the steps of configuration. You may configure almost complete Linux from the Webmin Web Interface that you installed.

Firewall Configuration

Firewall is one of the best known defences for the linux systems against hackers and it enhances Operating System security to allow only the known ports to be opened. Ubuntu comes equipped with a firewall system known as ufw. What is UFW? UFW, or Uncomplicated Firewall, is a front-end to iptables. Its main goal is to make managing your firewall drop-dead simple and to provide an easy-to-use interface. It’s well-supported and popular in the Linux community—even installed by default in a lot of distros. As such, it’s a great way to get started for securing your sever. Before We Get Started First, obviously, you want to make sure UFW is installed. It should be installed by default in Ubuntu, but if for some reason it’s not, you can install the package using aptitude or apt-get using the following commands:

Page 21: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

21

sudo aptitude install ufw or sudo apt-get install ufw You can check the status of UFW by typing: sudo ufw status verbose e.g. youruser@yourcomputer:~$ sudo ufw status verbose [sudo] password for youruser: Status: active Logging: on (low) Default: deny (incoming), allow (outgoing) New profiles: skip You must enable the firewall by issuing the following command as default it is disabled: ufw enable When using the Linux firewall we need to enable few ports to allow in-bound traffic on the Server for the following services:

Service Name Port Number

SSH 22

HTTP Server 80

Tracking Devices 21000

VNC Server (If installed) 5901

Webmin (if installed) 10000

Statistics Reporting 9898

Page 22: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

22

Issue the following commands to enable these ports: ufw allow 22 ufw allow 80 ufw allow 21000 ufw allow 10000 ufw allow 5901 ufw allow 9898 This will configure the basic firewall for the Server. If you want more control over the firewall system you can make use of the Webmin interface to create rules.

Disabling Firewall

In case you want to disable to firewall on the Ubuntu Server, you can issue the following command on the Server. ufw disable

Network Configuration

Setting up communication with the internet is the most important aspect of the Server setup. We will make use of the Webmin for performing this setup. Please follow the steps below to configure your network interface.

Page 23: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

23

1. Open up the Web browser (Firefox) and type the following URL: https://localhost:10000 2. Login to the software using your root login 3. Click on Networking > Network Configuration > Network Interfaces > Activated at Boot 4. Select the network interface you wish to configure, generally network interfaces are number from eth0 and lo stands for loop-back interface. 5. If your server is directly connected to the internet then you should configure it according to the configuration provided by your internet provider. Otherwise you can use the LAN settings of your internal network to configure this server. 6. Once you have entered all the parameters, click Save and return to network interfaces > network configuration 7. Configure Routing and Gateways

Page 24: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

24

8. Configure Hostname and DNS Client 9. Click on Apply Configuration

MySQL

MySQL is a Relational Database Management System (RDBMS) and is one of the most important components. All the data arriving from all the tracking units is broken down, analyzed and stored in database as history component from where various types of reports and all previous visited locations and other information is primarily acquired. Setting up MySQL is simple and involves only few steps. If you have not set the MySQL password during the setup you can use the following method to set the new password. Open Terminal from Accessories and issue the following command: mysqladmin -u root password <root password> Example: mysqladmin -u root password embarc The above command will set the password for root access. To check that everything is running fine simply issue “mysql –p” in the terminal. It will ask you for root password which you issued in the command e.g., embarc in this case. After you press enter you will see the Welcome Screen of MySQL, just type “quit” on the prompt to return to terminal prompt.

Page 25: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

25

MySQL Configuration File As MySQL is the most important component of the system it is essential that it performs with ultimate efficiency and must be able to take up higher loads. By default, MySQL is configured to run on the minimum configuration which makes it a low-end engine. So we need to adjust some parameters for performance. MySQL configuration file is present at location /etc/mysql/my.cnf. The listing below is an optimized version of my.cnf file for a Server having 2+ GB RAM. You may find some good examples at http://forge.mysql.com

#---------------------------------------------------------- # # my.cnf file # #---------------------------------------------------------- # See: # # http://dev.mysql.com/doc/refman/5.1/en/server-options.html # http://dev.mysql.com/doc/refman/5.1/en/option-files.html # # You can also dump all the variables set for mysqld with: # # mysqld --verbose --help #

Page 26: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

26

#---------------------------------------------------------------- # Example MySQL config file for very large systems. # # This is for a large system with memory of 1G-2G where the system runs mainly # MySQL. # # You can copy this file to # /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation this directory is /var/lib/mysql) or # ~/.my.cnf to set user-specific options. # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the “--help” option. # The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /var/lib/mysql/mysql.sock # Here follows entries for some specific programs [client] port = 3306 socket = /var/run/mysqld/mysqld.sock

Page 27: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

27

[mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] server-id=12345 log-bin = mysql-bin user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking open_files_limit = 120000 bind-address = 0.0.0.0 key_buffer = 64M max_allowed_packet = 64M thread_stack = 384K thread_cache_size = 16 myisam-recover = BACKUP query_cache_limit = 256M query_cache_size = 256M log_error = /var/log/mysql/error.log expire_logs_days = 10 max_binlog_size = 100M table_cache = 100000 tmp_table_size = 512M max_connections=10000 max_heap_table_size = 512M key_buffer_size = 512M slow_query_log=1 join_buffer_size = 1G table_definition_cache = 100000

Page 28: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

28

default-storage-engine = innodb #big-tables innodb_flush_method=O_DIRECT innodb_doublewrite = 0 innodb_support_xa = 0 innodb_flush_log_at_trx_commit = 2 innodb_checksums = 0 innodb_table_locks = 0 innodb_thread_concurrency = 8 innodb_file_per_table innodb_log_buffer_size = 256M innodb_thread_sleep_delay = 10 #size based on the RAM size it is alom t 50 to 60% of RAM size innodb_buffer_pool_size = 64G innodb_buffer_pool_instances=64 innodb_additional_mem_pool_size = 128M [mysqldump] #quick quote-names max_allowed_packet = 64M [isamchk] key_buffer = 64M !includedir /etc/mysql/conf.d/

Speed Tweak

Page 29: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

29

‘Tweak’ compresses the content of your web server in real time, barring a few formats that will have no or nearly no benefit from it (images and/or already compressed files like a zip) or files that may even become corrupted when compressed further (e.g. the .pdf format). Basically at the cost of a little bit of CPU time, pages will become smaller with the following benefits:

• Faster loading pages • Lower bandwidth costs

For more information, just search for “http compression” keyword in any internet search engine. mod_deflate This module enables http compression over the Apache server. The following process helps in activating mod_deflate on Apache server over Linux : 1. Open your favorite console application (Xterm, Konsole, etc) 2. Execute a2enmod deflate 3. Now open /etc/apache2/httpd.conf in your favorite text editor (gedit, etc) and append the configuration text below: SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \ no-gzip dont-vary SetEnvIfNoCase Request_URI \ \.(?:exe|t?gz|zip|bz2|sit|rar|7z|swf|pdf)$ \ no-gzip dont-vary BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html ExpiresActive On ExpiresDefault A0 # Set up caching on media files for 1 year (forever?) <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> ExpiresDefault A29030400 Header append Cache-Control "public"

Page 30: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

30

</FilesMatch> # Set up caching on media files for 1 week <FilesMatch "\.(gif|jpg|jpeg|png|swf)$"> ExpiresDefault A604800 Header append Cache-Control "public" </FilesMatch> # Set up 2 Hour caching on commonly updated files <FilesMatch "\.(xml|txt|html|js|css)$"> ExpiresDefault A7200 Header append Cache-Control "proxy-revalidate" </FilesMatch> # Force no caching for dynamic files <FilesMatch "\.(php|cgi|pl|htm)$"> ExpiresActive Off Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" Header set Pragma "no-cache" </FilesMatch> 5. Save the file and close it. 6. Restart apache by executing service apache2 restart Confirming it works Visit http://www.weboptimization.com and use their analyze tool to find out that everything is working fine. If your site is using mod_deflate the test will show you the following message: # Congratulations. This site is using HTTP compression, otherwise called content encoding using gzip. The sizes reported here are for compressed content sent from the server to the client.

MySQL Updation

Page 31: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

31

MySQL is one of the most essential components for proper server functionality and therefore its constant up-gradation and maintenance should be done. You may frequently visit http://www.mysql.com to find out the latest server updates and download the fixes and upgraded versions and install it over the server. Software is generally kept up-to-date and latest releases might require latest MySQL libraries to be installed over the server.

MongoDB Installation

1. Import the public key used by the package management system.

The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. Issue the following command to import the MongoDB public GPG Key:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

2. Create a list file for MongoDB.

Create the /etc/apt/sources.list.d/mongodb-org-3.2.list list file using the command appropriate for your version of Ubuntu:

For Ubuntu 14.04

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

Page 32: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

32

3. Reload local package database.

Issue the following command to reload the local package database:

sudo apt-get update

4. Install the MongoDB packages.

You can install either the latest stable version of MongoDB or a specific version of MongoDB.

Install the latest stable version of MongoDB.

Issue the following command:

sudo apt-get install -y mongodb-org

Install a specific release of MongoDB.

To install a specific release, you must specify each component package individually along with the version number, as in the following example:

sudo apt-get install -y mongodb-org=3.2.0 mongodb-org-server=3.2.0 mongodb-org-shell=3.2.0 mongodb-org-mongos=3.2.0 mongodb-org-tools=3.2.0

If you only install mongodb-org=3.2.0 and do not include the component packages, the latest version of each MongoDB package will be installed regardless of what version you specified.

Pin a specific version of MongoDB.

Although you can specify any available version of MongoDB, apt-get will upgrade the packages when a newer version becomes available. To prevent unintended

Page 33: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

33

upgrades, pin the package. To pin the version of MongoDB at the currently installed version, issue the following command sequence:

echo "mongodb-org hold" | sudo dpkg --set-selections

echo "mongodb-org-server hold" | sudo dpkg --set-selections

echo "mongodb-org-shell hold" | sudo dpkg --set-selections

echo "mongodb-org-mongos hold" | sudo dpkg --set-selections

echo "mongodb-org-tools hold" | sudo dpkg --set-selections

Versions of the MongoDB packages before 2.6 use a different repository location. Refer to the version of the documentation appropriate for your MongoDB version.

Run MongoDB

The MongoDB instance stores its data files in /var/lib/mongodb and its log files in /var/log/mongodb by default, and runs using the mongodb user account. You can specify alternate log and data file directories in /etc/mongod.conf. See systemLog.path and storage.dbPath for additional information.

If you change the user that runs the MongoDB process, you must modify the access control rights to the /var/lib/mongodb and /var/log/mongodb directories to give this user access to these directories.

1. Start MongoDB.

Issue the following command to start mongod:

sudo service mongod start

2. Verify that MongoDB has started successfully

Verify that the mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log for a line reading

Page 34: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

34

[initandlisten] waiting for connections on port <port>

where <port> is the port configured in /etc/mongod.conf, 27017 by default.

3. Stop MongoDB.

As needed, you can stop the mongod process by issuing the following command:

sudo service mongod stop

4. Restart MongoDB.

Issue the following command to restart mongod:

sudo service mongod restart

5. Begin using MongoDB.

Later, to stop MongoDB, press Control+C in the terminal where the mongod instance is running.

Uninstall MongoDB

1. Stop MongoDB.

Stop the mongod process by issuing the following command:

sudo service mongod stop

2. Remove Packages.

Page 35: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

35

Remove any MongoDB packages that you had previously installed.

sudo apt-get purge mongodb-org*

3. Remove Data Directories.

Remove MongoDB databases and log files.

sudo rm -r /var/log/mongodb

sudo rm -r /var/lib/mongodb

Page 36: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

C H AP T ER 3

SOFTWARE INSTALLATION

Since you have installed and configured Linux, we now take you through the steps required for software installation. It is pretty straight forward to install the software and prepare it for execution. The following steps will guide you to perform software installation —

1. Copy the provided software installation file in the folder

“/root/Installation”.

2. Extract the contents of the file in the folder using the following command

“tar -xf fnsv5_installation_bundle.tar.gz”.

3. Open the terminal window and give execution permission to file by

following command:

“chmod +x fnsv5_install”

4. Open the terminal window and execute the following command:

“./fsnv5_install”

This file contains the following script:

#!/bin/bash echo "Renaming original www to www_old" mv /var/www /var/www_old echo "Copying www to /var/www" cp -R www /var/www echo "Copying findnsecure to /root/findnsecure" cp -R findnsecure /root/findnsecure echo "Copying libmongoclient.so to /usr/lib" cp /root/findnsecure/libmongoclient.so /usr/lib echo "Copying Zend Guard Loader files to /etc/php5" cp zend_loader_files/ZendGuardLoader.so /etc/php5 echo "Appending extension of ZendGuardLoader.so to php.ini" echo "zend_extension=/etc/php5/ZendGuardLoader.so" >> /etc/php5/apache2/php.ini echo "zend_extension=/etc/php5/ZendGuardLoader.so" >> /etc/php5/cli/php.ini

Page 37: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

37

echo "Copying opcache file to /etc/php5" cp zend_loader_files/opcache.so /etc/php5 echo "Appending extension of opcache.so to php.ini" echo "zend_extension=/etc/php5/opcache.so" >> /etc/php5/apache2/php.ini echo "zend_extension=/etc/php5/opcache.so" >> /etc/php5/cli/php.ini echo "Restarting apache webserver" sudo service apache2 restart echo "Performing modifications in MySQL database for Version 5.0" #prompt for mysql username and password dbname="" username="" password="" echo -n "Please enter MySQL database name: " read dbname #if database name is not entered, assume fnsv5 if [ "$dbname" = "" ]; then dbname="fnsv5" echo "No database name provided, assuming name fnsv5." fi echo "" echo -n "Please enter MySQL username:" read username #if username is not entered, assume root if [ "$username" = "" ]; then username="root" echo "No username provided, assuming user root." fi echo "" echo -n "Please enter MySQL password:" #reading password in silent mode, so that password characters are not echoed back on screen read -s password echo "" #no check for password supplied is available yet $(mysql -u"$username" -p"$password" "$dbname" < db_modifications.sql)

Page 38: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

38

echo "Databases modified for Version 5.0." echo "Making entry of file fns.conf in /etc/ld.so.conf.d" echo "/root/findnsecure" > /etc/ld.so.conf.d/fns.conf echo "Configuring dynamic linker run-time bindings" ldconfig -v echo "Installing libboost-all-dev" sudo apt-get -y install libboost-all-dev echo "Installing php5-curl php5-mcrypt" sudo apt-get -y install php5-curl php5-mcrypt echo "Enabling php5 modules" php5enmod curl php5enmod mcrypt echo "Restarting apache webserver" service apache2 restart mkdir /var/fnslogs chmod -R 777 /var/fnslogs mkdir /var/fnsbackup chmod -R 777 /var/fnsbackup

5. Installation requires Find’n’Secure® Username and Password which is

provided along with the package.

6. Enter your Find’n’Secure® Username

7. Enter your Find’n’Secure® Password

8. Enter the password for root user of your MySQL server

9. Installation will prompt you to remove the old database present in the

system. If you input ‘yes’ then all your previous data is removed from the

database. Please note that you should take a backup of the old database if

you are performing repair job.

Software installation is now complete. To check the software installation open up

Firefox browser and put the following address in the address bar of the browser

window – http://127.0.0.1

Page 39: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

39

Before proceeding further, you must login to the software as an super-user for performing some essential steps required for running the software correctly. Default username for super-user login is “root” and default password for the account is “root”. After the login, you will see the following screen.

Click on the Settings panel on the left hand side next to dashboard panel and the following screen will appear:

Page 40: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

40

USER SETTINGS You can select Default Language, Default Time-zone, Time, Currency, country, & Metric System in which the software will work by default. All the users logging into the software will have these preferences set as default.

Also there is functionality to change the password nest to the user interface settings from where you can reset your password.

MAP SETTINGS Find’n’Secure® Version 5.0 supports Google® Maps in addition to many others. You may set default parameters that are loaded up whenever a user logs in the software. The following table describes different options available:

Default Latitude & Longitude

Default center location for map service, for example:

Latitude: +28.004102 Longitude: +77.684326

Whenever map is loaded on the browser window it will automatically set the display center to this Latitude/Longitude

Page 41: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

41

Google® Key Google® Maps API key provided by Google® for your domain

Google Client ID Client ID provided by Google® to its Google Maps API for Business customers.

Digital Signature A digital signature is used only by Google Maps API for Business customers. This field is actually the cryptographic key provided by Google.

Bing Key If you wish to use Bing Maps, please enter the Bing Maps key, provided by Microsoft. The procedure to get a Bing Maps key is explained later in this section.

Cloudmate Key If you need to use Cloudmate Maps with Find’n’Secure, you should enter a Cloudmate API key.

Zoom level Default Zoom level to which map service will be set is defined by this option

Refresh Interval Servers constantly get packets from the tracking units. This option controls how fast browsers shall fetch new locations from the server.

Server key Here you can set the server key.

Here map appid and appcode

It will be provided by the here maps service provider for your domain

Your domain administrator should create and forward a sub-domain to your server IP address, for example:

Domain Name : www.findnsecure.com IP Address : 67.222.62.165

New sub-domain : track.findnsecure.com IP Address : 71.19.240.175

Page 42: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

42

Find’n’Secure loads Google Maps using an API key. Using an API key enables you to monitor your application's Maps API usage, and ensures that Google can contact you about your application if necessary. If your application's Maps API usage exceeds the Usage Limits, you must load the Maps API using an API key in order to purchase additional quota.

To create your Google API key:

1. Visit the APIs Console at https://code.google.com/apis/console and log in with your Google Account.

2. Click the Services link from the left-hand menu. 3. Activate the Google Maps API v3 service. 4. Click the API Access link from the left-hand menu. Your API key is

available from the API Access page, in the Simple API Access section. Find’n’Secure uses the Key for browser apps.

https://code.google.com/apis/console To create your Bing API key:

i. Go to the Bing Maps Account Center at https://www.bingmapsportal.com.

ii. If you have a Bing Maps Account, sign in with the Windows Live ID that you used to create the account.

iii. If you do not have a Bing Maps Account, click Create, and follow the instructions in Creating a Bing Maps Account.

1. Select Create or view keys under My Account. 2. In the Create key box on the My keys page, provide the following

information for Find’n’Secure application that will use the Bing Maps key: i. Application name: Required. The name of the application, i.e.

Find’n’Secure ii. Application URL: The URL of the application.

iii. Key type: Required. Select the key type as “Basic”. The key and application types you choose determine your usage limits. For more information, see the Bing Maps Terms of Use.

iv. Application type: Required. Select “Public website” as the application type.

3. Type the characters of the security code, and then click Submit. The new key displays in the list of available keys. Use this key to authenticate your Bing Maps application as described in the documentation for the Bing Maps API you are using.

Page 43: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

43

Note: If you want to upgrade your account to be an enterprise account, contact Bing Maps for Enterprise. To create your Cloudmate API key:

1. Login/Register on Cloudmate Account portal at http://account.cloudmade.com/signin.

2. Click on the button labeled “GET API KEY”, under API Keys section. 3. In the modal box displayed, provide the following information for

Find’n’Secure application: i. Platform: Required. Choose “Web” ii. Application Name: Required. The name of the application, i.e.

Find’n’Secure iii. Application URL: The URL of the application. iv. Promote My App: Optional. Uncheck this box.

4. Click on the “Register” button. 5. You’ll get the API key in a few seconds.

To create your here maps appid and appcode key:

1. Login/Register on here maps Account portal at http://account.here.com/sign-in.

2. Choose your suitable package among evaluation, starter, standard, advanced.

3. In the page displayed, provide the following information for Find’n’Secure application:

i. Application Name: The name of the application, i.e. Find’n’Secure ii. First name

iii. Last name iv. Country v. Company Name: Name of the company

vi. Phone no. vii. Checkbox: I agree to the terms and conditions

4. Click on the “Register new application” button. 5. You’ll get the app code and app id in a few seconds.

SMTP SETTINGS Simple Mail Transfer Protocol (SMTP) Server is used for sending emails from the software to users and administrator. If SMTP is not properly setup then you will not receive any mail alerts from the software. If you don’t have a SMTP server,

Page 44: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

44

Find’n’Secure® version 5.0 allows you to use Gmail if the sending-load is not very high. If you are using the software for providing commercial service we recommend you to use a paid SMTP server or setup your own SMTP server, whichever you prefer.

SMTP Server Server address for the SMTP server. For example: smtp.gmail.com (Gmail SMTP server).

SMTP Port Port number on which the server SMTP service is being hosted. Default SMTP port is 25.

Authenticate SMTP If SMTP server requires authentication then this option must be checked.

SMTP Username Username to be used for logging into SMTP server.

SMTP Password Password to be used for logging into SMTP Server.

Use SSL Check this option if SMTP server requires Secure Sockets Layer (SSL) Authentication. It is more secure to use SSL Authenticated email system since the communication channel is encrypted.

Administrator Email Please type in the administrator email address here on which all the important notifications from the software are required to be transferred.

UNDERSTANDING CONFIGURATION FILE (CONFIG.SYS) Server administrators may need to fine tune the system or change certain parameters as per server hardware or network connectivity. In this section we will have a look at the config.sys file which allows you to perform these operations. Lines starting with # sign are comments and you should be very careful in editing config.sys file as even a small error might lead to complete service halt.

Property Value

UDPServerName Hosting IP address of the UDP service. If you have multiple interfaces installed over the server than you might need to select the interface on which UDP service will be hosted. The default value of this property is 0.0.0.0 which means UDP service will be started on all the interfaces.

Page 45: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

45

Default: 0.0.0.0

UDPServerPort UDP port number on which service is to be hosted.

By default 21000 is used by the software and this port is required to be forwarded by your router/firewall to this server. All the communication via tracking unit is performed through this port when UDP protocol is working in the tracking unit.

Default: 21000

TCPServerName This property allows you to start TCP server for communication with the tracking units. This is equivalent to the UDPServerName and has similar default value.

Default: 0.0.0.0

TCPServerPort TCP port number on which service is to be hosted.

By default 21000 is used by the software and this port is required to be forwarded by your router/firewall to this server. All the communication via tracking unit is performed through this port when TCP protocol is working in the tracking unit.

Default: 21000

FilterIP For internal use of the software.

Default: 0.0.0.0

FilterPort For internal use of the software.

Default: 21001

UDPSendIP UDP sending server is started on this IP address for performing communication with the tracking units.

Page 46: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

46

Default: 0.0.0.0

UDPSendPort UDP sending server port number on which service is to be hosted.

Default: 23000

UDPforTCP_OPSServerName For internal use of the software.

Default: 0.0.0.0

UDPforTCP_OPSServerPort For internal use of the software.

Default: 23001

UDPPacketSize For internal use of the software.

Default: 1500

FilterPacketSize For internal use of the software.

Default: 1600

ServerReceiveBuffer For internal use of the software.

Default: 1026576

ServerSendBuffer For internal use of the software.

Default: 1026576

MinSendTime For internal use of the software.

Default: 0

MailerCommand Software has a daemon process which constantly keeps on checking for the new alerts/events happening on the server. These alerts/events are processed by a mailer script which is by default written in PHP 5.0. If you need to modify this behavior of the system you can insert your own script and place the right command here to process accordingly.

Default: “cd /var/www/php; php Services/mailer.php"

Page 47: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

47

NumberOfTriggers

Number of triggers configured over the server to be received by UDP server. As described below under the properties Trigger[x]Name, Trigger[x]Event, Trigger[x]Offset, you can configure various triggers in the software to be executed when this command is received by UDP Server.

It may be used along with any 3rd party software to allow the expansion of the communication protocol. We will demonstrate the process with the help of a small illustration after this table.

Default: 9

Trigger[x]Name Represents the name of the Trigger which is to be sent to the UDP server to execute the trigger, for example – locate

x represents number value from 1 – NumberOfTriggers

Default: “locate”

Trigger[x]Event Represents the script execution path of the Trigger which is executed on receiving of the trigger.

Default: "php /srv/www/cgi-bin/locate.php"

Trigger[x]Offset = 0 Represents the offset of the command where server should search whenever a string is received by UDP server.

Default: 0

BanUser[x] This property is used for banning one or more IP address, for example

BanUser[1] = “67.23.44.51”

BanUser[2] = “67.23.44.55”

Page 48: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

48

Will add two IP address to the ban list and server will drop all the packets received from these IP addresses.

DeviceName To open COM1 on the server enter ‘/dev/ttyS0’

Default: "/dev/ttyS0"

DeviceBaud Default: 115200

DeviceInitialize Default: “AT E0 I0”

DeviceParity Default: "NONE"

TerminalIP Default: 0.0.0.0

TerminalPort Default: 22000

DatabaseRefreshTimer This property is used for setting up the performance for processing the data received by the server from the tracking unit. The value is in seconds.

Default: “1”

GeofenceRefreshTimer Time gap after which Geofence server checks for geofence related functions. This property is in seconds.

Default: “1”

MailerRefreshTimer Time gap after which mailer server fetches new alerts/events. This property is in seconds.

Default: “1”

DBFServername Database server name or IP address. This is the address of your MySQL server, if you are hosting the database server on the application server itself then the value of this property will be “localhost” otherwise you can set it appropriately. For example, if a server with local IP 192.168.1.10 is hosting MySQL

Page 49: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

49

service then we may use the following settings —

DBFServername = “192.168.1.10”

Default: “localhost”

DBFUsername Username through which the connections to the database server is established. Generally we connect to the database by using “root” username

Default: “root”

DBFDatabase Database name to be used by findnsecure applications. MySQL can be used by multiple softwares running over your server and each software may have its own database. Similarly Find’n’Secure® version 3.0 has its own database by default it is named as “fnsv2”. If you want to change the name of the Database file, you may modify accordingly.

Default: “fnsv5”

DBFPassword Password required for connecting to the database server related to the DBFUsername.

Default: “embarc”

LicenseUsername Find’n’Secure® license username provided by the company (i.e. Embarc Information Technology Pvt Ltd.)

Default: <Provided by Embarc>

Page 50: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

50

LicensePassword Find’n’Secure® license password provided by the company (i.e. Embarc Information Technology Pvt Ltd.)

Default: <Provided by Embarc>

ProjectName Find’n’Secure® project name provided by the company (i.e. Embarc Information Technology Pvt Ltd.)

Default: default

sat_email_server Enter the server details used for receiving mails of satellite tracking devices.

Format: “<POP server>:<PORT>”

Default: “pop.gmail.com:995”

sat_email_username Username of email ID used for receiving mails of satellite tracking devices.

Default: “”

sat_email_password Password of email ID used for receiving mails of satellite tracking devices.

Default: “”

sat_email_ssl Indicates whether the sat_email_server uses SSL or not.

Accepted Values: yes/no

Default: “yes”

sat_fetch_interval Mail fetch interval for satellite tracking devices. (in minutes)

Default: “2”

Page 51: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

51

PHPPath Enter the path of PHP files used in operations of Alert Centre.

Default: “/var/www/php”

ATRXMailPath Path of mail templates for Alert Centre.

Default: "Services/ATRXMail.php"

rdEnable Enable or disable saving of raw data from tracking devices.

Accepted Values: true/false

Default: “true”

rdServer Hostname of database server, where raw data should be sent.

Default: “localhost”

rdDatabase Name of database in which raw data should be stored.

Default: “fnsraw”

rdDBFUser Username for connecting to raw database.

Default: “root”

rdDBFPass Password for connecting to raw database.

Default: “embarc”

SETTING UP TRIGGERS Find’n’Secure® version 5.0 supports an important facility to perform operations in conjunction with 3rd Party software which are capable of passing URL with parameters (in GET request format) or directly connecting with the software backend and pass triggers using network. This provides exceptional facility of extending software capabilities with customized applications designed over the base platform

Page 52: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

52

of Find’n’Secure. The illustration below shows the communication channel and the flow of process.

Find’n’Secure® config.sys file allows you to expand the triggers as mentioned in the previous topic. You can develop PHP scripts which may be placed in your own folder for execution. Let us show you a custom trigger example using Apache web server.

Create a new folder by name customeevents in /srv/www/cgi-bin Create a new file by name test.php in /srv/www/cgi-bin/customevents. Source code for this test script is shown below.

<?php

/*

©Find’n’Secure® 2015

URL sent to apache is in the following format:

Page 53: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

53

http://track.findnsecure.com/cgi-bin/customevents/test.php?tid=12345&pass=test

Parameters :

tid = Tracker ID

pass = Password of the user account associated with the tracker ID

Objective:

This program takes in the tracker ID and prints out the username. You can make use of Apache URL calling to perform inquiry.

*/

require_once(“../mysql.php”)

function dberror($emsg)

{

print $emsg;

die;

}

$db = mysql_connect(“localhost”,”user”,”pass”,1);

mysql_select_db(“fnsv2”) or dberror(“database error”);

$query = “SELECT * FROM trackers where trackerid=\””.$_GET[‘tid’].”\””;

$result = mysql_query($query,$db);

Page 54: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

54

if ($result == false) dberror(“query error”);

$row = mysql_fetch_assoc($result);

if ($row != false)

{

if ($row[‘password’] == $_GET[‘pass’])

print “username associated is “.$row[‘username’];

}

mysql_free_result($result);

return 0;

?>

FINAL STEPS Restart the server once you have successfully installed the software.

MANUAL STARTUP

linux > cd /root/findnsecure

linux > sh start.sh

AUTOMATIC STARTUP In case you want to enable the software services automatically after server bootup, please enable the findnsecure service from the Webmin

1. Open Firefox browser on the server and type the following URL: https://localhost:10000

Page 55: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

Find’n’Secure® Version 5.0 Instruction Manual

55

2. Click on System > Bootup and Shutdown

3. Click on findnsecure service

4. Click on Yes infront of Start at boot time ?

5. Click Save > Logout

Find’n’Secure® software will now automatically start whenever your server boots up.

SUMMARY We have covered all the topics required for setting up the server and this chapter completes the configuration and installation of your server. After following the steps explained in the preceding paragraphs, your server should be running and ready to add new user accounts and trackers to the software which we shall show you in the subsequent sections. In case you face any trouble with Linux you can use the following references to solve the issues:

§ Linux Administration Handbook (Pearson Education) by Nemeth, Snyder and Hein

§ http://ubuntu.com

Page 56: Embarc Information Technology (P vt) Ltd. · • PHP 5.5+ • Zend Guard 7.0+ Follow the following steps to install on Ubuntu Server: 1. Extract the Zend Loader package. 2. Locate

56

§ Email your queries to [email protected] § Bible - Red Hat Linux (Wiley)