自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

一文學會LirbeNMS安裝~優(yōu)秀開源的SNMP設(shè)備監(jiān)控軟件

開源
這篇主要講安裝的過程,大家在使用開源軟件的時候不要抱有免費的軟件,商業(yè)的體驗的心態(tài),那是不可能的,該款軟件一樣存在很多問題,只不過在網(wǎng)絡(luò)領(lǐng)域還是比其他開源軟件要強大不少,至少在易用性、可擴展性還是不錯的。

[[391522]]

寫在前面

前面簡單介紹了該款軟件,這篇主要講安裝的過程,大家在使用開源軟件的時候不要抱有免費的軟件,商業(yè)的體驗的心態(tài),那是不可能的,該款軟件一樣存在很多問題,只不過在網(wǎng)絡(luò)領(lǐng)域還是比其他開源軟件要強大不少,至少在易用性、可擴展性還是不錯的。

正文

環(huán)境

  • 系統(tǒng)版本:CentOS 7.8
  • web:Nginx
  • PHP版本:7.3(最低7.3)
  • 數(shù)據(jù)庫:Mariadb

安裝前準備

  1. yum install epel-release yum-utils -y 
  2. yum localinstall http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y 
  3. yum-config-manager --enable remi-php74  
  4. yum install composer cronie fping git ImageMagick jwhois mariadb mariadb-server mtr MySQL-python net-snmp net-snmp-utils nginx nmap php-fpm php-cli php-common php-curl php-gd php-mbstring php-process php-snmp php-xml php-zip php-memcached php-mysqlnd python-memcached rrdtool python3 python3-pip -y 

創(chuàng)建LibreNMS用戶

  1. useradd librenms -d /opt/librenms -M -r  
  2. usermod -a -G librenms nginx 

下載LibreNMS文件

  1. cd /opt  
  2. git clone https://github.com/librenms/librenms.git 

如果大家出現(xiàn)這個問題,將上文地址由https改為git,但是非常慢

設(shè)置權(quán)限

  1. chown -R librenms:librenms /opt/librenms  
  2. chmod 770 /opt/librenms  
  3. setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/  
  4. setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/  
  5. chgrp apache /var/lib/php/session/ 

安裝PHP依賴組件

  1. su - librenms 
  2. ./scripts/composer_wrapper.php install --no-dev 
  3. exit 

安裝、配置DB

  1. yum -y install mariadb-server 
  2. systemctl start mariadb && systemctl enable mariadb 
  3. mysql -uroot -p 
  4. CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci; 
  5. CREATE USER 'librenms'@'localhost' IDENTIFIED BY 'xiaoyu123'
  6. GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'localhost'
  7. FLUSH PRIVILEGES
  8. quit 
  9. ####修改mariadb配置文件#### 
  10. vi /etc/my.cnf 
  11. innodb_file_per_table=1 
  12. lower_case_table_names=0 
  13. ####wr保存退出#### 
  14. systemctl restart mariadb 

添加配置

PHP-FPM配置

1.修改時區(qū)

  1. vi /etc/php.ini 

修改時區(qū)

2.修改php-fpm配置文件

  1. vi /etc/php-fpm.d/www.conf 
  2. ####改為如下#### 
  3. ;user = apache 
  4. user = nginx 
  5. group = apache 
  6. ;listen = 127.0.0.1:9000 
  7. listen = /run/php-fpm/php-fpm.sock 
  8. listen.owner = nginx 
  9. listen.group = nginx 
  10. listen.mode = 0660 

3.重啟php-fpm服務(wù)

  1. systemctl enable php-fpm  
  2. systemctl restart php-fpm 

配置Nginx

  1. vi /etc/nginx/conf.d/librenms.conf 
  2. ####添加如下內(nèi)容#### 
  3. server { 
  4.  listen      80; 
  5.  server_name librenms.example.com; 
  6.  root        /opt/librenms/html; 
  7.  index       index.php; 
  8.  
  9.  charset utf-8; 
  10.  gzip on
  11.  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; 
  12.  location / { 
  13.   try_files $uri $uri/ /index.php?$query_string; 
  14.  } 
  15.  location /api/v0 { 
  16.   try_files $uri $uri/ /api_v0.php?$query_string; 
  17.  } 
  18.  location ~ \.php { 
  19.   include fastcgi.conf; 
  20.   fastcgi_split_path_info ^(.+\.php)(/.+)$; 
  21.   fastcgi_pass unix:/run/php-fpm/php-fpm.sock; 
  22.  } 
  23.  location ~ /\.ht { 
  24.   deny all
  25.  } 

啟動Nginx

  1. systemctl enable nginx 
  2. systemctl restart nginx 

SNMP配置

  1. cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf 
  2. curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro  
  3. chmod +x /usr/bin/distro  
  4. systemctl enable snmpd &&systemctl restart snmpd 

計劃任務(wù)

  1. cp /opt/librenms/librenms.nonroot.cron /etc/cron.d/librenms 

復制LibreNMS配置文件

  1. cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms 

訪問前端

此時會發(fā)現(xiàn)訪問還是Nginx的界面,這里需要調(diào)整一些參數(shù)

  1. vi /etc/nginx/nginx.conf  
  2. systemctl restart nginx 

將端口改為8080

前端配置

點擊圖標進行下一步

檢查通過

填寫數(shù)據(jù)庫信息

通過之后點擊build

點擊紅框才能下一步

正常是空的dashboard

設(shè)置中文

簡單使用

新增設(shè)備

最終效果

總結(jié)

該軟件部署較為復雜,如果僅僅想體驗可以試試容器版本,目前官方提供apache和nginx兩種版本,容器版本使用起來設(shè)備如果不多還是可以的,當然如果有一定基礎(chǔ)的可以自行安裝,但該軟件的特點主要使用簡單,監(jiān)控項細致,但目前該軟件還是存在一定的問題,例如華為WLAN部分access user顯示有一定問題,預測是后臺的mib邏輯調(diào)用存在異常導致,另外負載也有相對應(yīng)的問題,所以大家如果想用,不妨先測試,最終決定是否使用。

 

責任編輯:姜華 來源: 今日頭條
相關(guān)推薦

2021-03-26 08:07:25

LibreNMS開源監(jiān)控軟件

2020-08-03 08:01:50

爬蟲技巧

2021-03-29 08:24:18

KubeadmKubernetes1運維

2020-08-31 06:54:37

注解脫敏ELK

2021-06-28 14:13:34

OOM內(nèi)存事故

2020-04-20 10:47:57

Redis數(shù)據(jù)開發(fā)

2021-04-30 07:33:35

效率提升技巧

2021-04-28 07:22:13

HiveJson數(shù)組

2021-06-26 09:26:01

Jupyter主題目錄

2021-08-04 07:47:18

IDEJTAGSWD

2025-01-14 00:00:00

場景線程數(shù)據(jù)

2019-03-21 09:45:11

TypeScript編程語言Javascript

2023-11-01 10:49:50

Python面向?qū)ο?/a>

2020-04-19 21:41:13

Python數(shù)據(jù)可視化

2023-09-26 12:22:37

隊列Python

2023-07-31 08:18:50

Docker參數(shù)容器

2019-11-12 09:15:18

MySQL復制拓撲Orchestrato

2021-07-30 06:51:28

Nginx運維web

2022-09-28 09:32:29

自動駕駛算法

2024-09-26 09:10:08

點贊
收藏

51CTO技術(shù)棧公眾號