Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
install_24_4 [2024/02/20 12:42] – [Background] system | install_24_4 [2024/09/19 10:22] (current) – [Install MariaDB] system | ||
---|---|---|---|
Line 22: | Line 22: | ||
* This section describes the steps you need to take to get RADIUSdesk up and running with a LEMP stack on Ubuntu 24.04 | * This section describes the steps you need to take to get RADIUSdesk up and running with a LEMP stack on Ubuntu 24.04 | ||
* A LEMP stack is one of those acronyms you can use to impress your friends. It stands for Linux NginX MySQL and PHP. | * A LEMP stack is one of those acronyms you can use to impress your friends. It stands for Linux NginX MySQL and PHP. | ||
- | </ | ||
----------- | ----------- | ||
Line 161: | Line 160: | ||
* 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 | + | * Install the php-fpm service by installing the default version 8.3 of the packages |
<code bash> | <code bash> | ||
sudo apt-get -y install php-fpm | sudo apt-get -y install php-fpm | ||
- | sudo systemctl enable php8.1-fpm | + | sudo systemctl enable php8.3-fpm |
- | sudo systemctl start php8.1-fpm | + | sudo systemctl start php8.3-fpm |
</ | </ | ||
Line 179: | Line 178: | ||
index index.php index.html index.htm index.nginx-debian.html; | index index.php index.html index.htm index.nginx-debian.html; | ||
</ | </ | ||
- | * 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 187: | Line 186: | ||
# | # | ||
# # With php-fpm (or other unix sockets): | # # With php-fpm (or other unix sockets): | ||
- | fastcgi_pass unix:/ | + | fastcgi_pass unix:/ |
# # With php-cgi (or other tcp sockets): | # # With php-cgi (or other tcp sockets): | ||
# | # | ||
Line 227: | Line 226: | ||
<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 244: | Line 243: | ||
sql_mode=IGNORE_SPACE, | sql_mode=IGNORE_SPACE, | ||
</ | </ | ||
- | * Save the file and restart | + | * Save the file. |
+ | |||
+ | === Enable the Event Scheduler === | ||
+ | * MariaDB | ||
+ | * 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 / | ||
+ | <code bash> | ||
+ | sudo vi / | ||
+ | </ | ||
+ | * Enter these two lines: | ||
+ | <code bash> | ||
+ | [mysqld] | ||
+ | event_scheduler=on | ||
+ | </ | ||
+ | * Save the file. | ||
+ | * Restart | ||
<code bash> | <code bash> | ||
sudo systemctl restart mariadb | sudo systemctl restart mariadb | ||
</ | </ | ||
+ | * You can confirm that it is now enabled by checking the following from the SQL terminal: | ||
+ | <code bash> | ||
+ | sudo mysql -u root | ||
+ | MariaDB [(none)]> | ||
+ | +-----------------+-------+ | ||
+ | | Variable_name | ||
+ | +-----------------+-------+ | ||
+ | | event_scheduler | ON | | ||
+ | +-----------------+-------+ | ||
+ | 1 row in set (0.001 sec) | ||
+ | </ | ||
----- | ----- | ||
==== Performance tuning for Nginx ==== | ==== Performance tuning for Nginx ==== | ||
Line 261: | Line 285: | ||
rewrite ^/ | rewrite ^/ | ||
rewrite ^/ | rewrite ^/ | ||
- | access_log off; | ||
- | expires max; | ||
- | add_header Cache-Control public; | ||
- | } | ||
- | </ | ||
- | * Only add the following information if you require backward compatibility (MESHdesk and APdesk). | ||
- | <code bash> | ||
- | location ~ ^/ | ||
- | rewrite ^/ | ||
- | rewrite ^/ | ||
access_log off; | access_log off; | ||
expires max; | expires max; | ||
Line 295: | Line 309: | ||
<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 php-cli php-mysql php-gd php-curl php-xml php-mbstring php-intl php-sqlite3 git wget | ||
- | sudo systemctl restart php8.1-fpm | + | sudo systemctl restart php8.3-fpm |
</ | </ | ||
* Check out the **rdcore** git repository. | * Check out the **rdcore** git repository. | ||
Line 316: | Line 330: | ||
sudo ln -s ../ | sudo ln -s ../ | ||
sudo ln -s ../ | sudo ln -s ../ | ||
- | #If backward compatibility is required for older firmware of MESHdesk | ||
- | sudo ln -s ../ | ||
sudo ln -s ../ | sudo ln -s ../ | ||
sudo ln -s ../ | sudo ln -s ../ | ||
Line 331: | Line 343: | ||
sudo mkdir -p / | sudo mkdir -p / | ||
sudo mkdir -p / | sudo mkdir -p / | ||
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
- | sudo chown -R www-data. / | + | sudo chown -R www-data: |
</ | </ | ||
Line 372: | Line 384: | ||
<code bash> | <code bash> | ||
sudo mysql -u root rd < / | sudo mysql -u root rd < / | ||
+ | </ | ||
+ | * 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 / | ||
+ | rm * | ||
+ | exit | ||
</ | </ | ||
</ | </ | ||
Line 386: | Line 405: | ||
server_name _; | server_name _; | ||
location / | location / | ||
- | try_files $uri $uri/ / | ||
- | } | ||
- | </ | ||
- | * If you need support for backward compatibility (MESHdesk and APdesk), add this section as well: | ||
- | <code bash> | ||
- | location / | ||
try_files $uri $uri/ / | try_files $uri $uri/ / | ||
} | } | ||
Line 400: | Line 413: | ||
| | ||
| | ||
- | } | ||
- | </ | ||
- | * If you need support for backward compatibility (MESHdesk and APdesk), add this section as well: | ||
- | <code bash> | ||
- | location / | ||
- | | ||
- | | ||
} | } | ||
</ | </ | ||
Line 438: | Line 444: | ||
===== Add LETSENCRYPT certificate ===== | ===== Add LETSENCRYPT certificate ===== | ||
+ | <alert type=" | ||
+ | Since Ubuntu 24.04 has not yet been released, we will use the instructions for 22.04, which should work just as well | ||
+ | </ | ||
* Instead of repeating the existing documentation, | * Instead of repeating the existing documentation, | ||
* Before you follow the instructions in the URL, you should first do the following | * Before you follow the instructions in the URL, you should first do the following | ||
Line 444: | Line 453: | ||
sudo apt-get -y install software-properties-common | sudo apt-get -y install software-properties-common | ||
</ | </ | ||
- | * https:// | + | * https:// |
+ | |||
===== Next steps ===== | ===== Next steps ===== | ||
* Make sure that you also install **FreeRADIUS**. | * Make sure that you also install **FreeRADIUS**. | ||
* [[install_24_4_freeradius|Install FreeRADIUS]] | * [[install_24_4_freeradius|Install FreeRADIUS]] |