This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
getting_started:12_install_pi_nginx [2023/11/02 21:52] admin [Disable strict mode] |
getting_started:12_install_pi_nginx [2023/11/03 00:34] (current) admin [The Database] |
||
|---|---|---|---|
| Line 189: | Line 189: | ||
| sudo mkdir -p / | sudo mkdir -p / | ||
| sudo mkdir -p / | sudo mkdir -p / | ||
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| - | sudo chown -R www-data. / | + | sudo chown -R www-data: / |
| </ | </ | ||
| + | ==== The Database ==== | ||
| + | * Make sure the timezone on the server is set to UTC (You can use **sudo raspi-config**) | ||
| + | * Populate the timezone data on the DB | ||
| + | <code bash> | ||
| + | #NOTE FAILING THIS STEP will break the RADIUS graphs | ||
| + | #There might be some error messages in the output which is fine - no need to be alarmed | ||
| + | sudo su | ||
| + | mysql_tzinfo_to_sql / | ||
| + | </ | ||
| + | * Create an empty database called rd | ||
| + | <code bash> | ||
| + | sudo su | ||
| + | mysql -u root | ||
| + | create database rd; | ||
| + | GRANT ALL PRIVILEGES ON rd.* to ' | ||
| + | GRANT ALL PRIVILEGES ON rd.* to ' | ||
| + | exit; | ||
| + | </ | ||
| + | * Populate the database: | ||
| + | <code bash> | ||
| + | sudo mysql -u root rd < / | ||
| + | </ | ||
| + | <WRAP center round tip 90%> | ||
| + | * RADIUSdesk is under active development and sometimes we add SQL patches. | ||
| + | * The SQL Patches are located under **/ | ||
| + | * These patches are non-destructive and you can run them against the database | ||
| + | * See the pattern below | ||
| + | <code bash> | ||
| + | sudo mysql -u root rd < / | ||
| + | </ | ||
| + | </ | ||
| + | ==== Configure Nginx ==== | ||
| + | * Configure Nginx to rewrite some RdCore URLs starting with /// | ||
| + | * Edit /// | ||
| + | <code bash> | ||
| + | sudo vi / | ||
| + | </ | ||
| + | * Add this once section directly below **server_name** item. (This is so that this rule is hit first for the reporting side. We do not use CakePHP for the reporting anymore due to performance issues. | ||
| + | <code bash> | ||
| + | server_name _; | ||
| + | location / | ||
| + | try_files $uri $uri/ / | ||
| + | } | ||
| + | </ | ||
| + | * If you need backward compatibility support (MESHdesk and APdesk) also add this section: | ||
| + | <code bash> | ||
| + | location / | ||
| + | try_files $uri $uri/ / | ||
| + | } | ||
| + | </ | ||
| + | * Add the following configuration block inside the server section (This you can add towards the end): | ||
| + | <code bash> | ||
| + | location / | ||
| + | | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | * If you need backward compatibility support (MESHdesk and APdesk) also add this section: | ||
| + | <code bash> | ||
| + | location / | ||
| + | | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | * Reload the Nginx: | ||
| + | <code bash> | ||
| + | sudo systemctl reload nginx | ||
| + | </ | ||
| + | ==== Important URLs ==== | ||
| + | * The following URLs are important to reach the UI | ||
| + | * To load the optimized UI, go to http:// | ||
| + | * If you want to serve the content directly out of the webroot, do the following: | ||
| + | <code bash> | ||
| + | sudo cp -R / | ||
| + | </ | ||
| + | * To load the RD Mobile UI, go to http:// | ||
| + | === Login Credentials === | ||
| + | * By default you can log in with the following credentials | ||
| + | Username: **root** Password: **admin** | ||
| + | ===== Cron Scripts ===== | ||
| + | * RADIUSdesk requires a few scripts to run periodically in order to maintain a healthy and working system. | ||
| + | * To activate the cron scripts execute the following command, which will add RADIUSdesk' | ||
| + | <code bash> | ||
| + | sudo cp / | ||
| + | </ | ||
| + | * If you want to change the default intervals at which the scripts get executed, just edit the / | ||
| + | |||
| + | ===== Add LETSENCRYPT certificate ===== | ||
| + | * Rather than repeating existing documentation we will just add a URL with the instructions to do it. | ||
| + | * You might want to run the following first before going to the instructions in the URL | ||
| + | <code bash> | ||
| + | sudo apt-get update | ||
| + | sudo apt-get -y install software-properties-common | ||
| + | </ | ||
| + | * https:// | ||
| + | ===== Next steps ===== | ||
| + | * Be sure to also install FreeRADIUS | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||