Skip to content
Ycarus edited this page Oct 2, 2017 · 21 revisions

Install using Apache and MariaDB

Install git, mariadb, apache and PHP with needed modules:

apt-get install git mariadb-server apache2 php5 php5-curl php5-mysql php5-gd php-pclzip

Get FlightAirMap from git:

cd /var/www
git clone --recursive --depth=1 http://github.com/ysurac/flightairmap

Edit Apache conf /etc/apache2/site-available/000-default.conf, add this in VirtualHost section:

DocumentRoot "/var/www/flightairmap"
<Directory /var/www/flightairmap>
   Options +Indexes +FollowSymLinks -MultiViews
   AllowOverride All
   Order allow,deny
   Allow from all
</Directory>

Enable mod rewrite:

a2enmod rewrite

Restart apache2:

/etc/init.d/apache2 restart

Fix permissions:

chmod 666 require/settings.php
chmod 777 install/tmp 
chmod 666 data

Create database and user:

mysql -u root -p
update mysql.user set password=password('YOUR_DB_PASSWORD') where user='root';

Then:

CREATE DATABASE `flightairmap`; 
GRANT ALL ON `flightairmap`.* TO 'youruser'@'localhost' IDENTIFIED BY 'yourpass';
FLUSH PRIVILEGES;

Now use your browser to go to http://127.0.0.1/install/ (or ip of your server) Run scripts/update_db.php in a shell.

Add FlightAirMap service:

cp /var/www/flightairmap/install/init/flightairmap.service.systemd /etc/systemd/system/flightairmap.service

Alter paths to match your path:

nano /etc/systemd/system/flightairmap.service
chmod 644 /etc/systemd/system/flightairmap.service

Install using Lighttpd and MariaDB

Update and install needed packages:

sudo -s
apt-get update
apt-get upgrade
apt-get install lighttpd php7.0-common php7.0-cgi php7.0-mysql php7.0-curl php7.0 php7.0-xml php7.0-zip php7.0-gd php7.0-json mysql-server mysql-client

Create MySQL root password:

mysql -u root -p (leave password empty)
update mysql.user set password=password('YOUR_DB_PASSWORD') where user='root';
flush privileges;
ctrl + z

Enable lighttpd modules:

lighty-enable-mod dump1090
lighty-enable-mod fastcgi
lighty-enable-mod fastcgi-php
service lighttpd force-reload

Install FlightAirMap:

cd /var/www
git clone --recursive --depth=1 http://github.com/ysurac/flightairmap
chmod 666 flightairmap/require/settings.php
chmod 777 flightairmap/install/tmp
chmod 666 flightairmap/data
chmod 666 flightairmap/images/airlines
ln -s /var/www/flightairmap/install/89-flightairmap-lighttpd.conf /etc/lighttpd/conf-available/

Alter paths to match your path:

nano /etc/lighttpd/conf-available/89-flightairmap-lighttpd.conf

Enable FlightAirMap module:

lighty-enable-mod flightairmap-lighttpd
/etc/init.d/lighttpd force-reload

Add FlightAirMap service:

cp /var/www/flightairmap/install/init/flightairmap.service.systemd /etc/systemd/system/flightairmap.service

Alter paths to match your path:

nano /etc/systemd/system/flightairmap.service
chmod 644 /etc/systemd/system/flightairmap.service

Now use your browser to go to http://127.0.0.1/flightairmap/install/ (or ip of your server)

Run scripts/update_db.php in a shell. Then you can run flightairmap daemon:

systemctl enable flightairmap.service
Clone this wiki locally