Skip to content

Installation without Docker

Znerox edited this page May 9, 2020 · 2 revisions

Requirements

A web server (like Apache) with PHP and MySQL

I have tested this on Debian.

The following packages are required for full functionality: php, mysql-server, php-mysql, php-curl

Google made changes in 2018, requiring an API key, even if you are well under the free limit for traffic.
Get API Key.
Paste the API key in ../wifimap/js/API_key.js

File structure and permissions:

Place the "wifimap" folder on your web server, and make it available for the users of the map (e.g. make it public if you want public access to the map). The "tools" folder include various tools that are used to import data and update the database as needed. Place the "tools" folder on your web server, and set up web server permissions so only those who need to administer the database can access it.

Create a folder named "uploads" in "../tools/php" and make sure the user running the web server have necessary permission to the "../tools/php/uploads" folder. You can set "777"( full access for every user on the system) to make sure this is not giving you any problems. Note that currently all files uploaded (imported) are being stored forever, or until overwritten by another file with the same name.

Database:

It's strongly recommended to create a new user with access only to the "wifimap" database. There are a total number of 5 files named "dbinfo.php" where you need to enter the credentials for the MySQL user. They are located in:

  1. ../tools/php/
  2. ../wifimap/php
  3. ../wifimap/bluetooth/php
  4. ../wifimap/location/php
  5. ../wifimap/clients/php

The following information might be outdated

To support uploading big files, and running scripts for a long period of time, change these settings in php.ini Example from Debian with Apache web server

in the file: /etc/php/7.0/apache2/php.ini

Find these lines:

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M

Change to: upload_max_filesize = 100M

Find these lines:

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 8M

Change to: post_max_size = 100M

Find these lines:

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30

Change to: max_execution_time = -1

Find these lines:

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60

Change to: max_input_time = -1

Find these lines:

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; http://php.net/session.gc-maxlifetime
session.gc_maxlifetime = 1440

Change to: session.gc_maxlifetime = 21600