<\/span><\/h2>\n\n\n\nFirst, log in to your Ubuntu 20.04 server through SSH as the root user:<\/p>\n\n\n\n
ssh root@IP_Address -p Port_number<\/pre>\n\n\n\nYou will need to replace \u2018IP_Address\u2018 and \u2018Port_number\u2018 with your server\u2019s respective IP address and SSH port number. Additionally, replace \u2018root\u2019 with the username of the system user with sudo privileges.<\/p>\n\n\n\n
To check whether you have the proper Ubuntu version installed on your server, run the following command:<\/p>\n\n\n\n
$ lsb_release -a<\/pre>\n\n\n\nYou should get an output like this:<\/p>\n\n\n\n
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal<\/pre>\n\n\n\nBefore starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:<\/p>\n\n\n\n
$ sudo apt update -y
$ sudo apt upgrade -y<\/pre>\n\n\n\n<\/span>Step 2. Create a System User<\/span><\/h2>\n\n\n\nOnce logged in to Ubuntu 20.04 as root, we will create a new system user to complete this installation.<\/p>\n\n\n\n
$ sudo useradd librenms -d \/opt\/librenms -M -r
$ sudo usermod -aG librenms www-data<\/pre>\n\n\n\n<\/span>Step 3. Install LEMP<\/span><\/h2>\n\n\n\nWe need to install a web server, database server, and PHP to proceed with installing LibreNMS. In this post, we will use Nginx instead of Apache. So, let’s run the command below to install LEMP.<\/p>\n\n\n\n
$ sudo apt install software-properties-common
$ sudo add-apt-repository universe
$ sudo apt update
$ sudo apt install nginx-full mariadb-server mariadb-client php7.4-{cli,curl,fpm,gd,gmp,json,mbstring,mysql,snmp,xml,zip} acl curl composer fping git graphviz imagemagick mtr-tiny nmap rrdtool snmp snmpd whois unzip python3-pymysql python3-dotenv python3-redis python3-setuptools python3-systemd python3-pip<\/pre>\n\n\n\nOn Ubuntu 20.04, Nginx and MariaDB are configured to start running upon installation, you can check them by running this command:<\/p>\n\n\n\n
$ sudo systemctl status mysql nginx --lines=0<\/pre>\n\n\n\n