# HBASE 1.2.7 설치 (1.2+ 버전은 jdk 8)

[Download URL : http://archive.apache.org/dist/hbase/]

Pinpoint]$ wget http://archive.apache.org/dist/hbase/1.2.7/hbase-1.2.7-bin.tar.gz
--2020-07-27 13:38:47--  http://archive.apache.org/dist/hbase/1.2.7/hbase-1.2.7-bin.tar.gz
Resolving archive.apache.org (archive.apache.org)... 138.201.131.134
Connecting to archive.apache.org (archive.apache.org)|138.201.131.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 75830184 (72M) [application/x-gzip]
Saving to: ‘hbase-1.2.7-bin.tar.gz’

hbase-1.2.7-bin.tar.gz    100%[==============================================>]  72.32M  4.18MB/s    in 25s

2020-07-27 13:39:12 (2.93 MB/s) - ‘hbase-1.2.7-bin.tar.gz’ saved [75830184/75830184]

 hbase를 원하는 경로에 다운로드 한다.

 

Pinpoint]$ tar -zxvf hbase-1.2.7-bin.tar.gz
x hbase-1.2.7/CHANGES.txt
x hbase-1.2.7/README.txt
x hbase-1.2.7/conf/
x hbase-1.2.7/conf/hbase-policy.xml
x hbase-1.2.7/conf/hadoop-metrics2-hbase.properties
x hbase-1.2.7/conf/regionservers
                 .
                 .
                 .
                 .
                 .
x hbase-1.2.7/lib/commons-daemon-1.0.13.jar
x hbase-1.2.7/lib/libthrift-0.9.3.jar
x hbase-1.2.7/lib/jruby-complete-1.6.8.jar
x hbase-1.2.7/lib/spymemcached-2.11.6.jar

 hbase  압축해제 한다.

 

- /hbase-1.2.7/conf/hbase-site.xml 설정

vi ./hbase-1.2.7/conf/hbase-site.xml
<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///home/devcomm/Pinpoint/hbase-1.2.7/data</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/devcomm/Pinpoint/hbase-1.2.7/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>

 

- data, zookeeper 폴더 생성

mkdir /home/devcomm/Pinpoint/hbase-1.2.7/data

mkdir /home/devcomm/Pinpoint/hbase-1.2.7/zookeeper

 

- /hbase-1.2.7/conf/hbase-env.sh 설정

vi ./hbase-1.2.7/conf/hbase-env.sh

 

- JAVA_HOME 추가 및 Java 8에서 사용되지 않는 Perm 옵션 제거

# Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
#export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"
#export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=256m"

export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:ReservedCodeCacheSize=256m"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:ReservedCodeCacheSize=256m"
export JAVA_HOME=/usr/local/java/jdk1.8.0_212

 

- hbase 시작

Pinpoint]$ ./hbase-1.2.7/bin/start-hbase.sh

 

- HBASE 스키마 생성

[Download URL : https://github.com/naver/pinpoint/blob/master/hbase/scripts/hbase-create.hbase]

 

hbase-create.hbase 파일 사용하여 스키마 생성한다.  

hbase-create.hbase 엔 TTL 값이 31536000 초(365일), 5184000 초(60일) 로 데이터를 유지하도록 되어있어 604800 초(7일)  로 변경.

sed 's/31536000/604800/' hbase-create.hbase > hbase-create-my.hbase
sed -i 's/5184000/604800/' hbase-create-my.hbase

 

Pinpoint]$ ./hbase-1.2.7/bin/hbase shell ./hbase-create-my.hbase
2020-07-27 15:58:21,250 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
0 row(s) in 1.4950 seconds
0 row(s) in 2.3030 seconds
0 row(s) in 2.2720 seconds
0 row(s) in 1.2460 seconds
0 row(s) in 1.2500 seconds
0 row(s) in 1.2500 seconds
0 row(s) in 1.2370 seconds
0 row(s) in 1.2480 seconds
0 row(s) in 1.2440 seconds
0 row(s) in 4.2950 seconds
0 row(s) in 1.2470 seconds
0 row(s) in 1.2460 seconds
0 row(s) in 1.2390 seconds
0 row(s) in 1.2470 seconds
0 row(s) in 1.2420 seconds

TABLE
AgentEvent
AgentInfo
AgentLifeCycle
AgentStatV2
ApiMetaData
ApplicationIndex
ApplicationMapStatisticsCallee_Ver2
ApplicationMapStatisticsCaller_Ver2
ApplicationMapStatisticsSelf_Ver2
ApplicationStatAggre
ApplicationTraceIndex
HostApplicationMap_Ver2
SqlMetaData_Ver2
StringMetaData
TraceV2
15 row(s) in 0.0160 seconds

 

 

# Tomcat 9.0 설치 (Tomcat 9.0에는 Java 8 이상이 필요합니다)

한개의 Tomcat 으로 Pinpoint Web, Collector 로 구동

 

[Download URL : https://tomcat.apache.org/download-90.cgi]

 

 

 Pinpoint]$ wget http://apache.tt.co.kr/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz
--2020-07-27 16:09:32--  http://apache.tt.co.kr/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz
Resolving apache.tt.co.kr (apache.tt.co.kr)... 211.47.69.77
Connecting to apache.tt.co.kr (apache.tt.co.kr)|211.47.69.77|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11211292 (11M) [application/x-gzip]
Saving to: ‘apache-tomcat-9.0.37.tar.gz’

apache-tomcat-9.0.37.tar.gz    100%[=========================================>]  10.69M   116KB/s    in 93s

2020-07-27 16:11:05 (118 KB/s) - ‘apache-tomcat-9.0.37.tar.gz’ saved [11211292/11211292]

Tomcat을 원하는 경로에 다운로드 한다.

 

Pinpoint]$ tar -zxvf apache-tomcat-9.0.37.tar.gz
x apache-tomcat-9.0.37/conf/
x apache-tomcat-9.0.37/conf/catalina.policy
x apache-tomcat-9.0.37/conf/catalina.properties
x apache-tomcat-9.0.37/conf/context.xml
x apache-tomcat-9.0.37/conf/jaspic-providers.xml
x apache-tomcat-9.0.37/conf/jaspic-providers.xsd
                           .
                           .
                           .
                           .
                           .
x apache-tomcat-9.0.37/webapps/examples/jsp/tagplugin/choose.jsp.html
x apache-tomcat-9.0.37/webapps/examples/jsp/tagplugin/foreach.html
x apache-tomcat-9.0.37/webapps/examples/jsp/tagplugin/foreach.jsp
x apache-tomcat-9.0.37/webapps/examples/jsp/tagplugin/foreach.jsp.html
x apache-tomcat-9.0.37/webapps/examples/jsp/tagplugin/howto.html
x apache-tomcat-9.0.37/webapps/examples/jsp/tagplugin/if.html
x apache-tomcat-9.0.37/bin/version.sh

다운로드 한 Tomcat을 압축 해제한다.

 

 

vi ./apache-tomcat-9.0.37/conf/server.xml

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

 port 값을 원하는 port로 변경하여 구동할 수 있다.

 

 

참고 정보 : https://yamoe.tistory.com/544

참고 정보 : https://github.com/naver/pinpoint/tree/master/hbase/scripts

 

 

 


 

'개발경험 및 메모 > Pinpoint' 카테고리의 다른 글

PINPOINT 2.0.3 Alarm Mail  (0) 2020.08.03
PINPOINT 2.0.3 quickstart 설치  (0) 2020.07.30
PINPOINT 2.0.3 설치 - Web, Collector, Agent  (1) 2020.07.27
PINPOINT 란?  (0) 2020.07.27
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기