Pinpoint分布式APM安装部署

为了方便测试,咱们在一台机器上安装所需有的软件html

部署时间:2019-03-25java

须要的软件及版本


软件名称 版本号
pinpoint系列(web, collector, agent) 1.8.2(当前latest)
tomcat 7.0.93
hbase 2.1.3

下载所需软件


  • 下载pinpoint
wget https://github.com/naver/pinpoint/releases/download/1.8.2/pinpoint-agent-1.8.2.tar.gz
wget https://github.com/naver/pinpoint/releases/download/1.8.2/pinpoint-collector-1.8.2.war
wget https://github.com/naver/pinpoint/releases/download/1.8.2/pinpoint-web-1.8.2.war
  • 下载pinpoint针对hbase数据库初始化文件
wget https://raw.githubusercontent.com/naver/pinpoint/master/hbase/scripts/hbase-create.hbase

安装基础软件


  • 安装tomcat

详见https://qianmoq.com/tomcat/tomcat_an_zhuang_bu_shu.htmlgit

  • 安装HBase

详见https://qianmoq.com/hbase/hbase_an_zhuang_bu_shu.htmlgithub

初始化ponpint数据库


  • 登陆到hbase服务器中执行如下命令
hbase-2.1.3/bin/hbase shell ./hbase-create.hbase

安装pinpoint-collector


  • 修改pinpoint-collector.properties配置文件
vim apache-tomcat-7.0.93/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties

暂时修改cluster.enable配置为falseweb

  • 修改hbase.properties配置文件
vim apache-tomcat-7.0.93/webapps/ROOT/WEB-INF/classes/hbase.properties

hbase.client.host修改成hbase服务地址shell

hbase.client.port修改成hbase的zk地址数据库

其余配置先不变使用默认便可apache

  • 重启tomcat服务
apache-tomcat-7.0.93/bin/shutdown.sh
apache-tomcat-7.0.93/bin/startup.sh

安装pinpoint-web


  • 修改apache-tomcat-7.0.93/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties配置文件
vim apache-tomcat-7.0.93/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties

暂时修改cluster.enable配置为falsebootstrap

  • 修改hbase.properties配置文件
vim apache-tomcat-7.0.93/webapps/ROOT/WEB-INF/classes/hbase.properties

hbase.client.host修改成hbase服务地址vim

hbase.client.port修改成hbase的zk地址

其余配置先不变使用默认便可

  • 重启tomcat服务
apache-tomcat-7.0.93/bin/shutdown.sh
apache-tomcat-7.0.93/bin/startup.sh

部署pinpoint-agent


  • 解压pinpoint-agent-1.8.2.tar.gz文件
tar -xvzf pinpoint-agent-1.8.2.tar.gz -C pinpoint-agent

使用pinpoint监听collector,web的tomcat容器


  • 修改pinpoint.config配置文件
vim pinpoint-agent/pinpoint.config

修改profiler.collector.ip为collector服务的地址

其余的配置暂时不修改

配置tomcat使用pinpoint监听服务


  • 修改catalina.sh启动文件
vim apache-tomcat-7.0.93/bin/catalina.sh

在文件中增长如下配置

CATALINA_OPTS="$CATALINA_OPTS -javaagent:/hadoop/dc/apm/pinpoint-agent/pinpoint-bootstrap-1.8.2.jar"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=pinpoint-agent-001"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=PinpointWebServer"

pinpoint.agentId: 只要保证每一个应用不重复便可 pinpoint.applicationName: 如今是pinpoint中的名称,能去分开便可

  • 重启tomcat服务
apache-tomcat-7.0.93/bin/shutdown.sh
apache-tomcat-7.0.93/bin/startup.sh

浏览器打开pinpoint的web页面便可看到监控信息


相关文章
相关标签/搜索