From 375903025d53a907198933e4ba363639a80db80c Mon Sep 17 00:00:00 2001 From: Jellyfrog Date: Fri, 20 Sep 2024 02:22:24 +0200 Subject: [PATCH] Bump minimum PHP version to 8.2 (#16413) --- LibreNMS/Validations/Php.php | 6 ++--- doc/Installation/Install-LibreNMS.md | 35 +++++++++++++++------------- mkdocs.yml | 2 +- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/LibreNMS/Validations/Php.php b/LibreNMS/Validations/Php.php index 78598e41bd..2573eccf9c 100644 --- a/LibreNMS/Validations/Php.php +++ b/LibreNMS/Validations/Php.php @@ -30,9 +30,9 @@ use LibreNMS\Validator; class Php extends BaseValidation { - const PHP_MIN_VERSION = '8.1'; - const PHP_MIN_VERSION_DATE = 'September, 2022'; - const PHP_RECOMMENDED_VERSION = '8.1'; + const PHP_MIN_VERSION = '8.2'; + const PHP_MIN_VERSION_DATE = 'October, 2024'; + const PHP_RECOMMENDED_VERSION = '8.3'; /** * Validate this module. diff --git a/doc/Installation/Install-LibreNMS.md b/doc/Installation/Install-LibreNMS.md index f419a69910..a3c4bd2640 100644 --- a/doc/Installation/Install-LibreNMS.md +++ b/doc/Installation/Install-LibreNMS.md @@ -27,6 +27,9 @@ Connect to the server command line and follow the instructions below. === "Ubuntu 22.04" === "NGINX" ``` + apt install software-properties-common + LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php + apt update apt install acl curl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd unzip python3-pymysql python3-dotenv python3-redis python3-setuptools python3-psutil python3-systemd python3-pip whois traceroute ``` @@ -35,7 +38,7 @@ Connect to the server command line and follow the instructions below. ``` apt install software-properties-common add-apt-repository universe - add-apt-repository ppa:ondrej/php + LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php apt update apt install acl curl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd unzip python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip whois traceroute ``` @@ -44,7 +47,7 @@ Connect to the server command line and follow the instructions below. ``` apt install software-properties-common add-apt-repository universe - add-apt-repository ppa:ondrej/php + LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php apt update apt install acl curl apache2 fping git graphviz imagemagick libapache2-mod-fcgid mariadb-client mariadb-server mtr-tiny nmap php-cli php-curl php-fpm php-gd php-gmp php-json php-mbstring php-mysql php-snmp php-xml php-zip rrdtool snmp snmpd whois python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip unzip traceroute ``` @@ -55,7 +58,7 @@ Connect to the server command line and follow the instructions below. dnf -y install epel-release dnf -y install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm dnf module reset php - dnf module enable php:8.1 + dnf module enable php:8.2 dnf install bash-completion cronie fping git ImageMagick mariadb-server mtr net-snmp net-snmp-utils nginx nmap php-fpm php-cli php-common php-curl php-gd php-gmp php-json php-mbstring php-process php-snmp php-xml php-zip php-mysqlnd python3 python3-PyMySQL python3-redis python3-memcached python3-pip python3-systemd rrdtool unzip ``` @@ -64,14 +67,14 @@ Connect to the server command line and follow the instructions below. dnf -y install epel-release dnf -y install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm dnf module reset php - dnf module enable php:remi-8.1 + dnf module enable php:8.2 dnf install bash-completion cronie fping gcc git httpd ImageMagick mariadb-server mtr net-snmp net-snmp-utils nmap php-fpm php-cli php-common php-curl php-gd php-gmp php-json php-mbstring php-process php-snmp php-xml php-zip php-mysqlnd python3 python3-devel python3-PyMySQL python3-redis python3-memcached python3-pip python3-systemd rrdtool unzip ``` === "Debian 12" === "NGINX" ``` - apt install apt-transport-https lsb-release ca-certificates wget acl curl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php8.2-cli php8.2-curl php8.2-fpm php8.2-gd php8.2-gmp php8.2-mbstring php8.2-mysql php8.2-snmp php8.2-xml php8.2-zip python3-dotenv python3-pymysql python3-redis python3-setuptools python3-systemd python3-pip rrdtool snmp snmpd unzip whois + apt install apt-transport-https lsb-release ca-certificates wget acl curl fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php-cli php-curl php-fpm php-gd php-gmp php-mbstring php-mysql php-snmp php-xml php-zip python3-dotenv python3-pymysql python3-redis python3-setuptools python3-systemd python3-pip rrdtool snmp snmpd unzip whois ``` ## Add librenms user @@ -124,14 +127,14 @@ Ensure date.timezone is set in php.ini to your preferred time zone. === "Ubuntu 22.04" ```bash - vi /etc/php/8.1/fpm/php.ini - vi /etc/php/8.1/cli/php.ini + vi /etc/php/8.3/fpm/php.ini + vi /etc/php/8.3/cli/php.ini ``` === "Ubuntu 20.04" ```bash - vi /etc/php/8.1/fpm/php.ini - vi /etc/php/8.1/cli/php.ini + vi /etc/php/8.3/fpm/php.ini + vi /etc/php/8.3/cli/php.ini ``` === "CentOS 8" @@ -217,14 +220,14 @@ exit === "Ubuntu 22.04" ```bash - cp /etc/php/8.1/fpm/pool.d/www.conf /etc/php/8.1/fpm/pool.d/librenms.conf - vi /etc/php/8.1/fpm/pool.d/librenms.conf + cp /etc/php/8.3/fpm/pool.d/www.conf /etc/php/8.3/fpm/pool.d/librenms.conf + vi /etc/php/8.3/fpm/pool.d/librenms.conf ``` === "Ubuntu 20.04" ```bash - cp /etc/php/8.1/fpm/pool.d/www.conf /etc/php/8.1/fpm/pool.d/librenms.conf - vi /etc/php/8.1/fpm/pool.d/librenms.conf + cp /etc/php/8.3/fpm/pool.d/www.conf /etc/php/8.3/fpm/pool.d/librenms.conf + vi /etc/php/8.3/fpm/pool.d/librenms.conf ``` === "CentOS 8" @@ -333,7 +336,7 @@ Feel free to tune the performance settings in librenms.conf to meet your needs. ```bash rm /etc/nginx/sites-enabled/default systemctl restart nginx - systemctl restart php8.1-fpm + systemctl restart php8.3-fpm ``` === "Ubuntu 20.04" @@ -371,7 +374,7 @@ Feel free to tune the performance settings in librenms.conf to meet your needs. ```bash rm /etc/nginx/sites-enabled/default systemctl restart nginx - systemctl restart php8.1-fpm + systemctl restart php8.3-fpm ``` === "Apache" @@ -409,7 +412,7 @@ Feel free to tune the performance settings in librenms.conf to meet your needs. a2enmod proxy_fcgi setenvif rewrite a2ensite librenms.conf systemctl restart apache2 - systemctl restart php8.1-fpm + systemctl restart php8.3-fpm ``` === "CentOS 8" diff --git a/mkdocs.yml b/mkdocs.yml index 3c53b0dfd1..6910f2403a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -107,7 +107,7 @@ extra: article_nav_top: false article_nav_bottom: true php: - version_min: 8.1 + version_min: 8.2 social: - icon: fontawesome/brands/github link: https://github.com/librenms/