Homer安装

安装方法可分为三种,本文采用快速安装步骤,官方安装连接如下
https://github.com/sipcapture/homer/wiki/Quick-Install#-manual-install

本文安装步骤如下
wget https://github.com/sipcapture/homer-installer/raw/master/homer_installer.sh
chmod +x homer_installer.sh
./homer_installer.sh
安装依赖包:
yum -y install wget curl git lsb*
注意:以上依赖包安装完成以后需要将homer_install.sh文件中
137行里的minimal_command_list=“lsb-release wget curl git”
lsb-release去掉
(可以尝试 yum install -y redhat-lsb)
然后再执行这个shell安装脚本
否则一直会报错,让安装lsb-release wget curl git
安装有homer-app、heplify-server、postgres
配置heplify-server配置相关参数

/opt/heplify-server/heplify-server.toml
HEPAddr               = "0.0.0.0:9060"   本机地址和端口号
HEPTCPAddr            = ""
HEPTLSAddr            = "0.0.0.0:9060"    
HEPWSAddr             = "0.0.0.0:3000"
DBDriver              = "postgres"
DBAddr                = "localhost:5432"
DBUser                = "postgres"
DBPass                = ""
DBDataTable           = "homer_data"
DBConfTable           = "homer_config"
Config                = "./heplify-server.toml"

Homer配置数据库参数


/usr/local/homer/etc/webapp_config.json
{
  "database_data": {
    "LocalNode": {
      "help": "Settings for PGSQL Database (data)",
      "node": "LocalNode",
      "user": "homer_user",
      "pass": "homer_password",
      "name": "homer_data",
      "keepalive": true,
      "host": "127.0.0.1"
    }
  },
  "hep_relay": {
    "help": "UDP socket to send HEP data on",
    "host": "127.0.0.1",
    "port": 9060
  },
  "database_config": {
    "help": "Settings for PGSQL Database (settings)",
    "node": "LocalConfig",
    "user": "homer_user",
    "pass": "homer_password",
    "name": "homer_config",
    "keepalive": true,
    "host": "localhost"
  },
  "influxdb_config": {
    "help": "Settings for InfluxDB Database (optional)",
    "user": "influx_user",
    "pass": "influx_password",
    "name": "homer_config",
    "host": "http://127.0.0.1:8086",
    "database": "homer",
    "policy": "autogen"
  },
  "prometheus_config": {
    "help": "Settings for Prometheus Database (optional)",
    "user": "admin",
    "pass": "admin",
    "host": "http://127.0.0.1:9090",
    "api": "api/v1"
  },
  "loki_config": {
    "help": "Settings for LOKI Database (optional)",
    "user": "admin",
    "pass": "admin",
    "host": "http://127.0.0.1:3100",
    "api": "loki/api/v1",
    "param_query": "query_range"
  },
  "grafana_config": {
    "help": "Settings for Grafana",
    "host": "http://127.0.0.1:3000",
    "path": "/grafana",
    "token": ""
  },
  "http_settings": {
    "help": "Settings for the HOMER Webapp Server. If you have gzip_static = false, please be sure that your dist directory has uncompressed .js files",
    "host": "0.0.0.0",
    "port": 9080,
    "root": "/usr/local/homer/dist",
    "gzip": true,
    "gzip_static": true,
    "debug": false
  },
  "transaction_settings": {
    "deduplicate": {
        "global": false
    }
  },
  "https_settings": {
    "help": "SSL settings for homer-app",
    "enable": false,
    "host": "0.0.0.0",
    "port": 443,
    "cert": "/usr/local/homer/tls/cert.pem",
    "key": "/usr/local/homer/tls/key.pem"
  },
  "system_settings": {
    "help": "Settings for HOMER logs",
    "logpath": "/usr/local/homer/log",
    "logname": "homer-app.log",
    "_loglevels": "can be: fatal, error, warn, info, debug, trace",
    "loglevel": "error",
    "logstdout": false
  },
  "auth_settings": {
    "_comment": "The type param can be internal, ldap, http_auth",
    "type": "internal",
    "token_expire": 1200
  },
  "ldap_config": {
    "base": "dc=example,dc=com",
    "host": "ldap.example.com",
    "port": 389,
    "usessl": false,
    "skiptls": true,
    "binddn": "uid=readonlysuer,ou=People,dc=example,dc=com",
    "bindpassword": "readonlypassword",
    "userfilter": "(uid=%s)",
    "groupfilter": "(memberUid=%s)",
    "groupattribute": "cn",
    "admingroup": "admin",
    "adminmode": true,
    "usergroup": "HOMER_user",
    "usermode": true,
    "attributes": ["dn", "givenName", "sn", "mail", "uid"],
    "skipverify": true,
    "anonymous": false,
    "userdn": "uid=%s,ou=People,dc=example,dc=com"
  },
  "http_auth": {
    "url": "http://localhost:1323",
    "skipverify": true
  },
  "decoder_shark": {
    "_comment": "Here you can do packet decoding to using tshark application. Please define uid, gid if you run the app under root",
    "active": false,
    "bin": "/usr/bin/tshark",
    "protocols": ["1_call", "1_registration", "1_default"]
  }
}

sipcapture采用heplify
下载地址为https://github.com/sipcapture/heplify
相关命令如下

# Capture SIP and RTCP packets on any interface and send them to 127.0.0.1:9060
./heplify

# Capture SIP and RTCP packets on any interface and send them via TLS to 192.168.1.1:9060
./heplify -hs 192.168.1.1:9060 -nt tls

# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060. Use a someNodeName
./heplify -hs 192.168.1.1:9060 -hn someNodeName

# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060. Print info to stdout
./heplify -hs 192.168.1.1:9060 -e

# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060 and 192.168.2.2:9060
./heplify -hs "192.168.1.1:9060,192.168.2.2:9060"

# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060. Print debug selectors
./heplify -hs 192.168.1.1:9060 -e -d fragment,payload,rtcp

# Capture SIP and RTCP packets with custom SIP port range on eth2 and send them to 192.168.1.1:9060
./heplify -i eth2 -pr 6000-6010 -hs 192.168.1.1:9060

# Capture SIP and RTCP packets on eth2, send them to homer and compressed to /srv/pcapdumps/
./heplify -i eth2 -hs 192.168.1.1:9060 -wf /srv/pcapdumps/ -zf

# Read example/rtp_rtcp_sip.pcap and send SIP and correlated RTCP packets to 192.168.1.1:9060
./heplify -rf example/rtp_rtcp_sip.pcap -hs 192.168.1.1:9060

# Capture and send packets except SIP OPTIONS and NOTIFY to 192.168.1.1:9060.
./heplify -hs 192.168.1.1:9060 -dim OPTIONS,NOTIFY
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值