Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
install_22_4 [2024/02/09 09:30] – systeminstall_22_4 [2026/11/01 19:10] (current) – system
Line 1: Line 1:
-~~NOTOC~~ +<nav type="pills" justified="false">
-<nav type="pills" justified="true">+
   * [[:user_manuals|Back to Documentation]]   * [[:user_manuals|Back to Documentation]]
   * [[:install_22_4|Install on Ubuntu 22.04]]   * [[:install_22_4|Install on Ubuntu 22.04]]
Line 19: Line 18:
  
   * Nginx is a web server that seems to have overtaken Apache in terms of popularity and number of active websites on the Internet.   * Nginx is a web server that seems to have overtaken Apache in terms of popularity and number of active websites on the Internet.
-  *  It is new, lightweight, fast, highly scalable and capable of handling a large load without overloading your system.+  * It is new, lightweight, fast, highly scalable and capable of handling a large load without overloading your system.
   * Nginx is the new Apache so to speak.   * Nginx is the new Apache so to speak.
   * This section describes the steps you need to take to get RADIUSdesk up and running with a LEMP stack on Ubuntu 22.04   * This section describes the steps you need to take to get RADIUSdesk up and running with a LEMP stack on Ubuntu 22.04
Line 25: Line 24:
  
 <alert type="info"> <alert type="info">
-  * We recently switched from CakePHPv3 to CakePHPv4. +  * We **(not so recently)** switched from CakePHPv3 to CakePHPv4. 
-  *  If you manage devices with MESHdesk and APdesk, make sure you also run the instructions that include cake3 so that your system is backwards compatible.+  * If you manage devices with MESHdesk and APdesk, make sure you also run the instructions that include cake3 so that your system is backwards compatible.
   * The firmware on these devices may still point to the cake3 directory, so we need to include support for this directory.   * The firmware on these devices may still point to the cake3 directory, so we need to include support for this directory.
 </alert> </alert>
Line 34: Line 33:
 ===== What we need ===== ===== What we need =====
  
-  *A standard Nginx installation on Ubuntu is actually very simple. +  * A standard Nginx installation on Ubuntu is actually very simple. 
-  *  The more complicated part is customizing Nginx for the following tasks:+  * The more complicated part is customizing Nginx for the following tasks:
  
 <panel type="default" no-body="true"> <panel type="default" no-body="true">
Line 165: Line 164:
 === php-fpm === === php-fpm ===
   * The default installation of Nginx does not support serving .php files.   * The default installation of Nginx does not support serving .php files.
-  * We will install a program (actually a service) called **php-fpm**. +  * We will install a program (actually a service) called **php-fpm**.
   * This service waits for requests for interpretation.   * This service waits for requests for interpretation.
-  * Install the php-fpm service by installing the default version 8.1 of the packages +  * Since Ubuntu 22.04 is quite dated by now, we can not use the standard version of PHP (8.1) that comes with Ubuntu. 
 +  * RADIUSdesk's CakePHP app is now using CakePHPv5 which requires a minimum of PHP 8.2. 
 +  * We will add an external, well maintained, repository from which we will install PHP 8.3. 
 +  * PHP 8.3 is the default version on Ubuntu 24.04, so it keeps things predictable and according to a convention.
 <code bash> <code bash>
-sudo apt-get -y install php-fpm +sudo apt update && sudo apt upgrade -y 
-sudo systemctl enable php8.1-fpm +sudo apt install software-properties-common -y 
-sudo systemctl start php8.1-fpm+sudo add-apt-repository ppa:ondrej/php -y 
 +sudo apt install php8.3 -y 
 +sudo apt install php8.3-fpm 
 +sudo systemctl enable php8.3-fpm 
 +sudo systemctl start php8.3-fpm 
 +# Make php8.3 the default php interpreter when php is called 
 +sudo update-alternatives --set php /usr/bin/php8.3 
 </code> </code>
  
Line 185: Line 194:
 index index.php index.html index.htm index.nginx-debian.html; index index.php index.html index.htm index.nginx-debian.html;
 </code> </code>
-  * Enable PHP processing by leaving this section uncommented. Note that we are using the UNIX socket and that we are using 8.1 and not 7.4, which was originally specified in the configuration file.+  * Enable PHP processing by leaving this section uncommented. Note that we are using the UNIX socket and that we are using 8.3 and not 7.4, which was originally specified in the configuration file.
 <code bash> <code bash>
 # Pass PHP scripts to FastCGI server # Pass PHP scripts to FastCGI server
Line 193: Line 202:
     #     #
     #       # With php-fpm (or other unix sockets):     #       # With php-fpm (or other unix sockets):
-    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;+    fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
     #       # With php-cgi (or other tcp sockets):     #       # With php-cgi (or other tcp sockets):
     #       fastcgi_pass 127.0.0.1:9000;     #       fastcgi_pass 127.0.0.1:9000;
Line 233: Line 242:
  
 <code bash> <code bash>
-sudo apt-get -y install mariadb-server php8.1-mysql+sudo apt-get -y install mariadb-server php8.3-mysql
 sudo systemctl enable mariadb sudo systemctl enable mariadb
 sudo systemctl restart mariadb sudo systemctl restart mariadb
Line 250: Line 259:
 sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
 </code> </code>
-  * Save the file and restart the MySQL server+=== Enable the Event Scheduler === 
 +  * MariaDB and MySQL has a built in Event Scheduler (like CRON for a database) which is disabled by default. 
 +  * We make use of this feature to automatically optimize some of the database tables. 
 +  * We will enable the Event Scheduler in MariaDB by creating a new file /etc/mysql/conf.d/enable_event_scheduler.cnf 
 +<code bash> 
 +sudo vi /etc/mysql/conf.d/enable_event_scheduler.cnf 
 +</code> 
 +  * Enter these two lines: 
 +<code bash> 
 +[mysqld] 
 +event_scheduler=on 
 +</code> 
 +  * Save the file. 
 +  *  Restart the MySQL server
 <code bash> <code bash>
 sudo systemctl restart mariadb sudo systemctl restart mariadb
 +</code>
 +  * You can confirm that it is now enabled by checking the following from the SQL terminal:
 +<code bash>
 +sudo mysql -u root 
 +MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'event_scheduler';
 ++-----------------+-------+
 +| Variable_name   | Value |
 ++-----------------+-------+
 +| event_scheduler | ON    |
 ++-----------------+-------+
 +1 row in set (0.001 sec)
 </code> </code>
  
Line 291: Line 324:
   * In the first part, everything was prepared for the installation of **RADIUSdesk**.   * In the first part, everything was prepared for the installation of **RADIUSdesk**.
   * This part explains the steps for installing the latest **RADIUSdesk**.   * This part explains the steps for installing the latest **RADIUSdesk**.
-  * RADIUSdesk consists of three components. +  * RADIUSdesk consists of three core repositories. 
-    * **rd** directory with its contents contains all the HTML and JavaScript code and is used as the presentation layer. +    * **rd_gui_builds** contains the optimized ExtJS code and is used as the presentation layer. 
-    * **cake4** is a CakePHPv4 application and can be considered the engine room. This is where the data is processed before it is displayed by the presentation layer. +    * **rd_cake5** is a CakePHPv5 (It was CakePHPv4 initially) application and can be considered the engine room. This is where the data is processed before it is displayed by the presentation layer. 
-    * **login** is a directory with various login pages that are managed centrally via the **RADIUSdesk Dynamic Login Pages** applet. +    * **rd_login** is a repository with various dynamic login pages that are managed centrally via the **RADIUSdesk Dynamic Login Pages** applet. 
-  * Later we will create various symbolic links from locations within the **rdcore** directory to locations within the document root directory of the web server.+  * Later we will create various symbolic links from locations within these cloned repositories to locations within the document root directory of the web server.
  
 === Required packages === === Required packages ===
   * Make sure that the following packages are installed.   * Make sure that the following packages are installed.
 <code bash> <code bash>
-sudo apt-get -y install php-cli php-mysql php-gd php-curl php-xml php-mbstring php-intl php-sqlite3 git wget +sudo apt-get -y install php8.3-cli php8.3-mysql php8.3-gd php8.3-curl php8.3-xml php8.3-mbstring php8.3-intl php8.3-sqlite3 git wget 
-sudo systemctl restart php8.1-fpm+sudo systemctl restart php8.3-fpm
 </code> </code>
-  *  Check out the **rdcore** git repository.+  *  Check out the three core repositories.
 <code bash> <code bash>
 cd /var/www cd /var/www
-sudo git clone https://github.com/RADIUSdesk/rdcore.git+sudo git clone https://github.com/RADIUSdesk/rd_gui_builds.git 
 +sudo git clone https://github.com/RADIUSdesk/rd_cake5.git 
 +sudo git clone https://github.com/RADIUSdesk/rd_login.git
 </code> </code>
-  *   This will create an **rdcore** directory containing some subfolders. 
   * It is recommended that you also include the RD Mobile UI.   * It is recommended that you also include the RD Mobile UI.
   * Check out the **rd_mobile** git repository.   * Check out the **rd_mobile** git repository.
Line 314: Line 348:
 cd /var/www cd /var/www
 sudo git clone https://github.com/RADIUSdesk/rd_mobile.git sudo git clone https://github.com/RADIUSdesk/rd_mobile.git
 +</code>
 +  * It is further recommended that you include RD-Connect for users to manage their accounts.
 +<code bash>
 +cd /var/www
 +sudo git clone https://github.com/RADIUSdesk/rd_connect.git
 </code> </code>
  
Line 320: Line 359:
 <code bash> <code bash>
 cd /var/www/html cd /var/www/html
-sudo ln -s ../rdcore/rd ./rd +sudo ln -s ../rd_gui_builds/Rd ./rd 
-sudo ln -s ../rdcore/cake4 ./cake4 +sudo ln -s ../rd_cake5 ./cake4 
-#If backward compatibility is required for older firmware of MESHdesk +sudo ln -s ../rd_login ./login 
-sudo ln -s ../rdcore/cake4 ./cake3 +sudo ln -s ../rd_cake5/rd_cake/setup/scripts/reporting ./reporting
-sudo ln -s ../rdcore/login ./login +
-sudo ln -s ../rdcore/AmpConf/build/production/AmpConf ./conf_dev +
-sudo ln -s ../rdcore/cake4/rd_cake/setup/scripts/reporting ./reporting+
 #For the RD Mobile UI #For the RD Mobile UI
 sudo ln -s ../rd_mobile/build/production/RdMobile ./rd_mobile sudo ln -s ../rd_mobile/build/production/RdMobile ./rd_mobile
 +#For the RD-Connect Mobile UI
 +sudo ln -s ../rd_connect/build/production/RdConnect ./rd_connect
 </code> </code>
  
Line 377: Line 415:
   * See the example below   * See the example below
 <code bash> <code bash>
-sudo mysql -u root rd < /var/www/rdcore/cake4/rd_cake/setup/db/8.068_add_email_sms_histories.sql +sudo mysql -u root rd < /var/www/html/cake4/rd_cake/setup/db/8.068_add_email_sms_histories.sql  
 +</code> 
 +  * Some of these patches may add new columns to existing database tables. In this case, it is recommended to clear the CakePHP models (tables) cache to ensure that the latest changes are also applied there: 
 +<code bash> 
 +sudo su 
 +cd /var/www/html/cake4/rd_cake/tmp/cache/models 
 +rm * 
 +exit
 </code> </code>
 </alert> </alert>
Line 383: Line 428:
 === Configure Nginx === === Configure Nginx ===
  
-  * Configure Nginx to rewrite some RdCore URLs that start with ///cake4/rd_cake//.+  * Configure Nginx to rewrite some URLs that start with ///cake4/rd_cake//.
   * Edit ///etc/nginx/sites-enabled/default//   * Edit ///etc/nginx/sites-enabled/default//
 <code bash> <code bash>
Line 422: Line 467:
 === Important URLs ===   === Important URLs ===  
   * The following URLs are important to reach the user interface   * The following URLs are important to reach the user interface
-  * To load the optimized user interface, go to http://127.0.0.1/rd/build/production/Rd/+  * To load the user interface, go to http://127.0.0.1/rd
   * If you want to deliver the content directly from the webroot, proceed as follows:   * If you want to deliver the content directly from the webroot, proceed as follows:
 <code bash> <code bash>
-sudo cp -R /var/www/html/rd/build/production/Rd/* /var/www/html/+sudo cp -R /var/www/html/rd/* /var/www/html/
 </code> </code>
   * To load the RD Mobile UI, go to http://127.0.0.1/rd_mobile   * To load the RD Mobile UI, go to http://127.0.0.1/rd_mobile
Line 439: Line 484:
   * To activate the cron scripts, execute the following command, which adds the **RADIUSdesk** cron scripts to the cron system   * To activate the cron scripts, execute the following command, which adds the **RADIUSdesk** cron scripts to the cron system
 <code bash> <code bash>
-sudo cp /var/www/html/cake4/rd_cake/setup/cron/cron4 /etc/cron.d/+sudo cp /var/www/html/cake4/rd_cake/setup/cron/rd_cake5 /etc/cron.d/
 </code> </code>
   * If you want to change the default intervals at which the scripts are executed, simply edit the file /etc/cron.d/cron3.   * If you want to change the default intervals at which the scripts are executed, simply edit the file /etc/cron.d/cron3.
  • install_22_4.1707463809.txt.gz
  • Last modified: 2024/02/09 09:30
  • by system