SR-Navigator Panel Installation on a Server
A quick installation guide for a home server or a provider’s VPS.
Configuring an Ubuntu server for SR-Navigator
1. Install Ubuntu Server
Download the distribution
Create a bootable USB drive
Install Ubuntu Server 18.
2. Install LAMP
Install Apache2
sudo apt update && sudo apt install apache2
Install MySQL
sudo apt update && sudo apt install mysql-server
Install PHP
sudo apt update && sudo apt install php libapache2-mod-php php-mysql
Enable PHP short open tags
find /etc/php -type f -print0 | xargs -0 sed -i 's/short_open_tag = Off/short_open_tag = On/g'
Install PHP module
sudo apt -y install php-mbstring
Restart Apache
/etc/init.d/apache2 restart
apache2ctl restart
Install phpMyAdmin (optional)
sudo apt -y install phpmyadmin
If phpMyAdmin doesn’t open, append this line to the end of /etc/apache2/apache2.conf
include /etc/phpmyadmin/apache.conf
Restart Apache
/etc/init.d/apache2 restart
3. Install SR-Navigator
Install Git
sudo apt install git
Create the project directory and switch to it, for example:
mkdir /var/www/html
cd /var/www/html
Initialize Git
git init
Add the remote repository
git remote add origin https://github.com/simroulette/sr-navigator.git
Download SR-Navigator with
git pull https://github.com/simroulette/sr-navigator.git master
Set directory permissions
chmod -R 767 /var/www/html
Enter MySQL console with your password
mysql -u root -p
Create the database
CREATE DATABASE sr;
Create a user for it
CREATE USER 'sr'@'localhost' IDENTIFIED BY '_your_password_';
Grant the user privileges on the database
GRANT ALL PRIVILEGES ON *.* TO 'sr'@'localhost';
Flush privileges
FLUSH PRIVILEGES;
Exit MySQL
quit
Set SQL mode TRADITIONAL in the MySQL configuration file; otherwise the panel may not work correctly
echo 'sql_mode = TRADITIONAL' >> /etc/mysql/mysql.conf.d/mysqld.cnf
Restart MySQL
service mysql restart
Later: if saving data to the DB does not work, change the SQL mode to NO_ENGINE_SUBSTITUTION in /etc/mysql/mysql.conf.d/mysqld.cnf
sql_mode = NO_ENGINE_SUBSTITUTION
Restart MySQL
service mysql restart
Open your server address in a browser and install SR-Navigator using:
Host: localhost
Username: sr
Password: _your_password_
Database Name: sr
Important! Be sure to copy the contents of the field “Path to the script directory on the server”.
Prepare CRON entries — replace _path_to_SR_navigator_folder_ with the value you copied in the previous step (see above).
Enter the following in the terminal one by one:
echo "* * * * * /usr/bin/php _path_to_SR_navigator_folder_/cron.php > _path_to_SR_navigator_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_SR_navigator_folder_/cron.php 10 > _path_to_SR_navigator_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_SR_navigator_folder_/cron.php 20 > _path_to_SR_navigator_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_SR_navigator_folder_/cron.php 30 > _path_to_SR_navigator_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_SR_navigator_folder_/cron.php 40 > _path_to_SR_navigator_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
echo "* * * * * /usr/bin/php _path_to_SR_navigator_folder_/cron.php 50 > _path_to_SR_navigator_folder_/logs/cron.log" >> /var/spool/cron/crontabs/root
Restart CRON
sudo /etc/init.d/cron restart