pinpoint the deployment of 2

1. Download

2, deployment PP-Server
2.1 upload resources
mkdir / Home / pp_res
cd / home / pp_res /
via FTP tool attachments uploaded to / home / pp_res / directory
to check whether the upload success
LL / home / pp_res /
2.2 to install and configure the JDK
cd / Home / pp_res /
the tar -zxvf JDK-6u45-Linux-x64.tar.gz
mkdir / usr / java
Music Videos jdk1.6.0_45 / /usr/java/jdk1.6.0_45
# configured java environment variable
VI / etc / Profile
# the following copied to the profile of the last line in the
Export JAVA_HOME = / usr / java / jdk17
Export the PATH = $ the PATH: $ JAVA_HOME / bin
# make the environment variables to take effect
Source / etc / profile
# test java environment variable configured
[root @ pp_res localhost] # -version Java
Java Version "1.6.0_45"
the Java ((TM)) the Runtime Environment SE (Build 1.6.0_45-B15)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b02, mixed mode)

2.3 Installation HBase
2.3.1 decompression HBase
CD / Home / pp_res /
the tar-1.0.3-bin.tar.gz -zxvf HBase
mkdir -p / Data /-Service
Music Videos HBase-1.0.3 / / Data /-Service / HBase
2.3. configuration 2 the JDK
CD / Data /-Service / HBase / the conf /
VI hbase-env.sh
# line position about 27, modified as follows
Export the JAVA_HOME = / usr / Java / jdk1.6.0_45 /
2.3.3 modify the configuration information Hbase
HBase-the site.xml vi
# modified as follows at the end, here we specify Hbase local to store data, production data stored in HDFS recommendations.
hbase.rootdir
File: /// the Data / HBase
2.3.4 start HBase
cd / the Data / Service / HBase / bin
./start-hbase.sh
# Hbase see if started successfully, if successful will start to see "HMaster" of process
JPS
12075 Jps
11784 HMaster
2.3.5 of pinpoint library initialization Hbase
# Hbase perform initialization statement pinpoint provided, then initializes a while.
shell /home/pp_res/hbase-create.hbase ./hbase
# after the execution is over, enter Hbase
./hbase shell
# After entering Hbase version can be seen, there are some relevant information
2016-11-15 01:55: WARN 44,861 [main] util.NativeCodeLoader: Unable to Native-Load your Hadoop Platform Library for the using ... Built
in Java classes WHERE applicableHBase-Shell; Enter 'Help' for List of Supported Commands.
the Type "Exit" to Leave The HBase shell
Version 1.0.3, rf1e1312f9790a7c40f6a4b5a1bab2ea1dd559890, Tue. 19 Jan 2016 19:26:53 the PST

HBase (main): 001: 0>

# 输入"status 'detailed'"可以查看刚才初始化的表,是否存在
hbase(main):001:0> status 'detailed'
version 1.0.3
0 regionsInTransition
master coprocessors: []
1 live servers
localhost:50887 1478538574709
requestsPerSecond=0.0, numberOfOnlineRegions=498, usedHeapMB=24, maxHeapMB=237, numberOfStores=626, numberOfStorefiles=0, storefileUncom
pressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0, readRequestsCount=7714, writeRequestsCount=996, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, coprocessors=[MultiRowMutationEndpoint] "AgentEvent,,1478539104778.aa1b3b14d0b48d83cbf4705b75cb35b7."
numberOfStores=1, numberOfStorefiles=0, storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, storefileIndexSizeMB=0,
readRequestsCount=0, writeRequestsCount=0, rootIndexSizeKB=0, totalStaticIndexSizeKB=0, totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, compactionProgressPct=NaN, completeSequenceId=-1, dataLocality=0.0
...

Log web, to see if the success of the HBase data initialization
HbaseWeb: http://192.168.0.201:16010/master-status


2.4 Collector-mounted Pinpoint
2.4.1 tomcat intermediate decompression
# decompression Tomcat, the Tomcat renamed to a specific location
CD / Home / pp_res /
the tar -zxvf Apache-tomcat-8.0.36.tar.gz
Music Videos Apache-tomcat-8.0 .36 / / data / service / pp -col

# Modify the configuration of Tomcat pp-col, mainly modify the port, with the port to avoid conflicts pp-web of Tomcat. Before I had the default port plus 1, is replaced by the following shell command.
# [Note] The last is open to private ip tomcat, you need to replace localhost ip cost machine, I had the card machine is the default, if you present the card machine is not eth0, the need for relevant changes. Or directly "vi" in, modify localhost
CD / Data /-Service / PP-COL / the conf /
Sed -i 'S / Port = "8005" / Port = "18005" / G' the server.xml
Sed -i 'S / Port = "8080" / Port = "18080" / G 'the server.xml
Sed -i' S / Port = "8443" / Port = "18443" / G 'the server.xml
Sed -i' S / Port = " 8009 "/ Port =" 18009 "/ G 'the server.xml
Sed -i' S / the redirectPort =" 8443 "/ the redirectPort =" 18443 "/ G 'the server.xml
### Sed -i" S / localhost / `the ifconfig eth0 | grep 'inet addr' | awk '{print $ 2}' | awk -F: '{print $ 2}' `/ g" server.




-rf RM / the Data / Service / PP-COL / webapps / *
the unzip Pinpoint-Collector-1.5.2.war -d / the Data / Service / PP-COL / webapps / ROOT
2.4.3 Start Service
# start Tomcat
cd / the Data / Service / PP-COL / bin /
./startup.sh
# view the log, if successful startup
tail -f ../logs/catalina.out
2.4.4 configuration Quick start
configuration Quick start
# configure Quick start need to be modified pp-collector .init path (pp-collector with a disk inside the network) can "vi" in, probably at the line 18,24,27, modify the associated path. I am here for the convenience, directly to do with the replacement of the shell, if the path with mine, you need to modify the path to your own path.
CD / Home / pp_res
Sed -i "S / the JAVA_HOME = \ / usr \ / Java \ / default \ // = the JAVA_HOME \ / usr \ / Java \ / jdk17 \ // G" PP-collector.init
Sed -i " s / CATALINA_HOME = \ / data \ / service \ / pinpoint-collector \ // CATALINA_HOME = \ / data \ / service \ / pp-col \ // g "pp-collector.init
sed -i "s/CATALINA_BASE=\/data\/service\/pinpoint-collector\//CATALINA_BASE=\/data\/service\/pp-col\//g" pp-collector.init

# File permissions given to "execute", and put it in "init.d" to go. You can quickly restart after restart.
711 PP-collector.init chmod
mv PP-collector.init /etc/init.d/pp-col

# test restart
[root @ localhost pp_res] # /etc/init.d/pp-col restart
STOPPING Tomcat
the Using CATALINA_BASE: / Data /-Service / PP-COL /
the Using CATALINA_HOME: / Data /-Service / PP-COL /
the Using CATALINA_TMPDIR: / Data /-Service / PP // TEMP-COL
the Using the JRE_HOME: / usr / Java / jdk17 /
the Using the CLASSPATH: / Data /service/pp-col//bin/bootstrap.jar:/data/service/pp-col//bin/tomcat-juli.jar

Waiting for Processes exitStarting Tomcat to
the Using CATALINA_BASE: / the Data / Service / PP-COL /
the Using CATALINA_HOME: / Data /-Service / PP-COL /
the Using CATALINA_TMPDIR: / Data /-Service / PP // COL-TEMP
Using JRE_HOME: /usr/java/jdk17/
Using CLASSPATH: /data/service/pp-col//bin/bootstrap.jar:/data/service/pp-col//bin/tomcat-juli.jar
Tomcat started.
Tomcat is running with pid: 22824

2.5 Web-mounting Pinpoint
2.5.1 tomcat intermediate decompression
# decompression Tomcat, the Tomcat renamed to a specific location
CD / Home / pp_res /
the tar -zxvf Apache-tomcat-8.0.36.tar.gz
Music Videos Apache-tomcat-8.0 .36 / / data / service / pp -web

# Modify the configuration of Tomcat pp-web, mainly modify the port to avoid a conflict with the port of Tomcat's pp-col. Before I had the default port plus 2, the following is a replacement shell command
# [Note] The last one is the private ip open tomcat, you need to localhost replace ip cost machines, card I of this machine is the default, If the card is not your native eth0, the need for relevant changes. Or directly "vi" in, modify localhost
CD / Data /-Service / Web-PP / the conf /
Sed -i 'S / Port = "8005" / Port = "28005" / G' the server.xml
Sed -i 'S / Port = "8080" / Port = "28080" / G 'the server.xml
Sed -i' S / Port = "8443" / Port = "28443" / G 'the server.xml
Sed -i' S / Port = " 8009 "/ Port =" 28009 "/ G 'the server.xml
Sed -i' S / the redirectPort =" 8443 "/ the redirectPort =" 28443 "/ G 'the server.xml
### Sed -i" S / localhost / `the ifconfig eth0 | grep 'inet addr' | awk '{print $ 2}' | awk -F: '{print $ 2}' `/ g" server.

2.5.2 deploy war package
# package deployment pinpoint-collector.war
# [Note: If you do not unzip command, you can "yum install unzip"]
cd / Home / pp_res /
RM -rf / the Data / Service / Web-PP / webapps / *
the unzip Pinpoint-Web-1.5.2.war -d / Data /-Service / Web-PP / the webapps / the ROOT

# Check whether the war package decompression success
[root @ localhost conf] # LL / the Data / Service / Web-PP / webapps / ROOT / the WEB-INF / classes /
Total 88
-rw-rw-r--. 1 root root 2164 Apr 7 2016 applicationContext-cache.xml # * .xml files in these subsequent tuning work will be used.
r---RW--rw. On Apr 3649 the root. 7. 1 2016 the root-DAO-applicationContext the config.xml
-rw-r---RW. On Apr 1490. 7. 1 2016 the root applicationContext the root-DataSource.xml
-rw-RW-R & lt -.. 1. 7 the root On Apr 6680 2016 applicationContext the root-hbase.xml
. -rw-r---RW. 1 the root. 7 On Apr 1610 2016 applicationContext the root-websocket.xml
. -rw the root-RW. 1 the root-r-- On Apr 6576 applicationContext the web.xml-2016. 7
drwxrwxr-X. 2 the root. 7 On Apr 4096 2016 BATCH the root
-rw-r---RW. On Apr. 1 the root. 7 106 2016 batch.properties the root
drwxrwxr-X. On Apr 4096 the root. 3 the root. 7 2016 COM
rw-r----rw. 1 root root 682 7 Apr 2016 ehcache.xml
-rw-rw-r--. 1 root root 1001 Apr 7 2016 hbase.properties # configure our pp-web data source from which to obtain acquisition data, here we specify only the zookeeper Hbase address.
-rw-rw-r--. 1 root root 153 Apr 7 2016 jdbc.properties # authenticate itself Mysql database connection configuration.
r---RW--rw. On Apr 3338 the root the root. 7. 1 2016 the log4j.xml
drwxrwxr-X. On Apr 2 4096 the root the root. 7 Mapper 2016
-rw-r---RW. 1420. On Apr. 1 the root the root-config. 7 2016 MyBatis .xml
drwxrwxr-the X-. 3 root root 4096 Apr 7 2016 ORG
-rw-rw-r--. 1 root root 630 7 Apr 2016 # pinpoint-web.properties here pp-web cluster configuration file, if you need pp- web cluster of words.
r---RW--rw. the root 141 is the root. 1. 7 On Apr 2016 the project.properties
-rw-r---RW. On Apr 3872 the root the root. 7. 1 2016 the servlet-context.xml
drwxrwxr-x. 2 root root 4096 Apr 7 2016 sql # sql directory pp-web itself some data need to be stored in a MySQL database, there needs to be initialized at the table structure.

2.5.3 Start Tomcat
# start Tomcat
cd / the Data / Service / Web-PP / bin /
./startup.sh

# View the log, if Tocmat started successfully
tail -f ../logs/catalina.out

The following words appear # log, the description has been launched successfully the
org.apache.catalina.startup.Catalina.start Server startup in 79531 ms

2.5.4 verification page
# this time we can visit at this address, enter "http://192.168.0.201:28080" in the browser, there will be a main page
# if you can not access it, turn off the firewall

/etc/init.d/iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]

2.5.5 Configuration Quick Start
# modify "pp-web.init", consistent with the above steps
CD / Home / pp_res
Sed -i "S / the JAVA_HOME = \ / usr \ / Java \ / default \ // = the JAVA_HOME \ / usr \ / Java \ / jdk17 \ // G "PP-web.init
Sed -i" S / CATALINA_HOME = \ / Data \ /-Service \ / Pinpoint-Web \ // CATALINA_HOME = \ / Data \ /-Service \ / Web-PP \ // G "PP-web.init
Sed -i" S / CATALINA_BASE = \ / Data \ /-Service \ / Pinpoint-Web \ // CATALINA_BASE = \ / Data \ /-Service \ / PP-Web \ / / g "pp-web.init

# File to give permission "execution" of the let into the "init.d" to go. You can quickly restart after restart.
PP-711 web.init the chmod
Music Videos PP-web.init /etc/init.d/pp-web


# 测试一下restart
[root@localhost pp_res]# /etc/init.d/pp-web restart
Stoping Tomcat
Using CATALINA_BASE: /data/service/pp-web/
Using CATALINA_HOME: /data/service/pp-web/
Using CATALINA_TMPDIR: /data/service/pp-web//temp
Using JRE_HOME: /usr/java/jdk17/
Using CLASSPATH: /data/service/pp-web//bin/bootstrap.jar:/data/service/pp-web//bin/tomcat-juli.jar

waiting for processes to exitStarting tomcat
Using CATALINA_BASE: /data/service/pp-web/
Using CATALINA_HOME: /data/service/pp-web/
Using CATALINA_TMPDIR: /data/service/pp-web//temp
Using JRE_HOME: /usr/java/jdk17/
Using CLASSPATH: /data/service/pp-web//bin/bootstrap.jar:/data/service/pp-web//bin/tomcat-juli.jar
Tomcat started.
Tomcat is running with pid: 22703

3, the deployment of Agent-PP
3.1 upload resources
mkdir / Home / pp_test
cd / Home / pp_test
via FTP to upload the attachment to / home / pp_test / directory
to check whether the upload success
ll / home / pp_test /

JDK 3.2 Installation and Configuration
Referring 2.2

3.3 Configuration pp_agent
3.3.1-decompression Agent PP
cd / Home / pp_test
the tar -zxvf Pinpoint-Agent-1.7.3.tar.gz
Music Videos Pinpoint-Agent-1.7.3 / Data / PP-Agent
3.3.2 Edit profile
cd / Data / PP-Agent /
VI pinpoint.config

# The main change IP, only need to specify the installation of pp-col IP on the line, after installing pp-col starts, it automatically opens a port of 9994,9995,9996. Here you do not need to worry about, if there is demand for the port, go to pp-col configuration file ( "pp-col / webapps / ROOT / WEB-INF / classes / pinpoint-collector.properties") , modify the port
profiler. collector.ip = 192.168.0.201

3.4 Configuration tomcat piece (test)
3.4.1 decompression tomcat
# in order to facilitate observation, a fake system configuration, to extract the specified directory Tomcat
CD / Home / pp_test
mkdir / Data
the tar -zxvf Apache-tomcat-8.0.36.tar .gz
mv the Apache-Tomcat-8.0.36 / / the Data / PP-the Test
3.4.2 configuration localhost
# configure localhost allow access to external
cd / the Data / PP-the Test / conf /
sed -i "S / localhost /` ifconfig eth0 | grep 'inet addr' | awk '{print $ 2}' | awk -F: '{print $ 2}' `/ g" server.xml

3.4.3 decompressed test war package
CD / Home / pp_test /
RM -rf / Data / PP-Test / the webapps / *
the unzip test.war -d / Data / PP-Test / the webapps / the ROOT

3.4.4 Configuration monitoring parameters
monitored parameters setenv.sh Please setenv.sh to the copy / data / pp-test / bin .

3.4.5 Monitoring Tomcat
# configured. You can start monitoring, we start testing the server Tomcat
cd / the Data / PP-the Test / bin /
./startup.sh

# View the boot log, indeed Tomcat start
tail -f ../logs/catalina.out

3.4.6 Page Views
http://192.168.0.202:8080/

3.4.7 The machine checks the access log
tail -f /data/pp-test/logs/localhost_access.2019-08-26.txt
log contains ******* http1.1 words, has shown that normal

3.4.8 Access server monitoring
http://192.168.0.201:28080/

Guess you like

Origin www.cnblogs.com/bittliuy/p/11415752.html
Recommended