Pinpoint分佈式APM安裝部署

爲了方便測試,咱們在一臺機器上安裝所需有的軟件

部署時間:2019-03-25html

須要的軟件及版本


軟件名稱 版本號
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.htmljava

  • 安裝HBase

詳見https://qianmoq.com/hbase/hbase_an_zhuang_bu_shu.htmlgit

初始化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配置爲falsegithub

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

hbase.client.host修改成hbase服務地址web

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

其餘配置先不變使用默認便可數據庫

  • 重啓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配置爲falseapache

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

hbase.client.host修改成hbase服務地址bootstrap

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

其餘配置先不變使用默認便可

  • 重啓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頁面便可看到監控信息


相關文章
相關標籤/搜索