pinpoint部署文檔

準備

  • jdk-1.8.0.31
  • tomcat-8.5.0
  • hbase-1.0.3
  • pinpoint-1.5.2
  • zookeeper-3.4.6

安裝啓動hbase 192.168.110.6

單機模式安裝hbase,zookeeper地址192.168.110.11:2181java

  1. 下載hbase-1.0.3git

    cd /opt
    wget http://apache.fayea.com/hbase/hbase-1.0.3/hbase-1.0.3-bin.tar.gz
  2. 解壓github

    tar -zxvf hbase-1.0.3-bin.tar.gz
  3. 修改配置web

    • /opt/hbase-1.0.3/conf/hbase-site.xmlshell

      單機模式,只要修改hbase.rootdir就能夠了數據庫

      <configuration>
          <property>
            <name>hbase.rootdir</name>
            <value>file:///data/hbase</value>
          </property>
          <!--若是使用hbase內置的zookeeper能夠不用設置-->
          <property>
            <name>hbase.zookeeper.quorum</name>
            <name>192.168.110.11</name>
          </property
      </configuration>
    • /opt/hbase-1.0.3/conf/hbase-env.shapache

      export JAVA_HOME=/opt/jdk/
      #不讓hbase實用內置的zookeeper
      export HBASE_MANAGES_ZK=false
  4. hosts設置servicename和IP的映射bootstrap

    127.0.0.1       localhost
    192.168.110.6   i-lwmgxoad
  5. 啓動hbasevim

    /opt/hbase-1.0.3/bin/start-hbase.sh
  6. 初始化數據庫tomcat

    ./hbase.sh shell
    
    https://github.com/naver/pinpoint/blob/master/hbase/scripts/hbase-create.hbase

啓動pinpoint-collector 192.168.110.8

  1. 下載pinpotint-collector-

    wget https://github.com/naver/pinpoint/releases/download/1.5.2/pinpoint-collector-1.5.2.war
  2. 解壓到tomcat

    unzip -d pinpoint-collector-1.5.2.war /opt/apache-tomcat-8.5.0/webapps/ROOT
  3. 修改pinpoint-collector配置

    • /opt/apache-tomcat-8.5.0/webapps/ROOT/WEB-INF/classes/hbase.properties
      hbase.client.host=192.168.110.11
      hbase.client.port=2181
    • /opt/apache-tomcat-8.5.0/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
      cluster.zookeeper.address=192.168.110.11

啓動pinpoint-web 192.168.110.14

  1. 修改pinpoint-web配置
    • /opt/apache-tomcat-8.5.0/webapps/ROOT/WEB-INF/classes/hbase.properties
      hbase.client.host=192.168.110.11
      hbase.client.port=2181
    • /opt/apache-tomcat-8.5.0/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
      cluster.zookeeper.address=192.168.110.11
  2. 配置hbase.properties

配置pinpoint-agent wget

  1. 下載pinpoint-agent

    wget https://github.com/naver/pinpoint/releases/download/1.5.2/pinpoint-agent-1.5.2.tar.gz
  2. 解壓

    $ unzip -d pinpoint-agent-1.5.2.war /opt/
  3. 修改pinpoint-agent配置

    $ vim /opt/pinpoint-agent-1.5.2/pinpoint.config
    
    #pinpoint-collector地址
    profiler.collector.ip=192.168.110.8
  4. 啓動

  • java 啓動

    $ java 
        -javaagent:/opt/pinpoint-agent-1.5.2/pinpoint-bootstrap-1.5.2.jar 
        -Dpinpoint.agentId=1 //應用的ID,同一個應用id不要相同
        -Dpinpoint.applicationName=marketing_management  //定義的應用名稱
        -jar 
        /opt/marketmanage/marketmanage.jar
  • tomcat啓動

    $ vim /opt/tomcat/bin/catalina.sh
    AGENT_ID="1"
    APPLICATION_NAME="marketing_management"
    AGENT_PATH="/opt/pinpoint-agent-1.5.2"
    
    CATALINA_OPTS="$CATALINA_OPTS -javaagent:$AGENT_PATH/pinpoint-bootstrap-1.5.2.jar"
    CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=$AGENT_ID"
    CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=$APPLICATION_NAME"
相關文章
相關標籤/搜索