PINPOINT 环境搭建

Posted itsre

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PINPOINT 环境搭建相关的知识,希望对你有一定的参考价值。

环境准备

[[email protected] pp_res]# ls -l
total 368012
-rw-r--r--. 1 root root 9277365 Dec 6 23:07 apache-tomcat-8.0.36.tar.gz
-rw-r--r--. 1 root root 103847513 Dec 6 23:07 hbase-1.0.3-bin.tar.gz
-rw-r--r--. 1 root root 16984 Dec 6 23:07 hbase-create.hbase
-rw-r--r--. 1 root root 153512879 Dec 6 23:07 jdk-7u79-linux-x64.tar.gz
drwxr-xr-x. 2 root root 107 Dec 7 09:22 pinpoint-1.5.2
-rw-r--r--. 1 root root 6621915 Dec 6 23:07 pinpoint-agent-1.5.2.tar.gz
-rw-r--r--. 1 root root 31339914 Dec 6 23:07 pinpoint-collector-1.5.2.war
-rw-r--r--. 1 root root 54505168 Dec 6 23:07 pinpoint-web-1.5.2.war
-rw-r--r--. 1 root root 3094 Dec 7 09:20 pp-collector.init
-rw-r--r--. 1 root root 3082 Dec 7 09:21 pp-web.init
-rw-r--r--. 1 root root 17699306 Dec 6 23:07 zookeeper-3.4.6.tar.gz

配置hbase

 # 修改 hbase-env.sh 的 JAVA_HOME 环境变量位置

# vim conf/hbase-env.sh

[[email protected] hbase-1.0.3]# vim conf/hbase-env.sh
[[email protected] hbase-1.0.3]# egrep -v ‘#|^$‘ conf/hbase-env.sh | grep JAVA_HOME
export JAVA_HOME=/opt/app/jdk1.7.0_71


# 修改Hbase的配置信息 
# vim conf/hbase-site.xml
<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///opt/app/pinpoint/hbase-1.0.3</value>
  </property>
</configuration>

# 启动HBASE
# ./bin/start-hbase.sh

[[email protected] hbase-1.0.3]# ./bin/start-hbase.sh
starting master, logging to /opt/app/pinpoint/hbase-1.0.3/bin/../logs/hbase-root-master-server01-node01.out

# 验证hbase是否启动成功
# jps

[[email protected] hbase-1.0.3]# jps
1785 Jps
1496 HMaster # HMaster 启动说明hbase服务已经启动

# 初始化Hbase的pinpoint库 
# ./bin/hbase shell ~/hbase-create.hbase

# 进入hbase

[[email protected] hbase-1.0.3]# ./bin/hbase shell
2017-12-07 09:49:12,651 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell; enter ‘help<RETURN>‘ for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.0.3, rf1e1312f9790a7c40f6a4b5a1bab2ea1dd559890, Tue Jan 19 19:26:53 PST 2016

hbase(main):001:0>

# 查询表是否存在
hbase(main):001:0> status ‘detailed‘ version 1.0.3 0 regionsInTransition master coprocessors: [] 1 live servers localhost:46410 1512610981565 requestsPerSecond=0.0, numberOfOnlineRegions=82, usedHeapMB=17, maxHeapMB=493, numberOfStores=210, numberOfStorefiles=0, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=1356, writeRequestsCount=164, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[MultiRowMutationEndpoint]
# 验证hbase服务 http://192.168.90.2:16010/master-status

安装pinpoint

# ----------- 安装pinpoint-collector -----------
# 修改Tomcat 配置
# vim conf/server.xml

# sed -i ‘s/port="8005"/port="18005"/g‘ server.xml
# sed -i ‘s/port="8080"/port="18080"/g‘ server.xml
# sed -i ‘s/port="8443"/port="18443"/g‘ server.xml
# sed -i ‘s/port="8009"/port="18009"/g‘ server.xml
# sed -i ‘s/redirectPort="8443"/redirectPort="18443"/g‘ server.xml
# sed -i "s/localhost/`ip addr | grep ‘enp0s3‘ | grep inet | awk -F‘/‘ ‘{print $1}‘ | awk -F‘ ‘ ‘{print $2}‘`/g" server.xml


# 部署war包
# unzip ~/pinpoint/pinpoint-collector-1.5.2.war -d ./webapps/ROOT

# 启动server
# sh ~/shell/pinpoint-collector.sh start

# ----------- 安装pinpoint-web -----------
# 修改Tomcat 配置
# vim conf/server.xml**

# sed -i ‘s/port="8005"/port="28005"/g‘ server.xml
# sed -i ‘s/port="8080"/port="28080"/g‘ server.xml
# sed -i ‘s/port="8443"/port="28443"/g‘ server.xml
# sed -i ‘s/port="8009"/port="28009"/g‘ server.xml
# sed -i ‘s/redirectPort="8443"/redirectPort="28443"/g‘ server.xml
# sed -i "s/localhost/`ip addr | grep ‘enp0s3‘ | grep inet | awk -F‘/‘ ‘{print $1}‘ | awk -F‘ ‘ ‘{print $2}‘`/g" server.xml

# 部署war包
# unzip ~/pinpoint/pinpoint-web-1.5.2.war -d ./webapps/ROOT

# 启动server
# sh ~/shell/pinpoint-web.sh start

  

 

以上是关于PINPOINT 环境搭建的主要内容,如果未能解决你的问题,请参考以下文章

搭建pinpoint测试环境

PINPOINT 环境搭建

pinpoint2.5.0环境搭建监控预警钉钉推送

Pinpoint在Win7下搭建

Spring cloud微服务安全实战-7-11PinPoint+SpringBoot环境搭建

Docker下,极速体验pinpoint1.6.3