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_24_4 [2024/02/21 08:40] – [Add LETSENCRYPT certificate] systeminstall_24_4 [2024/09/19 10:22] (current) – [Install MariaDB] system
Line 160: 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.of the packages +  * Install the php-fpm service by installing the default version 8.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.2-fpm +sudo systemctl enable php8.3-fpm 
-sudo systemctl start php8.2-fpm+sudo systemctl start php8.3-fpm
 </code> </code>
  
Line 178: Line 178:
 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.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.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 186: Line 186:
     #     #
     #       # With php-fpm (or other unix sockets):     #       # With php-fpm (or other unix sockets):
-    fastcgi_pass unix:/var/run/php/php8.2-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 226: Line 226:
  
 <code bash> <code bash>
-sudo apt-get -y install mariadb-server php8.2-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 243: Line 243:
 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+  * Save the file
 + 
 +=== 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> </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>
 ----- -----
 ==== Performance tuning for Nginx ==== ==== Performance tuning for Nginx ====
Line 284: 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.2-fpm+sudo systemctl restart php8.3-fpm
 </code> </code>
   *  Check out the **rdcore** git repository.   *  Check out the **rdcore** git repository.
Line 359: Line 384:
 <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 
 +</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/rdcore/cake4/rd_cake/tmp/cache/models
 +rm *
 +exit
 </code> </code>
 </alert> </alert>
  • install_24_4.1708497655.txt.gz
  • Last modified: 2024/02/21 08:40
  • by system