再安裝用過Cacti、Whatsup、Zabbix後目前覺得此套介面最好用
目前還在摸索中
安裝筆記如下:
環境:CentOS 7.4 mini
yum install mariadb-server mariadb
systemctl start mariadb
firewall-cmd --permanent --add-service=mysql
firewall-cmd --reload
mysql_secure_installation
mysql_secure_installation
Enter current password for root (enter for none): 第一次設定,直接按 Enter 鍵即可
Set root password? [Y/n] 按 Y 設定資料庫 root 密碼
New password: 輸入新密碼
Re-enter new password: 再次輸入新密碼
Password updated successfully!
建立資料庫使用者與權限
mysql -u root -p
CREATE USER 'librenmsuser'@'localhost' IDENTIFIED BY 'librenmspassword';
GRANT ALL PRIVILEGES ON librenmsdb.* TO 'librenmsuser'@'localhost';
FLUSH PRIVILEGES;
exit;
設定資料庫參數
[mysqld]
innodb_file_per_table=1
sql-mode=""PRIVILEGES;
exit;
設定開機時自動啟動服務,重啟服務套用設定
systemctl enable mariadb
systemctl restart mariadb
安裝LibreNMS
安裝epel套件
yum install epel-release
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安裝PHP7、net-snmp、httpd套件
yum -y install php70w php70w-cli php70w-gd php70w-mysql php70w-snmp php70w-pear php70w-curl php70w-common httpd net-snmp mariadb ImageMagick jwhois nmap mtr rrdtool MySQL-python net-snmp-utils cronie php70w-mcrypt fping git vim
pear install Net_IPv4-1.3.4
pear install Net_IPv6-1.2.2b2
設定Git 套件 設定使用者名稱與信箱
git config --global user.name "username"
git config --global user.email user@email.com
設定PHP
vim /etc/php.ini
date.timezone = "Asia/Taipei"
由GIT安裝LibreNMS
cd /opt
git clone https://github.com/librenms/librenms.git librenms
#Add librenms user
useradd librenms -d /opt/librenms -M -r
usermod -a -G librenms apache
cd /opt/librenms
mkdir rrd logs
chmod 775 rrd
設定Apache Config
vim /etc/httpd/conf.d/librenms.conf
DocumentRoot /opt/librenms/html/
ServerName librenms.example.com
CustomLog /opt/librenms/logs/access_log combined
ErrorLog /opt/librenms/logs/error_log
AllowEncodedSlashes NoDecode
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
設定防火牆開啟服務
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
設定開機時自動啟動Httpd服務,重啟服務套用設定
systemctl enable httpd
systemctl start httpd