RADIUSdesk

This is an old revision of the document!


Update a RADIUSdesk install on Ubuntu 16.04

  • We assume you have an existing install on Ubuntu 16.04 which you want to update.

Be carefull when updating production systems since the RADIUSdesk code is under constant development very new bits of code might still have bugs which can break things.

Install the CakePHP v3 application

This is a once-off action

  • Make sure the following packages are installed:
sudo apt-get install php-cli php-gd php-curl php-xml php-mbstring php-intl
  • Check out the cake3 branch from trunk to /usr/share/nginx/html.
cd /usr/share/nginx/html/
sudo svn checkout svn://dvdwalt@svn.code.sf.net/p/radiusdesk/code/trunk/cake3 ./cake3
  • Change the following directories to be writable by www-data:
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

Check the Nginx config

This is a once-off action

  • Since we are running both CakePHP v2 and CakePHP v3 simultaneously, you will need to update the Nginx config.
  • Edit the /etc/nginx/sites-available/default file:
sudo vi /etc/nginx/sites-available/default
  • Look for the following bit and be sure the location line matches this:
location ~ ^/cake2/.+\.(jpg|jpeg|gif|png|ico|js|css)$ {
    rewrite ^/cake2/rd_cake/webroot/(.*)$ /cake2/rd_cake/webroot/$1 break;
    rewrite ^/cake2/rd_cake/(.*)$ /cake2/rd_cake/webroot/$1 break;
    access_log off;
    expires max;
    add_header Cache-Control public;
}  
  • Add the next bit for the CakePHP v3 application
location /cake3/rd_cake {
   rewrite ^/cake3/rd_cake(.+)$ /cake3/rd_cake/webroot$1 break;
   try_files $uri $uri/ /cake3/rd_cake/index.php$is_args$args;
}
  • Reload the Nginx web server
sudo systemctl reload nginx.service

Update the code

  • Run the following commands to fetch the latest code
#CakePHP v2 Application
cd /usr/share/nginx/html/cake2/rd_cake
sudo svn update
#CakePHP v3 Application
cd /usr/share/nginx/html/cake3
sudo svn update
#Viever
cd /usr/share/nginx/html/rd
sudo svn update
#Login Pages
cd /usr/share/nginx/html/rd_login
sudo svn update

Changing the naming convention on the rights

  • RADIUSdesk makes use of the advanced rights management available with CakPHP.
  • Between CakePHP v2 and CakePHP v3 some conventions changed and we have to update some entries in the rights that was defined.
  • In the past an Access Controller method called by a web page could look like this index_ap.
  • The new convention is indexAp.
  • The following table will indicate which methods were updated with the migration.
  • Go to Other → Rights Managment → Access Controll Objects → Access Providers → Controllers and check that your system has the following changes:
Controller CakePHP v2 Value CakePHP v3 Value
Ssids index_ap indexAp

Be sure to check this table out upon each SVN update since it will grow as we migrate more and more controllers from CakePHP v2 to CakePHP v3.

Patching the database

  • Here we'll list the sql patches to run against the database.