{"id":12990,"date":"2022-05-31T22:57:50","date_gmt":"2022-05-31T19:57:50","guid":{"rendered":"https:\/\/kifarunix.com\/?p=12990"},"modified":"2024-03-09T12:28:51","modified_gmt":"2024-03-09T09:28:51","slug":"install-librenms-on-rocky-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-librenms-on-rocky-linux\/","title":{"rendered":"Install LibreNMS on Rocky Linux"},"content":{"rendered":"\n<p>Follow through this tutorial to learn how to install LibreNMS on Rocky Linux. <a href=\"https:\/\/www.librenms.org\/#features\" target=\"_blank\" rel=\"noreferrer noopener\">LibreNMS<\/a> is a fully featured MySQL\/PHP and SNMP based network monitoring system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install LibreNMS on Rocky Linux<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Create LibreNMS system User Account<\/h3>\n\n\n\n<p>To begin with, create non privileged system user account for LibreNMS by executing the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo useradd -d \/opt\/librenms -M -r -s \/bin\/bash librenms<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install EPEL repository<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install epel-release<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install Required Packages<\/h3>\n\n\n\n<p>LibreNMS is requires L[E\/A]MP stack. Hence, run the command below to install the Webserver, Nginx, PHP, MariaDB and other required packages. Nginx is the recommended web server to use.<\/p>\n\n\n\n<p><strong>The minimum supported PHP version is 7.3<\/strong>. We will use PHP 7.4 in this tutorial.<\/p>\n\n\n\n<p>To be able to install PHP 7.4 on Rocky Linux, enable repo modules for PHP 7.4 as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf module reset php<\/code><\/pre>\n\n\n\n<pre id=\"block-4a18d46c-1c8f-47a6-a33e-af397063fe6c\" class=\"wp-block-code\"><code>sudo dnf module enable php:7.4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install bash-completion cronie fping git httpd ImageMagick \\\nmariadb-server mtr net-snmp net-snmp-utils nmap php-fpm php-cli \\\nphp-common php-curl php-gd php-json php-mbstring php-process \\\nphp-snmp php-xml php-zip php-mysqlnd python3 python3-PyMySQL \\\npython3-devel python3-redis python3-memcached python3-pip \\\npython3-systemd rrdtool unzip policycoreutils-python-utils<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create Database and Database User for LibreNMS<\/h3>\n\n\n\n<p>Start and enable MariaDB server to run on system boot;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now mariadb<\/code><\/pre>\n\n\n\n<p>Check status;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status mariadb<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\u25cf mariadb.service - MariaDB 10.3 database server\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/mariadb.service; enabled; vendor preset: disabled)\n   Active: active (running) since Tue 2022-05-31 13:23:16 EDT; 9s ago\n     Docs: man:mysqld(8)\n           https:\/\/mariadb.com\/kb\/en\/library\/systemd\/\n  Process: 38942 ExecStartPost=\/usr\/libexec\/mysql-check-upgrade (code=exited, status=0\/SUCCESS)\n  Process: 38872 ExecStartPre=\/usr\/libexec\/mysql-prepare-db-dir mariadb.service (code=exited, status=0\/SUCCESS)\n  Process: 38848 ExecStartPre=\/usr\/libexec\/mysql-check-socket (code=exited, status=0\/SUCCESS)\n Main PID: 38911 (mysqld)\n   Status: \"Taking your SQL requests now...\"\n    Tasks: 30 (limit: 11256)\n   Memory: 64.3M\n   CGroup: \/system.slice\/mariadb.service\n           \u2514\u250038911 \/usr\/libexec\/mysqld --basedir=\/usr\n\nMay 31 13:23:15 librenms.kifarunix-demo.com systemd[1]: mariadb.service: Succeeded.\nMay 31 13:23:15 librenms.kifarunix-demo.com systemd[1]: Stopped MariaDB 10.3 database server.\nMay 31 13:23:15 librenms.kifarunix-demo.com systemd[1]: Starting MariaDB 10.3 database server...\nMay 31 13:23:15 librenms.kifarunix-demo.com mysql-prepare-db-dir[38872]: Database MariaDB is probably initialized in \/var\/lib\/mysql already, nothing is done.\nMay 31 13:23:15 librenms.kifarunix-demo.com mysql-prepare-db-dir[38872]: If this is not the case, make sure the \/var\/lib\/mysql is empty before running mysql-prepare-db-dir.\nMay 31 13:23:15 librenms.kifarunix-demo.com mysqld[38911]: 2022-05-31 13:23:15 0 [Note] \/usr\/libexec\/mysqld (mysqld 10.3.32-MariaDB) starting as process 38911 ...\nMay 31 13:23:16 librenms.kifarunix-demo.com systemd[1]: Started MariaDB 10.3 database server.\n<\/code><\/pre>\n\n\n\n<p>Run the initial security script to remove the test tables, disable remote root login, remove test tables\/databases\/anonymous users.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>Next, login to MariaDB database and create a database and database user for LibreNMS. The names used here are not standard. Feel free to use any suitable name.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p -e \"create database librenmsdb character set utf8mb4 collate utf8mb4_unicode_ci\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p -e \"create user librenmsuser@localhost identified by 'StronGP@ssw0RD'\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p -e \"grant all on librenmsdb.* to librenmsuser@localhost\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p -e \"flush privileges\"<\/code><\/pre>\n\n\n\n<p>Configure InnoDB to use one tablespace file per InnoDB table and enable the preservation of the lettercase of database and table names;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i.bak -e '\/\\&#91;mysqld\\]\/a innodb_file_per_table=1\\nlower_case_table_names=0' \/etc\/my.cnf.d\/mariadb-server.cnf<\/code><\/pre>\n\n\n\n<p>Restart MariaDB Service;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart mariadb<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install LibreNMS<\/h3>\n\n\n\n<p>Next, install LibreNMS by cloning its Github repository to home directory, <code><strong>\/opt\/librenms<\/strong><\/code>,  defined above for the <strong>librenms<\/strong> user;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/librenms\/librenms.git \/opt\/librenms<\/code><\/pre>\n\n\n\n<p>Set ownership, permission and access control lists for the LibreNMS directories and files;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R librenms:librenms \/opt\/librenms\nchmod 771 \/opt\/librenms<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -d -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -R -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs \/opt\/librenms\/bootstrap\/cache\/ \/opt\/librenms\/storage\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install LibreNMS PHP dependencies<\/h3>\n\n\n\n<p>As user librenms, install required PHP dependencies;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -Hiu librenms \/opt\/librenms\/scripts\/composer_wrapper.php install --no-dev<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Set the Database Connection credentials<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -Hiu librenms vim \/opt\/librenms\/.env<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>DB_HOST=localhost\nDB_DATABASE=librenmsdb\nDB_USERNAME=librenmsuser\nDB_PASSWORD=StronGP@ssw0RD<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Update System and PHP timezone;<\/h3>\n\n\n\n<p>Ensure that you update your system and PHP timezone accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>timedatectl set-timezone America\/Santiago<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i.bak 's\/;date.timezone =\/date.timezone = America\\\/Santiago\/' \/etc\/php.ini<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure LibreNMS SNMPD<\/h3>\n\n\n\n<p>Copy the default SNMP configuration file;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\\cp \/opt\/librenms\/snmpd.conf.example \/etc\/snmp\/snmpd.conf<\/code><\/pre>\n\n\n\n<p>Edit the SNMPD and update the community string.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim \/etc\/snmp\/snmpd.conf<\/code><\/pre>\n\n\n\n<p>Replace the <strong>RANDOMSTRINGGOESHERE<\/strong> with your string.<\/p>\n\n\n\n<p>Save and exit the file<\/p>\n\n\n\n<p>Next, download and install system distribution detection script;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -o \/usr\/bin\/distro https:\/\/raw.githubusercontent.com\/librenms\/librenms-agent\/master\/snmp\/distro<\/code><\/pre>\n\n\n\n<p>Make the script executable;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x \/usr\/bin\/distro<\/code><\/pre>\n\n\n\n<p>Start and enable SNMPD services;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now snmpd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install LibreNMS Cron Job<\/h3>\n\n\n\n<p>Copy the default cron job in place;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/opt\/librenms\/librenms.nonroot.cron \/etc\/cron.d\/librenms<\/code><\/pre>\n\n\n\n<p>Enable Cron jobs log rotation;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/opt\/librenms\/misc\/librenms.logrotate \/etc\/logrotate.d\/librenms<\/code><\/pre>\n\n\n\n<p>Create global LibreNMS shortcuts;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ln -s \/opt\/librenms\/lnms \/usr\/local\/bin\/lnms<\/code><\/pre>\n\n\n\n<p>Enable LibreNMS bash completion;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/opt\/librenms\/misc\/lnms-completion.bash \/etc\/bash_completion.d\/<\/code><\/pre>\n\n\n\n<p>Import LibreNMS database schema into the database.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su - librenms<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/lnms migrate<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Update LibreNMS SELinux Policies;<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>exit<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>semanage fcontext -a -t httpd_sys_content_t '\/opt\/librenms\/html(\/.*)?'<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>semanage fcontext -a -t httpd_sys_rw_content_t '\/opt\/librenms\/(logs|rrd|storage)(\/.*)?'<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>restorecon -RFvv \/opt\/librenms<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_can_sendmail=1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_execmem 1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>chcon -t httpd_sys_rw_content_t \/opt\/librenms\/.env<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_graceful_shutdown 1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_can_network_connect 1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P httpd_can_network_relay 1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>setsebool -P nis_enabled 1<\/code><\/pre>\n\n\n\n<p>Be sure to always check the logs for any denied requests.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tail -f \/var\/log\/audit\/audit.log | grep denied<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create LibreNMS Nginx Site configuration file<\/h3>\n\n\n\n<p>Next, run the commands below to install LibreNMS Nginx site configuration. <strong>Be sure to replace the PHP-FPM socket path accordingly.<\/strong><\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\ncat > \/etc\/nginx\/conf.d\/librenms.conf << 'EOL'\nserver {\n listen      80;\n server_name librenms.kifarunix-demo.com;\n root        \/opt\/librenms\/html;\n index       index.php;\n\n charset utf-8;\n gzip on;\n 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;\n location \/ {\n  try_files $uri $uri\/ \/index.php?$query_string;\n }\n location ~ [^\/]\\.php(\/|$) {\n  fastcgi_pass unix:\/run\/php-fpm\/www.sock;\n  fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\n  include fastcgi.conf;\n  fastcgi_read_timeout 240;\n }\n location ~ \/\\.(?!well-known).* {\n  deny all;\n }\n}\nEOL\n<\/code><\/pre>\n\n\n\n<p>Change Nginx web user from <code><strong>nginx<\/strong><\/code> to <strong><code>librenms<\/code><\/strong> user;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i.bak 's\/nginx;\/librenms;\/' \/etc\/nginx\/nginx.conf<\/code><\/pre>\n\n\n\n<p>Change the PHP FPM user from <code>www-data<\/code> to <strong><code>librenms<\/code><\/strong> user created above.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i.bak 's\/= apache\/= librenms\/g' \/etc\/php-fpm.d\/www.conf<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Restart Nginx and PHP-FPM services<\/h3>\n\n\n\n<p>Verify Nginx for any syntax;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx -t<\/code><\/pre>\n\n\n\n<p>Sample output if no errors;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n<p>Restart the services;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart nginx php-fpm<\/code><\/pre>\n\n\n\n<p>Enable to run on boot;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable nginx php-fpm<\/code><\/pre>\n\n\n\n<p>Check the status;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status nginx php-fpm<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\u25cf nginx.service - The nginx HTTP and reverse proxy server\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/nginx.service; disabled; vendor preset: disabled)\n  Drop-In: \/usr\/lib\/systemd\/system\/nginx.service.d\n           \u2514\u2500php-fpm.conf\n   Active: active (running) since Tue 2022-05-31 14:20:29 -04; 6s ago\n  Process: 49866 ExecStart=\/usr\/sbin\/nginx (code=exited, status=0\/SUCCESS)\n  Process: 49860 ExecStartPre=\/usr\/sbin\/nginx -t (code=exited, status=0\/SUCCESS)\n  Process: 49857 ExecStartPre=\/usr\/bin\/rm -f \/run\/nginx.pid (code=exited, status=0\/SUCCESS)\n Main PID: 49867 (nginx)\n    Tasks: 3 (limit: 11256)\n   Memory: 5.1M\n   CGroup: \/system.slice\/nginx.service\n           \u251c\u250049867 nginx: master process \/usr\/sbin\/nginx\n           \u251c\u250049868 nginx: worker process\n           \u2514\u250049869 nginx: worker process\n\nMay 31 14:20:29 librenms.kifarunix-demo.com systemd[1]: Starting The nginx HTTP and reverse proxy server...\nMay 31 14:20:29 librenms.kifarunix-demo.com nginx[49860]: nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nMay 31 14:20:29 librenms.kifarunix-demo.com nginx[49860]: nginx: configuration file \/etc\/nginx\/nginx.conf test is successful\nMay 31 14:20:29 librenms.kifarunix-demo.com systemd[1]: Started The nginx HTTP and reverse proxy server.\n\n\u25cf php-fpm.service - The PHP FastCGI Process Manager\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/php-fpm.service; disabled; vendor preset: disabled)\n   Active: active (running) since Tue 2022-05-31 14:20:29 -04; 5s ago\n Main PID: 49863 (php-fpm)\n   Status: \"Ready to handle connections\"\n    Tasks: 6 (limit: 11256)\n   Memory: 17.2M\n   CGroup: \/system.slice\/php-fpm.service\n           \u251c\u250049863 php-fpm: master process (\/etc\/php-fpm.conf)\n           \u251c\u250049870 php-fpm: pool www\n           \u251c\u250049871 php-fpm: pool www\n           \u251c\u250049872 php-fpm: pool www\n           \u251c\u250049873 php-fpm: pool www\n           \u2514\u250049874 php-fpm: pool www\n\nMay 31 14:20:29 librenms.kifarunix-demo.com systemd[1]: php-fpm.service: Succeeded.\nMay 31 14:20:29 librenms.kifarunix-demo.com systemd[1]: Stopped The PHP FastCGI Process Manager.\nMay 31 14:20:29 librenms.kifarunix-demo.com systemd[1]: Starting The PHP FastCGI Process Manager...\nMay 31 14:20:29 librenms.kifarunix-demo.com systemd[1]: Started The PHP FastCGI Process Manager.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Finalize LibreNMS installation on Web Browser<\/h3>\n\n\n\n<p>Open Nginx web server on firewall if any is running.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --add-port={80,443}\/tcp --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Next, access LibreNMS using the url <strong>http:\/\/server-name<\/strong>.<\/p>\n\n\n\n<p>LibreNMS Pre-install Checks;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-checks.png\" class=\"td-modal-image\"><div class=\"wp-block-image\"><figure class=\"alignleft size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1328\" height=\"794\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-checks.png\" alt=\"\" class=\"wp-image-12998\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-checks.png?v=1654025403 1328w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-checks-768x459.png?v=1654025403 768w\" sizes=\"(max-width: 1328px) 100vw, 1328px\" \/><\/figure><\/div><\/a><\/div>\n\n\n\n<p>LibreNMS Database Connection Settings. We already supplied the credentials before, hence everything should be ok.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/database-connections.png\" class=\"td-modal-image\"><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1295\" height=\"718\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/database-connections.png\" alt=\"Install LibreNMS on Rocky Linux\" class=\"wp-image-12960\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/database-connections.png?v=1653851533 1295w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/database-connections-768x426.png?v=1653851533 768w\" sizes=\"(max-width: 1295px) 100vw, 1295px\" \/><\/figure><\/div><\/a><\/div>\n\n\n\n<p>Create LibreNMS Administrative User<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/create-librenms-admin-user.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1360\" height=\"809\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/create-librenms-admin-user.png\" alt=\"Install LibreNMS on Rocky Linux\" class=\"wp-image-12961\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/create-librenms-admin-user.png?v=1653851559 1360w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/create-librenms-admin-user-768x457.png?v=1653851559 768w\" sizes=\"(max-width: 1360px) 100vw, 1360px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Click <strong>Finish install<\/strong> to finalize the LibreNMS setup.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-finish-install.png\" class=\"td-modal-image\"><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1346\" height=\"747\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-finish-install.png\" alt=\"Install LibreNMS on Rocky Linux\" class=\"wp-image-12962\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-finish-install.png?v=1653851593 1346w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-finish-install-768x426.png?v=1653851593 768w\" sizes=\"(max-width: 1346px) 100vw, 1346px\" \/><\/figure><\/div><\/a><\/div>\n\n\n\n<p>Validate LibreNMS installation by clicking the <strong>validate your install<\/strong> link.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/validate-librenms-install.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1321\" height=\"948\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/validate-librenms-install.png\" alt=\"\" class=\"wp-image-12964\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/validate-librenms-install.png?v=1653851665 1321w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/validate-librenms-install-768x551.png?v=1653851665 768w\" sizes=\"(max-width: 1321px) 100vw, 1321px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>You should be redirected to the login page.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-login-page.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1232\" height=\"584\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-login-page.png\" alt=\"\" class=\"wp-image-12963\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-login-page.png?v=1653851640 1232w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-login-page-768x364.png?v=1653851640 768w\" sizes=\"(max-width: 1232px) 100vw, 1232px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Validation will then proceed and results are displayed on the dashboard.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-validations.png\" class=\"td-modal-image\"><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1896\" height=\"941\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-validations.png\" alt=\"\" class=\"wp-image-12999\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-validations.png?v=1654026906 1896w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-validations-768x381.png?v=1654026906 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/librenms-validations-1536x762.png?v=1654026906 1536w\" sizes=\"(max-width: 1896px) 100vw, 1896px\" \/><\/figure><\/div><\/a><\/div>\n\n\n\n<p>If you experience SELnux issues with fping, you can sort as follows;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>cat &gt; fping.pp &lt;&lt; 'EOL'\nmodule fping 1.0;\n\nrequire {\ntype httpd_t;\nclass capability net_raw;\nclass rawip_socket { getopt create setopt write read };\n}\n\n#============= httpd_t ==============\nallow httpd_t self:capability net_raw;\nallow httpd_t self:rawip_socket { getopt create setopt write read };\nEOL\n<\/code><\/pre>\n\n\n\n<p>Next, install the fping SELinux policy modules;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>checkmodule -M -m -o fping.mod fping.tt<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>semodule_package -o fping.pp -m fping.mod<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>semodule -i fping.pp<\/code><\/pre>\n\n\n\n<p>You may see that there is a warning about hosts having not been added to LibreNMS yet.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/add-hosts-to-librenms-server-for-monitoring\/\" target=\"_blank\" rel=\"noreferrer noopener\">Add Hosts to LibreNMS Server for Monitoring<\/a><\/p>\n\n\n\n<p>That marks the end of our tutorial on how to install LibreNMS.<\/p>\n\n\n\n<p>In the meantime, read more in the <a href=\"https:\/\/docs.librenms.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">documentation page<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-librenms-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install LibreNMS on Ubuntu 22.04\/Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/easily-install-and-setup-cacti-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Easily Install and Setup Cacti on Ubuntu 20.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow through this tutorial to learn how to install LibreNMS on Rocky Linux. LibreNMS is a fully featured MySQL\/PHP and SNMP based network monitoring system.<\/p>\n","protected":false},"author":1,"featured_media":12965,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,121],"tags":[5253,5257,5255,5254,5256],"class_list":["post-12990","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-howtos","tag-install-librenms-on-rocky-linux","tag-librenms","tag-librenms-monitoring-server","tag-rocky-linux-librenms","tag-rocky-linux-librenms-monitoring-server","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12990"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=12990"}],"version-history":[{"count":12,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12990\/revisions"}],"predecessor-version":[{"id":20486,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12990\/revisions\/20486"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/12965"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=12990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=12990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=12990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}