Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
install_rasberry [2024/02/07 21:06] – created system | install_rasberry [2024/02/08 19:07] (current) – [Disable strict mode] system | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Prep ===== | ===== Prep ===== | ||
- | * These instructions are for Raspberry Pi OS based on Debian version 12 (bookworm). | + | * This guide is for Raspberry Pi OS based on Debian version 12 (Bookworm). |
- | * You can issue the command **cat / | + | * You can run the command **cat / |
- | **. | + | |
* Make sure it is up to date. | * Make sure it is up to date. | ||
<code bash> | <code bash> | ||
Line 16: | Line 15: | ||
sudo apt-get -y install nginx | sudo apt-get -y install nginx | ||
</ | </ | ||
- | * Ensure | + | * Make sure that the web server is started and running |
<code bash> | <code bash> | ||
sudo systemctl stop nginx.service | sudo systemctl stop nginx.service | ||
sudo systemctl start nginx.service | sudo systemctl start nginx.service | ||
</ | </ | ||
- | * Navigate | + | * Using a browser, navigate |
===== Configure Nginx to interpret .php files ===== | ===== Configure Nginx to interpret .php files ===== | ||
- | * The default | + | * The default |
* 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 will listen for requests to interpret. | ||
Line 34: | Line 33: | ||
</ | </ | ||
===== Modify Nginx ===== | ===== Modify Nginx ===== | ||
- | * Now that the php-fpm service is installed | + | * Now that the php-fpm service is installed, let us change the default |
* Edit the default server file: | * Edit the default server file: | ||
<code bash> | <code bash> | ||
Line 44: | Line 43: | ||
index index.php index.html index.htm index.nginx-debian.html; | index index.php index.html index.htm index.nginx-debian.html; | ||
</ | </ | ||
- | * Activate | + | * Enable |
<code bash> | <code bash> | ||
# pass PHP scripts to FastCGI server | # pass PHP scripts to FastCGI server | ||
Line 57: | Line 56: | ||
} | } | ||
</ | </ | ||
- | * Enable | + | * Activate |
<code bash> | <code bash> | ||
# deny access to .htaccess files, if Apache' | # deny access to .htaccess files, if Apache' | ||
Line 66: | Line 65: | ||
} | } | ||
</ | </ | ||
- | * 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 80: | Line 79: | ||
?> | ?> | ||
</ | </ | ||
- | * Navigate to http:// | + | * Navigate to http:// |
===== Install MariaDB ===== | ===== Install MariaDB ===== | ||
==== Why MariaDB? ==== | ==== Why MariaDB? ==== | ||
- | * We discovered | + | * We have found that the version of MySQL that comes with Debian 12 (bookworm) |
- | * For this reason we install | + | * For this reason, we have installed |
- | * MariaDB is an open-source relational database management system, commonly | + | * MariaDB is an open-source relational database management system |
- | * It is intended | + | * It is intended |
- | * Be sure to supply | + | * Be sure to provide |
<code bash> | <code bash> | ||
sudo apt-get -y install mariadb-server php8.2-mysql | sudo apt-get -y install mariadb-server php8.2-mysql | ||
Line 96: | Line 95: | ||
</ | </ | ||
==== Disable strict mode ==== | ==== Disable strict mode ==== | ||
- | * With Debian 12 (bookworm), the bundled | + | * With Debian 12 (Bookworm), the bundled |
- | * We will disable Strict SQL Mode in MariaDB by creating a new file / | + | * We will disable |
<code bash> | <code bash> | ||
sudo vi / | sudo vi / | ||
Line 106: | Line 105: | ||
sql_mode=IGNORE_SPACE, | sql_mode=IGNORE_SPACE, | ||
</ | </ | ||
- | * Save the file and restart the MySQL Server | + | * Save the file and restart the MySQL server |
<code bash> | <code bash> | ||
sudo systemctl restart mariadb | sudo systemctl restart mariadb |