Skip to content

Commit

Permalink
Bump minimum PHP version to 8.2 (librenms#16413)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jellyfrog authored Sep 20, 2024
1 parent e53cffb commit 3759030
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
6 changes: 3 additions & 3 deletions LibreNMS/Validations/Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

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.
Expand Down
35 changes: 19 additions & 16 deletions doc/Installation/Install-LibreNMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
```
Expand All @@ -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
```
Expand All @@ -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
```

Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 3759030

Please sign in to comment.