feat: add Ubuntu 24.04 installation method (#16334)

This commit is contained in:
mehdiMj
2024-08-30 16:41:27 +03:30
committed by GitHub
parent cdc360dcdb
commit 02a40ebfd5

View File

@@ -18,6 +18,12 @@ Connect to the server command line and follow the instructions below.
## Install Required Packages
=== "Ubuntu 24.04"
=== "NGINX"
```
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
```
=== "Ubuntu 22.04"
=== "NGINX"
```
@@ -110,6 +116,12 @@ See <https://php.net/manual/en/timezones.php> for a list of supported
timezones. Valid examples are: "America/New_York", "Australia/Brisbane", "Etc/UTC".
Ensure date.timezone is set in php.ini to your preferred time zone.
=== "Ubuntu 24.04"
```bash
vi /etc/php/8.3/fpm/php.ini
vi /etc/php/8.3/cli/php.ini
```
=== "Ubuntu 22.04"
```bash
vi /etc/php/8.1/fpm/php.ini
@@ -142,6 +154,11 @@ timedatectl set-timezone Etc/UTC
## Configure MariaDB
=== "Ubuntu 24.04"
```
vi /etc/mysql/mariadb.conf.d/50-server.cnf
```
=== "Ubuntu 22.04"
```
vi /etc/mysql/mariadb.conf.d/50-server.cnf
@@ -192,6 +209,12 @@ exit
## Configure PHP-FPM
=== "Ubuntu 24.04"
```bash
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 22.04"
```bash
cp /etc/php/8.1/fpm/pool.d/www.conf /etc/php/8.1/fpm/pool.d/librenms.conf
@@ -237,6 +260,44 @@ Feel free to tune the performance settings in librenms.conf to meet your needs.
## Configure Web Server
=== "Ubuntu 24.04"
=== "NGINX"
```bash
vi /etc/nginx/conf.d/librenms.conf
```
Add the following config, edit `server_name` as required:
```nginx
server {
listen 80;
server_name librenms.example.com;
root /opt/librenms/html;
index index.php;
charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
fastcgi_pass unix:/run/php-fpm-librenms.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi.conf;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
```
```bash
rm /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default
systemctl restart nginx
systemctl restart php8.3-fpm
```
=== "Ubuntu 22.04"
=== "NGINX"
```bash
@@ -473,6 +534,9 @@ Feel free to tune the performance settings in librenms.conf to meet your needs.
## SELinux
=== "Ubuntu 24.04"
SELinux not enabled by default
=== "Ubuntu 22.04"
SELinux not enabled by default
@@ -539,6 +603,8 @@ Feel free to tune the performance settings in librenms.conf to meet your needs.
SELinux not enabled by default
## Allow access through firewall
=== "Ubuntu 24.04"
Firewall not enabled by default
=== "Ubuntu 22.04"
Firewall not enabled by default