1.JDK 설치 (오라클 사이트에서 직접 다운로드후 진행)
# pinpoint 설치를 위해 6,7,8 버전 모두 설치 진행 해야함
[root@CY7 src]#yum install lrzsz -y
[root@CY7 src]#cd /usr/local/src/
[root@CY_PIN src]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring jdk-6u45-linux-x64-rpm.bin...
100% 67266 KB 4484 KB/sec 00:00:15 0 Errors
Transferring jdk-7u79-linux-x64.rpm...
100% 134846 KB 4494 KB/sec 00:00:30 0 Errors
Transferring jdk-8u101-linux-x64.rpm...
100% 162065 KB 4766 KB/sec 00:00:34 0 Errors
[root@CY7 src]# chmod 700 jdk-6u45-linux-x64-rpm.bin
[root@CY7 src]# ./jdk-6u45-linux-x64-rpm.bin
[root@CY7 src]# mv /usr/java/jdk1.6.0_45/ /opt/
[root@CY7 src]# rpm -Uvh jdk-7u79-linux-x64.rpm
[root@CY7 src]# rpm -Uvh jdk-8u101-linux-x64.rpm
[root@CY7 src]# vi ~/.bash_profile
export JAVA_HOME=/usr/java/jdk1.7.0_79/
export JAVA_6_HOME=/opt/jdk1.6.0_45
export JAVA_8_HOME=/usr/java/jdk1.8.0_101
export JAVA_7_HOME=/usr/java/jdk1.7.0_79/
export M2_HOME=/opt/maven
export HBASE_HOME=/usr/local/hbase-0.98.5-hadoop2
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$HBASE_HOME/bin:$M2_HOME/bin
export PATH
[root@CY7 src]# . ~/.bash_profile
[root@CY7 src]# java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
2.zookooper 설치
[root@CY7 src]# wget http://apache.tt.co.kr/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
[root@CY7 src]# groupadd hadoop
[root@CY7 src]# useradd -g hadoop zookeeper
[root@CY7 src]# mv zookeeper-3.4.6.tar.gz /usr/local
[root@CY7 local]# cd /usr/local/
[root@CY7 src]# tar xvzf /usr/local/zookeeper-3.4.6.tar.gz
[root@CY7 src]# mkdir -p /data/zookeeper
[root@CY7 local]# vi /usr/local/zookeeper-3.4.6/conf/zoo.cfg
tickTime=2000
dataDir=/data/zookeeper
clientPort=2181
[root@CY7 local]# chown -R zookeeper:hadoop /usr/local/zookeeper-3.4.6
[root@CY7 local]# chown -R zookeeper:hadoop /data
[root@CY7 local]# su zookeeper
[zookeeper@CY7 local]$ /usr/local/zookeeper-3.4.6/bin/zkServer.sh start
JMX enabled by default
Using config: /usr/local/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... /usr/local/zookeeper-3.4.6/bin/zkServer.sh: line 109: ./zookeeper.out: 허가 거부
STARTED
[zookeeper@CY7 local]$ jps
8599 Jps
[zookeeper@CY7 local]$ exit
exit
3.Hbase 설치
[root@CY7 local]# cd /usr/local/src
[root@CY7 src]# wget https://archive.apache.org/dist/hbase/hbase-0.98.5/hbase-0.98.5-hadoop2-bin.tar.gz
[root@CY7 src]# useradd -g hadoop hbase
[root@CY7 src]# tar xvzf hbase-0.98.5-hadoop2-bin.tar.gz
[root@CY7 src]# mv hbase-0.98.5-hadoop2 /usr/local/
[root@CY7 src]# mkdir /data/hbase
[root@CY7 local]# chown -R hbase:hadoop /data/hbase/
[root@CY7 src]# cd /usr/local/
[root@CY7 local]# chown -R hbase:hadoop hbase-0.98.5-hadoop2/
[root@CY7 local]# vi $HBASE_HOME/conf/hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///data/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/data/zookeeper</value>
</property>
</configuration>
[root@CY7 local]# vi $HBASE_HOME/conf/hbase-env.sh
export JAVA_HOME=/usr/java/jdk1.7.0_79/
[root@CY7 local]# /usr/local/hbase-0.98.5-hadoop2/bin/start-hbase.sh
starting master, logging to /usr/local/hbase-0.98.5-hadoop2/logs/hbase-root-master-CY7.out
[root@CY7 local]# jps
8910 Jps
8730 HMaster
4.Maven설치
[root@CY7 local]# cd /usr/local/src/
[root@CY7 src]# wget http://apache.tt.co.kr/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
[root@CY7 src]# tar xvzf apache-maven-3.3.9-bin.tar.gz
[root@CY7 src]# mv apache-maven-3.3.9 /opt/maven
[root@CY7 src]# vi ~/.bash_profile
export JAVA_HOME=/usr/java/jdk1.7.0_79/
export JAVA_6_HOME=/opt/jdk1.6.0_45
export JAVA_8_HOME=/usr/java/jdk1.8.0_101
export JAVA_7_HOME=/usr/java/jdk1.7.0_79/
export M2_HOME=/opt/maven
export HBASE_HOME=/usr/local/hbase-0.98.5-hadoop2
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$HBASE_HOME/bin:$M2_HOME/bin
export PATH
[root@CY7 src]# . ~/.bash_profile
[root@CY_PIN src]# mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T01:41:47+09:00)
Maven home: /opt/maven
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_79/jre
Default locale: ko_KR, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-642.6.1.el6.x86_64", arch: "amd64", family: "unix"
5.pinpoint build
[root@CY7 local]# cd /usr/local/src/
[root@CY7 src]# yum install git -y
[root@CY7 src]# git clone https://github.com/naver/pinpoint/
[root@CY7 src]# cp -aR /usr/local/src/pinpoint/hbase/scripts/hbase-create.hbase .
[root@CY7 src]# $HBASE_HOME/bin/hbase shell hbase-create.hbase
...생략...
TABLE
AgentEvent
AgentInfo
AgentLifeCycle
AgentStat
AgentStatAggr
AgentStatV2
ApiMetaData
ApplicationIndex
ApplicationMapStatisticsCallee_Ver2
ApplicationMapStatisticsCaller_Ver2
ApplicationMapStatisticsSelf_Ver2
ApplicationTraceIndex
HostApplicationMap_Ver2
SqlMetaData_Ver2
StringMetaData
TraceV2
Traces
17 row(s) in 0.061
[root@CY_PIN src]# cd pinpoint/
[root@CY7 pinpoint]# mvn install -Dmaven.test.skip=true
....
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:13 min
[INFO] Finished at: 2016-10-09T13:02:59+09:00
[INFO] Final Memory: 60M/405M
[INFO] ------------------------------------------------------------------------
5.war 파일
[root@CY7 pinpoint]# cd /usr/local/src
[root@CY7 src]# wget http://ftp.riken.jp/net/apache/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz
[root@CY7 src]# tar xvzf apache-tomcat-8.0.37.tar.gz
[root@CY7 src]# cp -aR apache-tomcat-8.0.37 /usr/local/tomcat-web
[root@CY7 src]# cp -aR apache-tomcat-8.0.37 /usr/local/tomcat-con
[root@CY7 src]# useradd -M -d /usr/local/tomcat tomcat
[root@CY7 src]# chown -R tomcat /usr/local/tomcat*
[root@CY7 src]# vi ~/.bash_profile
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/lib/servlet-api.jar
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export JAVA_HOME=/usr/java/jdk1.7.0_79/
export JAVA_6_HOME=/opt/jdk1.6.0_45
export JAVA_8_HOME=/usr/java/jdk1.8.0_101
export JAVA_7_HOME=/usr/java/jdk1.7.0_79/
export M2_HOME=/opt/maven
export HBASE_HOME=/usr/local/hbase-0.98.5-hadoop2
#TOMCAT
export CATALINA_HOME=/usr/local/tomcat
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/lib/servlet-api.jar
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$HBASE_HOME/bin:$M2_HOME/bin
export PATH
[root@CY7 src]# . ~/.bash_profile
6.tomcat Deploy
[root@CY7 src]# cd /usr/local/tomcat-web/
[root@CY_PIN tomcat-web]# cd webapps/
[root@CY_PIN webapps ]# cp -aR /usr/local/src/pinpoint/web/target/pinpoint-web-1.6.0-SNAPSHOT.war .
[root@CY_PIN webapps]# cd ../conf/
## 아래와 같이 수정
[root@CY_PIN conf]# vi server.xml
<Connector port="8086" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="/usr/local/tomcat-web/webapps/pinpoint-web-1.6.0-SNAPSHOT" reloadable="true" > </Context>
[root@CY_PIN conf]# cd ../bin/
[root@CY_PIN bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat-web
Using CATALINA_HOME: /usr/local/tomcat-web
Using CATALINA_TMPDIR: /usr/local/tomcat-web/temp
Using JRE_HOME: /usr/java/jdk1.7.0_79/
Using CLASSPATH: /usr/local/tomcat-web/bin/bootstrap.jar:/usr/local/tomcat-web/bin/tomcat-juli.jar
Tomcat started.
[root@CY_PIN bin]# netstat -nlpt | grep 8080
tcp 0 0 :::8080 :::* LISTEN 16435/java
[root@CY_PIN bin]# netstat -nlpt | grep 8086
tcp 0 0 :::8086 :::* LISTEN 16435/java
## 해당 서버의 아이피 8080 접속시 아래와 같이 pinpoint web 화면 확인
[root@CY_PIN bin]# cd /usr/local/tomcat-con/webapps/
[root@CY_PIN webapps]# cp -aR /usr/local/src/pinpoint/collector/target/pinpoint-collector-1.6.0-SNAPSHOT.war .
[root@CY_PIN webapps]# cd ../conf/
## 아래와 같이 수정
[root@CY_PIN conf]# vi server.xml
<!--<Server port="8005" shutdown="SHUTDOWN">-->
<Server port="8006" shutdown="SHUTDOWN">
<Connector port="8085" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />-->
[root@CY_PIN conf]# cd ../bin/
[root@CY_PIN bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat-con
Using CATALINA_HOME: /usr/local/tomcat-con
Using CATALINA_TMPDIR: /usr/local/tomcat-con/temp
Using JRE_HOME: /usr/java/jdk1.7.0_79/
Using CLASSPATH: /usr/local/tomcat-con/bin/bootstrap.jar:/usr/local/tomcat-con/bin/tomcat-juli.jar
Tomcat started.
[root@CY_PIN bin]# netstat -nltp | grep 8085
tcp 0 0 :::8085 :::* LISTEN 16582/java
7.Agent setting
## 배포할 AGENT 파일은 아래 경로에 위치 하고 있음
[root@CY_PIN bin]# cd /usr/local/src/pinpoint/agent/target/
[root@CY_PIN target]# ls pinpoint-agent-1.6.0-SNAPSHOT.tar.gz
pinpoint-agent-1.6.0-SNAPSHOT.tar.gz
## SCP로 agent 파일 client 에 전송
[root@CY_PIN target]# scp pinpoint-agent-1.6.0-SNAPSHOT.tar.gz root@1.234.42.102:/tmp
The authenticity of host '1.234.42.102 (1.234.42.102)' can't be established.
RSA key fingerprint is 2a:37:40:78:47:67:7e:ed:4c:f5:b2:f6:ae:7f:b0:5a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '1.234.42.102' (RSA) to the list of known hosts.
root@1.234.42.102's password:
pinpoint-agent-1.6.0-SNAPSHOT.tar.gz 100% 7205KB 7.0MB/s 00:00
## Clinet 에서 tar.gz 파일 확인 후 opt 경로에 이동
[root@CY2 tmp]# ls -al /tmp/pinpoint-agent-1.6.0-SNAPSHOT.tar.gz
-rw-r--r-- 1 root root 7377935 2016-10-07 15:27 /tmp/pinpoint-agent-1.6.0-SNAPSHOT.tar.gz
[root@CY2 tmp]# mkdir pin-agent
[root@CY2 tmp]# mv pinpoint-agent-1.6.0-SNAPSHOT.tar.gz ./pin-agent/
[root@CY2 tmp]# cd pin-agent/
[root@CY2 pin-agent]# tar xvzf pinpoint-agent-1.6.0-SNAPSHOT.tar.gz
[root@CY2 opt]# mv /tmp/pin-agent/ .
## Pinpoint config 설정 변경 ( 콜렉터 아이피 변경 )
[root@CY2 opt]# vi /opt/pin-agent/pinpoint.config
#
# Pinpoint agent configuration
#
###########################################################
# Collector server #
###########################################################
profiler.collector.ip=1.234.42.108
[root@CY2 opt]# vi /usr/local/tomcat/bin/catalina.sh
JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS -javaagent:/opt/pin-agent/pinpoint-bootstrap-1.6.0-SNAPSHOT.jar -Dpinpoint.agentId=cy2 -Dpinpoint.applicationName =CY2"
## tomcat shutdown 시 엄청나게 많은 로그가 발생 . 무시 하고 재시작 한다.
[root@CY2 opt]# /usr/local/tomcat/bin/shutdown.sh
[root@CY2 opt]# /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.8.0_40
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
## web 접속시 아래와 같이 나오면 실제 세팅 완료
반응형
'System > Linux' 카테고리의 다른 글
CentOS 7 OvpenVpn Oracle Freeradius 연동 (0) | 2017.07.29 |
---|---|
CentOS 7 OpenVpn install (0) | 2017.07.29 |
pptpd/xl2tpd vpn with freeradius2 install (0) | 2016.08.26 |
Migrate from FirewallD to Iptables on CentOS 7 (0) | 2016.05.08 |
Centos7 NIC rename (0) | 2016.05.06 |