adsb-receiver
adsb-receiver copied to clipboard
Add data storage choices.
Add the ability to use the following data storage solutions. Except for XML all these should be possible through the use of PDO. However attention to compatibility will be needed when it comes to the SQL statements used.
- [X] XML
- [X] MySQL
- [] MariaDB
- [ ] PostgreSQL (Stuck on dealing with Booleans...)
- [ ] Microsoft SQL Server (May be pushed off until the next release...)
- [X] SQLite
XML, SQLite, and MySQL data storage support has been tested and is ready for final QA. Those wishing to test either XML, SQLite, and/or MySQL are welcome to do so at this time. Any feedback pertaining to these database types is welcome. Work adding support for the other database types is still being worked on. Contributions towards making those not checked in the list above work as always is welcome.
Notes on upgrading to the final release for testers and early adopters.
Upgrading from this development branch to the final release should not result in lost data. However if changes to the database are needed I will be sure to supply queries which can be run in order to keep any existing data from testing.
All upgrade procedures will be handled by the installer in all future releases after this one is made final.
Getting and installing the latest development version.
Run the following commands to download the latest 2.0.0 development files to a fresh installation.
sudo apt-get update
sudo apt-get install git
git clone https://github.com/jprochazka/adsb-receiver.git
cd ~/adsb-receiver
git checkout 2.0.0
chmod +x install.sh
./install.sh
To upgrade an existing installation...
cd ~/adsb-receiver
git fetch --all
git checkout 2.0.0
./install.sh
Set permissions. (This will be handled by the scripts before release.)
sudo chmod 777 /var/www/html/data
sudo chmod 666 /var/www/html/data/*.xml
sudo chmod 666 /var/www/html/classes/settings.class.php
SQLite Install the needed SQLite packages.
sudo apt-get install sqlite php5-sqlite
The database file will be created automatically so no further steps are needed before running the portal installer. Skip to "Setting Up the Portal" to complete the installation.
MySQL
Install the needed MySQL packages.
sudo apt-get install mysql-server mysql-client php5-mysql
Create MySQL database: (only if testing MySQL)
mysql -u root -p
Supply the root password you set for MySQL.
CREATE DATABASE <DATABASE_NAME>;
CREATE USER '<DATABASE_USER>'@'localhost' IDENTIFIED BY '<DATABASE_PASSWORD>';
GRANT ALL PRIVILEGES ON * . * TO '<DATABASE_USER>'@'localhost';
exit
Setting Up the Portal
Go to http://[IP_ADDRESS_OF_YOUR_RECEIVER]/admin/install.php after installing the portal using the bash scripts then fill out the information requested by the installation wizard.
Keep in mind only the XML and MySQL data storage options are tested and ready at this time.
PostgreSQL and Microsoft SQL Server support will be added at a later date in order to get a proper release out sooner.
Is it possible to support mariadb10? I just tried to install it and recognized that my whole mariadb10 setup was broken after the installation and I was not able to login mysql5.7 for some reasons.
@dxmekch Can you give me more information on your setup such as the operating system you are using as well as it's version. Even though you are not able to log into the database server is flight data being saved to the database?
It has been my experience on Ubuntu, not sure about Debian, that by default MariaDB does not set a root password during install due to the fact it uses the auth_socket plugin instead of the mysql_native_password plugin. Try logging into the database server without specifying a password.
sudo mysql -u root
If you are able to log into the database server using the above command you can switch to the mysql_native_password plugin by running the following query.
UPDATE mysql.user SET plugin = 'mysql_native_password', Password = PASSWORD('REPLACE_WITH_A_NEW_PASSWORD') WHERE User = 'root';
@jprochazka I'm running Ubuntu 18.04 LTS on my server. For the fact of MariaDB I'm aware that a passwordless login with root is possible. But for the fact that adsbreceiver uninstalls mariadb and I have to prompt the root password in the shell script, it did not work out. I then tried to install it with sqlite but somehow there was no record after a few hours and I uninstalled it.
Is it possible to let the install script choose which mysql package should be used? I think a decision between mariadb and mysql5.7 should be sufficient for most users.
I see what you are saying. I added MariaDB to be added as an option to the list. I am in the process of writing the scripts to implement many script related feature requests over the past couple weeks. I have not got to the portal portion yet but when I do I will add the option.