zoukankan      html  css  js  c++  java
  • Linux下的网络管理工具—OpenNMS

     OpenNMS的是一个运营商级别的,高度集成的,开放源码的平台,用于构建网络监控解决方案。OpenNMS有两个发行版:Meridian and Horizon。使用Meridian是可取的,对企业提供稳定和长期的支持。Horizon是创新迅速产生的,是理想的监测新技术和新的IT生态系统的发行版。这两个分布是完全开源的。

    www.linuxprobe.com-opennms

    1、 OpenNMS安装准备

    环境:CentOS 7.2

    更新源:

    yum -y install yum-plugin-priorities epel-release centos-release-scl-rh centos-release-scl
    yum update -y

    官方网站:http://www.opennms.org/en

    官方wiki:http://wiki.opennms.org/wiki/Installation:Yum

    卸载opennms源:https://yum.opennms.org/repofiles/opennms-repo-RELEASE-DISTRIBUTION.noarch.rpm

    root@linuxprobe[11:09:27]:/usr/local/src$wget http://yum.opennms.org/repofiles/opennms-repo-stable-rhel7.noarch.rpm
    root@linuxprobe[11:09:27]:/usr/local/src$rpm -ivh opennms-repo-stable-rhel7.noarch.rpm
    root@linuxprobe[12:51:26]:~$rpm --import http://yum.opennms.org/repofiles/OPENNMS-GPG-KEY
    2、 为OpenNMS安装数据库

    #安装 PostgreSQL

    yum -y install postgresql-server

    #初始化PostgreSQL

    postgresql-setup initdb

    #修改postgrasql.conf

    root@linuxprobe[08:56:17]:~$vim /var/lib/pgsql/data/postgresql.conf

    # line 59: 设置允许所有地址访问psotgresql

    listen_addresses = '*'

    # line 395: 设置日志格式

    log_line_prefix = '%t %u %d '

    #psotgresql启动并设置开机自启

    root@linuxprobe[08:56:37]:~$systemctl start postgresql && systemctl enable postgresql
    3、 PostgreSQL设置

    #允许用户访问数据库

    root@linuxprobe[09:15:44]:~$sed -i 's/all 127.0.0.1/32 ident/all 127.0.0.1/32 trust/g' /var/lib/pgsql/data/pg_hba.conf
    root@linuxprobe[09:28:45]:~$sed -i 's/all ::1/128 ident/all ::1/128 trust/g' /var/lib/pgsql/data/pg_hba.conf

    #重启PostgreSQL

    root@linuxprobe[09:29:06]:~$systemctl restart postgresql
    4、 安装JDK

    #OpenNMS 16需要安装java 8

    #jdk下载地址:http://www.oracle.com/technetwork/java/javase/downloads

    #上传到服务器/usr/local/src下

    root@linuxprobe[10:23:45]:/usr/local/src$rpm -ivh jdk-8u101-linux-x64.rpm

    08-04-01

    5、 安装OpenNMS
    root@linuxprobe[12:51:26]:~$yum install opennms –y

    08-04-02#配置java

    root@linuxprobe[14:02:33]:~$/opt/opennms/bin/runjava -S /usr/java/latest/bin/java
    runjava: checking specified JRE: "/usr/java/latest/bin/java"...
    runjava: specified JRE is good.
    runjava: value of "/usr/java/latest/bin/java" stored in configuration file
    6、 创建或更新opennms数据库
    root@linuxprobe[14:06:07]:~$/opt/opennms/bin/install -dis

    #-d 更新数据库

    #-i 导入数据

    #-s 为OpenNMS创建存储过程
    08-04-03

    7、 IPLIKE配置

    #OpenNMS使用PostgreSQL被称为”iplike“的存储过程来提供一个API,轻松地执行复杂的IP地址查询。默认情况下,安装一个版本的iplike,兼容所有版本的OpenNMS,为了性能方面考虑,建议使用yum安装。

    yum -y install iplike

    #查看iplike帮助

    /usr/sbin/install_iplike.sh –h
    
    8、 防火墙设置

    #开启端口

    iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8980 -j ACCEPT

    #禁用防火墙

    /sbin/service iptables stop
    systemctl disable iptables

    #重启iptables

    /sbin/service iptables restart
    9、 启动OpenNMS并在浏览器中访问
    systemctl opennms restart

    http://YOUR-OPENNMS-IP:8980/opennms/
    08-04-04 08-04-05

    本文转载地址:https://www.linuxprobe.com/opennms-manager-network-linux.html

  • 相关阅读:
    【leetcode】1215.Stepping Numbers
    【leetcode】1214.Two Sum BSTs
    【leetcode】1213.Intersection of Three Sorted Arrays
    【leetcode】1210. Minimum Moves to Reach Target with Rotations
    【leetcode】1209. Remove All Adjacent Duplicates in String II
    【leetcode】1208. Get Equal Substrings Within Budget
    【leetcode】1207. Unique Number of Occurrences
    【leetcode】689. Maximum Sum of 3 Non-Overlapping Subarrays
    【leetcode】LCP 3. Programmable Robot
    【leetcode】LCP 1. Guess Numbers
  • 原文地址:https://www.cnblogs.com/linuxprobe/p/5747923.html
Copyright © 2011-2022 走看看