RADIUSdesk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
getting_started:install_ubuntu_update [2016/12/29 09:04] – [Install the CakePHP v3 application] admingetting_started:install_ubuntu_update [2017/06/14 12:59] (current) – [Applying the Database Patches] admin
Line 9: Line 9:
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-This is a once-off action+This is a once-off action and only needs to be done once if you are still running a CakePHP v2 based system
 </WRAP> </WRAP>
  
Line 30: Line 30:
 ===== Check the Nginx config  ===== ===== Check the Nginx config  =====
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-This is a once-off action+This is a once-off action and only needs to be done once if you are still running a CakePHP v2 based system.
 </WRAP> </WRAP>
  
Line 61: Line 61:
  
 ---------------------- ----------------------
 +
 +===== Install The Improved Dynamic Login Pages  =====
 +<WRAP center round tip 100%>
 +This is a once-off action and only needs to be done once if you are still running the older login pages that has a seperate page for mobile devices and desktop devices.
 +</WRAP>
 +
 +  * Check out the latest login pages from the SVN repository.
 +<code bash>
 +cd /usr/share/nginx/html
 +sudo svn checkout svn://dvdwalt@svn.code.sf.net/p/radiusdesk/code/trunk/login ./login
 +</code>
 +
 +----------------------
 +
  
 ===== Update the code ===== ===== Update the code =====
Line 75: Line 89:
 sudo svn update sudo svn update
 #Login Pages #Login Pages
-cd /usr/share/nginx/html/rd_login+cd /usr/share/nginx/html/login
 sudo svn update sudo svn update
 +
 +#Confirm the rights
 +
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/tmp
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/Locale
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/webroot/img/flags
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/webroot/img/nas
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/webroot/img/realms
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/webroot/img/dynamic_details
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/webroot/img/dynamic_photos
 +sudo chown -R www-data. /usr/share/nginx/html/cake2/rd_cake/webroot/files/imagecache
 +
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/tmp
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/logs
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/realms
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_details
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_photos
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/access_providers
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/files/imagecache
 +
 +
 </code> </code>
  
 ------------ ------------
  
-===== Patching the database ===== 
-  * Here we'll list the sql patches to run against the database. 
  
 +===== Applying the Database Patches =====
 +  * As the code evolve we sometimes create patches to the database. Run the following instructions to apply the latest patches.
 +  * These patches are non-destructive which means you can run them multiple times without harm done.
 +<code bash>
 +cd /usr/share/nginx/html/cake3/rd_cake/setup/db
 +sudo mysql -u root rd < correct_realm_acos.sql
 +sudo mysql -u root rd < rd_rename_key_column.sql
 +sudo mysql -u root rd < rd_photo_add_active_column.sql
 +sudo mysql -u root rd < rd_photo_more_enhancements.sql
 +sudo mysql -u root rd < top_up_improvements.sql
 +sudo mysql -u root rd < add_language_selection_to_dynamic_details.sql
 +sudo mysql -u root rd < captive_portal_dns.sql
 +sudo mysql -u root rd < byod_improvements.sql
 +sudo mysql -u root rd < rd_rename_key_column_2.sql
 +sudo mysql -u root rd < correct_users_and_groups_aros.sql
 +</code>
 +
 +------
 +
 +===== Copy the existing images  =====
 +  * We need to move the existing images to a new location
 +  * This is typically a once off but will include more as more parts is migrated.
 +<code bash>
 +#realms
 +sudo cp /usr/share/nginx/html/cake2/rd_cake/webroot/img/realms/* /usr/share/nginx/html/cake3/rd_cake/webroot/img/realms/
 +#Dynamic Details
 +sudo cp /usr/share/nginx/html/cake2/rd_cake/webroot/img/dynamic_details/* /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_details/
 +#Dynamic Photos
 +sudo cp /usr/share/nginx/html/cake2/rd_cake/webroot/img/dynamic_photos/* /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_photos/
 +#Change the ownership
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/realms
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_details
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_photos
 +</code>
 +
 +
 +===== Updating the rights system on the database =====
 +  * Since we are migrating from CakePHP v2 to CakePHP v3 some conventions on the rights system changed.
 +  * We developed a script which you can run to fix these conventions for you.
 +  * Again this script is non-destructive which means you can run it multiple times, especially after new code has been added from the SVN repository.
 +
 +<code bash>
 +cd /usr/share/nginx/html/cake3/rd_cake
 +sudo ./bin/cake migrate_radiusdesk
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/tmp
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/logs
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/realms
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_details
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_photos
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/access_providers
 +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/files/imagecache
 +</code>
 +
 +<WRAP center round important 100%>
 +== Please Take Note ==
 +  * The current version of FreeRADIUS available on the repository (3.0.12) has this bug: http://lists.freeradius.org/pipermail/freeradius-users/2016-October/085317.html
 +  * While we wait for the maintainer of the repository to update to the latest stable release please follow the instructions in this page to [[getting_started:install_ubuntu_freeradius_upgrade|Upgrade FreeRADIUS]] using our own set of packages.
 +  * Once the repository has been updated we will remove this //'detour'// instructions 
 +</WRAP>