자바 설치
sudo amazon-linux-extras enable corretto8
sudo yum clean metadata
sudo yum install java-1.8.0-amazon-corretto-devel
자바의 설치 경로를 확인합니다.
$ which java
/usr/bin/java
$ readlink -f /usr/bin/java
/usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64/jre/bin/java
자바를 환경설정 JAVA_HOME 설정
sudo vi /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar
source /etc/profile
HBase 설치
wget http://archive.apache.org/dist/hbase/1.2.7/hbase-1.2.7-bin.tar.gz
tar -zxvf hbase-1.2.7-bin.tar.gz
rm hbase-1.2.7-bin.tar.gz
hbase-1.2.7/conf/hbase-env.sh 파일 수정
# 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"
위 두줄을 주석 처리하여 준다.
hbase-1.2.7/conf/hbase-site.xml 파일 수정
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///home/ec2-user/pinpoint/data</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/ec2-user/pinpoint/zookeeper</value>
</property>
</configuration>
실행
hbase-1.2.7/bin/start-hbase.sh
hbase 스키마 생성
cd /home/ec2-user/pinpoint/hbase-1.2.7/bin
wget https://raw.githubusercontent.com/pinpoint-apm/pinpoint/master/hbase/scripts/hbase-create.hbase
TTL 값이 31536000 초(365일), 5184000 초(60 일)로 데이터를 유지하도록 되어있어 604800 초(7일)로 변경
sed 's/31536000/604800/' hbase-create.hbase > hbase-create-real.hbase
sed -i 's/5184000/604800/' hbase-create-real.hbase
스키마 생성
./hbase shell ./hbase-create-real.hbase
Pinpoint Collector 설치 및 실행
wget https://github.com/pinpoint-apm/pinpoint/releases/download/v2.2.0/pinpoint-collector-boot-2.2.0.jar
nohup java -jar -Dpinpoint.zookeeper.address=localhost pinpoint-collector-boot-2.2.0.jar 1>/dev/null 2>&1 &
Pinpoint Web 설치 및 실행
wget https://github.com/pinpoint-apm/pinpoint/releases/download/v2.2.0/pinpoint-web-boot-2.2.0.jar
nohup java -jar -Dpinpoint.zookeeper.address=localhost pinpoint-web-boot-2.2.0.jar 1>/dev/null 2>&1 &
Pinpoint Agent 설치
wget https://github.com/pinpoint-apm/pinpoint/releases/download/v2.2.0/pinpoint-agent-2.2.0.tar.gz
tar -zxvf pinpoint-agent-2.2.0.tar.gz
vi /pinpoint-agent-2.2.0/pinpoint-root.config 수정
profiler.transport.grpc.collector.ip=192.168.0.207