This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
getting_started:22_upgrade [2023/07/05 20:44] admin created |
getting_started:22_upgrade [2023/07/05 21:10] (current) admin [Porting Actions] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Upgrading From CakePHP3 Based Install ====== | ====== Upgrading From CakePHP3 Based Install ====== | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | * This page can be used as a reference when upgrading an older install of RADIUSdesk that still used CakePHPv3 to the latest one using CakePHPv4. | + | * This page can be used as a reference when upgrading an older install of RADIUSdesk that is still using CakePHPv3 to the latest one using CakePHPv4. |
* There has been substantial changes in the database structure between the RADIUSdesk releases that use CakePHPv3 and those that user CakePHPv4. | * There has been substantial changes in the database structure between the RADIUSdesk releases that use CakePHPv3 and those that user CakePHPv4. | ||
* We have created a script that will do a best effort in porting the older database structure to the new database structure. | * We have created a script that will do a best effort in porting the older database structure to the new database structure. | ||
Line 7: | Line 7: | ||
===== Preparing A Fallback ===== | ===== Preparing A Fallback ===== | ||
* You are advised to do these first on a clone / copy of the production system in order to establish everything will work as intended after the porting action. | * You are advised to do these first on a clone / copy of the production system in order to establish everything will work as intended after the porting action. | ||
- | * As with any upgrade you need to prepare the fallback | + | * As with any upgrade you need to prepare the fallback if things does not work out as intended. |
* Fallback points | * Fallback points | ||
* Make a backup/sql dump of the CakePHPv3 based database. | * Make a backup/sql dump of the CakePHPv3 based database. | ||
Line 13: | Line 13: | ||
* Make a copy of the / | * Make a copy of the / | ||
* Once this is taken care of we can start our migration attempt. | * Once this is taken care of we can start our migration attempt. | ||
+ | |||
+ | ===== Install CakePHP 8.1 ===== | ||
+ | * If you are still running a Ubuntu install prior to 22.04 you will need to install CakePHPv8.1 for the latest RADIUSdesk to work. | ||
+ | * You can follow these instructions: | ||
+ | * You can then consult the current install instructions to see which extensions you have to install. | ||
+ | <code bash> | ||
+ | #Add php8.1-extension_name | ||
+ | sudo apt-get -y install php8.1-cli php8.1-mysql php8.1-gd php8.1-curl php8.1-xml php8.1-mbstring php8.1-intl php8.1-sqlite3 | ||
+ | </ | ||
+ | * Also remember to update the Nginx config file to use 8.1 | ||
+ | <code bash> | ||
+ | # pass PHP scripts to FastCGI server | ||
+ | # | ||
+ | location ~ \.php$ { | ||
+ | include snippets/ | ||
+ | # | ||
+ | # # With php-fpm (or other unix sockets): | ||
+ | fastcgi_pass unix:/ | ||
+ | # # With php-cgi (or other tcp sockets): | ||
+ | # | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Porting Actions ===== | ||
+ | * We assume you made the backup of the database and folders that was mentioned earlier. | ||
+ | * Create a new database which we will use to migrate from: | ||
+ | <code bash> | ||
+ | sudo su | ||
+ | mysql -u root | ||
+ | create database rd_cake3; | ||
+ | GRANT ALL PRIVILEGES ON rd_cake3.* to ' | ||
+ | GRANT ALL PRIVILEGES ON rd_cake3.* to ' | ||
+ | exit; | ||
+ | </ | ||
+ | * Move the original / | ||
+ | <code bash> | ||
+ | sudo mv / | ||
+ | </ | ||
+ | * Do a new install of RADIUSdesk using this section as reference: https:// | ||
+ | * Remove the old rd SQL database and create a new one using the latest sample SQL database. | ||
+ | <code bash> | ||
+ | sudo su | ||
+ | mysql -u root | ||
+ | drop database rd; | ||
+ | create database rd; | ||
+ | exit; | ||
+ | sudo mysql -u root rd < / | ||
+ | </ | ||
+ | |||
+ | ===== Running the porting script ===== | ||
+ | * Everything is now in place to run the porting script. | ||
+ | * Run the following as root user or www-data user. | ||
+ | <code bash> | ||
+ | cd / | ||
+ | </ | ||
+ | * If everything work as intended this script will create a cloud / realm. | ||
+ | * It will also port existing RADIUS related things including Dynamic Login pages. | ||
+ | |||
+ | ===== Finally you need to copy the older files from the old folders ===== | ||
+ | * The following of the original folders are important | ||
+ | <code bash> | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||