RADIUSdesk

logo

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
getting_started:22_install_ubuntu_nginx [2023/11/21 15:04]
admin [What do we require]
getting_started:22_install_ubuntu_nginx [2023/11/22 09:58] (current)
admin
Line 41: Line 41:
 ===== HOWTO ===== ===== HOWTO =====
 <WRAP center round alert 100%> <WRAP center round alert 100%>
-  * Please note that the shell behavior in Ubuntu 22.04 changed+  * Please note that the behavior of the shell has changed in Ubuntu 22.04. 
-  * It seems that it **DOES NOT** execute multi line paste of commands. +  * It seems that it does NOT execute the multi-line insertion of commands. 
-  * You thus have to copy past these instructions line by line unfortunately.+  * So unfortunately you have to copy these commands line by line.
 </WRAP> </WRAP>
 +
 +
  
 ==== Add a sudo user  ==== ==== Add a sudo user  ====
-  * We assume you have a clean install of Ubuntu 22.04 WITHOUT Apache installed.+  * We assume that you have installed a clean installation of Ubuntu 22.04 WITHOUT Apache.
   * If you have not yet added a sudo user add one now.   * If you have not yet added a sudo user add one now.
 <code bash> <code bash>
Line 56: Line 58:
 </code> </code>
  
-==== Networking Introduction on Ubuntu 22.04  ==== +==== Introduction to network technology under Ubuntu 22.04  ==== 
-  * If you do not yet have a working network configuration on the server you plan to do the installation on, please use this section as reference, else just proceed to the next section. +  * If you do not yet have a working network configuration on the server on which you want to perform the installation, please use this section as reference, otherwise simply continue with the next section. 
-  * Since there is such huge difference between the way of doing things in Ubuntu 16.04 and Ubuntu 22.04 we felt that adding this section will help those who are getting used to this newer way of doing things+  * Since there is a big difference between Ubuntu 16.04 and Ubuntu 22.04we feel that this section will help those who need to get used to the new way of working
-  * For this we assume you have a bare VM (like the ones from https://www.osboxes.org/ubuntu-server/+  * We assume that you have a bare VM (like the one from https://www.osboxes.org/ubuntu-server/
-  * We also assume you used this to create a VM in Virtualbox and are now faced with only the local loopback interface (127.0.0.1) when issuing the **ip a** command. +  * We also assume that you have used it to create a VM in Virtualbox and now only see the local loopback interface (127.0.0.1) when you enter the ip a command. 
-  * To see which interfaces are available (yet some might just not yet be configured)+  *  To see which interfaces are available (although some may not yet be configured)
 <code bash> <code bash>
 ip a ip a
Line 150: Line 152:
 ==== Configure Nginx to interpret .php files ==== ==== Configure Nginx to interpret .php files ====
 === php-fpm === === php-fpm ===
-  * The default install of **Nginx** does not support the serving of **.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 will listen for requests to interpret+  * This service waits for requests for interpretation
-  * Install the php-fpm service by installing the default version 8.1 of the packages+  * Install the php-fpm service by installing the default version 8.1 of the packages 
 <code bash> <code bash>
 sudo apt-get -y install php-fpm sudo apt-get -y install php-fpm
Line 161: Line 163:
  
 ==== Modify Nginx ==== ==== Modify Nginx ====
-  * Now that the php-fpm service is installed we should change the default **Nginx** server to make use of it.+  * Now that the php-fpm service is installed, let's modify the default Nginx server to use it.
   * Edit the default server file:   * Edit the default server file:
 <code bash> <code bash>
Line 171: Line 173:
 index index.php index.html index.htm index.nginx-debian.html; index index.php index.html index.htm index.nginx-debian.html;
 </code> </code>
-  * Activate PHP processing by un-commenting this this section. Note that we use the UNIX socket and we are using **8.1** and not **7.4** which is specified originally in the config file.+  * 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.4which was originally specified in the configuration file.
 <code bash> <code bash>
 # pass PHP scripts to FastCGI server # pass PHP scripts to FastCGI server
Line 184: Line 186:
 } }
 </code> </code>
-  * Enable the hiding of .htaccess files+  * Activate the hiding of .htaccess files.
 <code bash> <code bash>
 # deny access to .htaccess files, if Apache's document root # deny access to .htaccess files, if Apache's document root
Line 193: Line 195:
 } }
 </code> </code>
-  * Reload the **Nginx** web server's configuration+  * Reload the configuration of the Nginx web server
 <code bash> <code bash>
 sudo systemctl reload nginx.service sudo systemctl reload nginx.service
Line 207: Line 209:
 ?> ?>
 </code> </code>
-  * Navigate to http://127.0.0.1/test.php and see if the page display the PHP info.+  * Navigate to http://127.0.0.1/test.php and check that the page displays the PHP information.
  
 ----------- -----------
 ==== Install MariaDB ==== ==== Install MariaDB ====
 === Why MariaDB? === === Why MariaDB? ===
-  * We discovered that the version of MySQL that comes bundled by default with Ubuntu 22.04 are breaking things on RADIUSdesk. +  * We have found that the version of MySQL that is delivered by default with Ubuntu 22.04 causes problems with RADIUSdesk. 
-  * For this reason we install MariaDB as an alternative. +  * For this reasonwe have installed MariaDB as an alternative. 
-  * MariaDB is an open-source relational database management system, commonly used as an alternative for MySQL as the database portion of the popular LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack.  +  * MariaDB is an open-source relational database management system that is often used as an alternative to MySQL as the database part of the popular LAMP stack (Linux, Apache, MySQL, PHP/Python/Perl). 
-  * It is intended to be a drop-in replacement for MySQL. +  * It is intended as a drop-in replacement for MySQL. 
-  * Be sure to supply a root password for the MariaDB database when asked for it if you are security conscious else simply hit the ESC key.+  * Make sure to provide a root password for the MariaDB database when asked for it if you are security conscious, otherwise just press the ESC key.
 <code bash> <code bash>
 sudo apt-get -y install mariadb-server php8.1-mysql sudo apt-get -y install mariadb-server php8.1-mysql
Line 225: Line 227:
  
 === Disable strict mode === === Disable strict mode ===
-  * With Ubuntu 22.04, the bundled release of MariaDB is at version 10.3 which introduced a few Strict modes which have some problems with RADIUSdesk database implementation. +  * With Ubuntu 22.04, the bundled version of MariaDB is on version 10.3which has introduced some strict modes that have some issues with the RADIUSdesk database implementation. 
-  * We will disable Strict SQL Mode in MariaDB by creating a new file /etc/mysql/conf.d/disable_strict_mode.cnf+  * We will disable the strict SQL mode in MariaDB by creating a new file /etc/mysql/conf.d/disable_strict_mode.cnf
 <code bash> <code bash>
 sudo vi /etc/mysql/conf.d/disable_strict_mode.cnf sudo vi /etc/mysql/conf.d/disable_strict_mode.cnf
Line 274: Line 276:
  
 ==== Install RADIUSdesk  ==== ==== Install RADIUSdesk  ====
-  * The first part prepared everything to install **RADIUSdesk**.  +  * In the first parteverything was prepared for the installation of **RADIUSdesk**. 
-  * This part will go through the steps to install the latest **RADIUSdesk**.+  * This part explains the steps for installing the latest **RADIUSdesk**.
   * RADIUSdesk consists of three components.   * RADIUSdesk consists of three components.
     * **rd** directory with its contents contains all the HTML and JavaScript code and is used as the presentation layer.     * **rd** directory with its contents contains all the HTML and JavaScript code and is used as the presentation layer.
Line 293: Line 295:
 sudo git clone https://github.com/RADIUSdesk/rdcore.git sudo git clone https://github.com/RADIUSdesk/rdcore.git
 </code> </code>
-  *  This will create an **rdcore** directory containing some sub-folders.+  *  This will create an **rdcore** directory that contains 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 301: Line 303:
 </code> </code>
  
-=== Create soft links === +=== Create softlinks === 
-  * We will create soft links in the directory where Nginx will serve the RADIUSdesk contents.+  * We will create softlinks in the directory where Nginx provides the RADIUSdesk content.
 <code bash> <code bash>
 cd /var/www/html cd /var/www/html
Line 316: Line 318:
 </code> </code>
  
-=== Change Ownerships ===+=== Change ownership ===
   * Change the ownership of the following files to www-data so Nginx can make changes to the files/directories   * Change the ownership of the following files to www-data so Nginx can make changes to the files/directories
 <code bash> <code bash>
Line 333: Line 335:
  
 === The Database === === The Database ===
-  * Make sure the timezone on the server is set to UTC +  * Make sure that the time zone on the server is set to UTC 
-  * Populate the timezone data on the DB+  * Fill the time zone data in the DB
 <code bash> <code bash>
 #NOTE FAILING THIS STEP will break the RADIUS graphs #NOTE FAILING THIS STEP will break the RADIUS graphs
Line 357: Line 359:
 <WRAP center round important 100%> <WRAP center round important 100%>
   * RADIUSdesk is under active development and sometimes we add SQL patches.   * RADIUSdesk is under active development and sometimes we add SQL patches.
-  * The SQL Patches are located under **/var/www/html/cake4/rd_cake/setup/db/**+  * The SQL patches are located at **/var/www/html/cake4/rd_cake/setup/db/**.
   * These patches are non-destructive and you can run them against the database   * These patches are non-destructive and you can run them against the database
-  * See the pattern below+  * See the sample 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/rdcore/cake4/rd_cake/setup/db/8.068_add_email_sms_histories.sql 
Line 420: Line 422:
 ----- -----
  
-===== Cron Scripts ===== +===== Cron scripts ===== 
-  * **RADIUSdesk** requires a few scripts to run periodically in order to maintain a healthy and working system. +  * **RADIUSdesk** requires some scripts that are executed at regular intervals to maintain a healthy and functioning system. 
-  * To activate the cron scripts execute the following command, which will add **RADIUSdesk**'s crons scripts to the Cron system+  * To activate the cron scriptsexecute 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/cron4 /etc/cron.d/
 </code> </code>
-  * If you want to change the default intervals at which the scripts get executed, just edit the /etc/cron.d/cron3 file+  * If you want to change the default intervals at which the scripts are executed, simply edit the file /etc/cron.d/cron3.
  
 ===== Add LETSENCRYPT certificate ===== ===== Add LETSENCRYPT certificate =====
-  * Rather than repeating existing documentation we will just add a URL with the instructions to do it+  * Instead of repeating the existing documentationwe simply add a URL with the appropriate instructions. 
-  * You might want to run the following first before going to the instructions in the URL+  * You may want to do the following first before following the instructions in the URL
  
 <code bash> <code bash>