-  [pinpoint 1.8.4] 설치 준비 - hbase 1.2.7 standalone

  -  [pinpoint 1.8.4] 설치 준비 - tomcat 9.0.24

  -  [pinpoint 1.8.4] 설치 - web, collector, agent, ...

 



 

 

http://naver.github.io/pinpoint/1.8.4/main.html

https://github.com/naver/pinpoint/blob/master/doc/overview.md

 

 

 

 

 

* 설치 계획

  하나의 machine에 모두 설치.

  pinpoint의 quickstart 사용 안함.

  (편하게 quickstart 로 할 경우 참고 : https://github.com/naver/pinpoint/tree/master/quickstart )

 

  - 버전

    hbase 1.2.7 (openjdk 8)

    pinpoint 1.8.4 (openjdk 11) : agent, collector, web

 

  - 구성

    agent ---> collector ---> hbase <--- web(s)

        agent : spring boot와 같이 올라감

        collector : tomcat 에 설치

        hbase : 데이터 저장

        web : 데이터 조회

 

 

 

* HBase 1.2.7 설치

1.2+ 버전은 jdk 8 : http://hbase.apache.org/book.html#java
단일모드 설치 (hdfs 사용하지 않고 로컬 파일 시스템 사용. hadoop, zookeeper 불필요)

https://hbase.apache.org/book.html#quickstart

 

 

- openjdk 8 설치

# 설치 가능 목록 확인
> yum list java-1.8.0-openjdk-devel*

java-1.8.0-openjdk-devel.i686                           1:1.8.0.222.b10-0.el7_6                    updates
java-1.8.0-openjdk-devel.x86_64                         1:1.8.0.222.b10-0.el7_6                    updates
java-1.8.0-openjdk-devel-debug.i686                     1:1.8.0.222.b10-0.el7_6                    updates
java-1.8.0-openjdk-devel-debug.x86_64                   1:1.8.0.222.b10-0.el7_6                    updates
[user1@localhost ~]$


# 설치
# java-1.8.0-openjdk 는 JRE, java-1.8.0-openjdk-devel은 JDK
> sudo yum -y install java-1.8.0-openjdk-devel.x86_64

pinpoint 및 application(agent + spring boot)는 openjdk 11 을 사용할 것이기 때문에 따로 JAVA_HOME 을 설정하지 않음.

설치된 경로 : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/

설치된 경로 확인 : rpm -ql java-1.8.0-openjdk-devel.x86_64

 

 

- hbase 설치

-- 다운로드 ( http://archive.apache.org/dist/hbase/ ) 

# 다운로드
> wget http://archive.apache.org/dist/hbase/1.2.7/hbase-1.2.7-bin.tar.gz -P /home/user1/pinpoint 
> cd /home/user1/pinpoint 
> tar xvfz hbase-1.2.7-bin.tar.gz 

# 편의상 링크 파일 사용 
> ln -s /home/user1/pinpoint/hbase-1.2.7 /home/user1/pinpoint/hbase 

 



-- hbase-env.sh 설정

> vi hbase/conf/hbase-env.sh 

JAVA_HOME 추가

 26 # The java implementation to use.  Java 1.7+ required. 
 27 # export JAVA_HOME=/usr/java/jdk1.6.0/ 
 28 export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/

 

java 8에서 사용되지 않는 Perm 옵션 제거

 46 # Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
 47 #export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeC    acheSize=256m"
 48 #export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:R    eservedCodeCacheSize=256m"
 49 export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:ReservedCodeCacheSize=256m"
 50 export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:ReservedCodeCacheSize=256m"

 

 

-- hbase-site.xml 설정 : 데이터 저장 위치

> vi hbase/conf/hbase-site.xml

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///home/user1/pinpoint/hbase-data/data</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/user1/pinpoint/hbase-data/zookeeper</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
    <description>
      Controls whether HBase will check for stream capabilities (hflush/hsync).

      Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
      with the 'file://' scheme, but be mindful of the NOTE below.

      WARNING: Setting this to false blinds you to potential data loss and
      inconsistent system state in the event of process and/or node failures. If
      HBase is complaining of an inability to use hsync or hflush it's most
      likely not a false positive.
    </description>
  </property>
</configuration>

 

# 디렉토리 생성(hbase.rootdir 은 자동생성되므로 zookeeper 폴더만 생성)

> mkdir -p /home/user1/pinpoint/hbase-data/zookeeper

 

 

-- hbase 구동

# hbase 시작
> hbase/bin/start-hbase.sh

# hbase 중지
> hbase/bin/stop-hbase.sh

 

 

- 참고

listen port

tcp6       0      0 :::2181                 :::*                    LISTEN      4694/java
tcp6       0      0 :::16010                :::*                    LISTEN      4694/java
tcp6       0      0 :::40338                :::*                    LISTEN      4694/java
tcp6       0      0 127.0.0.1:44115         :::*                    LISTEN      4694/java
tcp6       0      0 127.0.0.1:45375         :::*                    LISTEN      4694/java

2181 : 클라이언트가 ZooKeeper 연결에 사용하는 포트

16010 : HBase 마스터 웹 포트