1、操作系统centos 6.9 配置了阿里云的源
2、拷贝需要安装的文件到服务器的
cd /home/pp_res
3、安装mysql服务器
yum -y install mysql-*
service mysqld start
chkconfig mysqld on
4、安装jdk
java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
You have new mail in /var/spool/mail/root
5、安装hbase
cd /home/pp_res/
tar -zxvf hbase-1.2.6-bin.tar.gz
mkdir -p /data/service
mv hbase-1.2.6 /data/service/hbase
cd /data/service/hbase/conf/
vi hbase-env.sh
在27行左右的位置,修改如下
export JAVA_HOME=/usr/java/1.8.0_73/
vi hbase-site.xml
这里我们指定Hbase本地来存储数据,
hbase.rootdir
file:///data/hbase
6、启动hbase
cd /data/service/hbase/bin
./start-hbase.sh
查看Hbase是否启动成功,如果启动成功的会看到"HMaster"的进程
[root@localhost bin]# jps
18902 Bootstrap
11209 Jps
13963 HMaster
19725 Bootstrap
7、初始化hbase库
./hbase shell /home/pp_res/hbase-create.hbase
8、安装pinpoint-collector
cd /home/pp_res/
tar -zxvf apache-tomcat-8.0.36.tar.gz
cp -R apache-tomcat-8.0.36 /data/service/pp-col
cd /data/service/pp-col/conf/
sed -i 's/port="8005"/port="18005"/g' server.xml
sed -i 's/port="8080"/port="18080"/g' server.xml
sed -i 's/port="8443"/port="18443"/g' server.xml
sed -i 's/port="8009"/port="18009"/g' server.xml
sed -i 's/redirectPort="8443"/redirectPort="18443"/g' server.xml
sed -i "s/localhost/`ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | awk -F: '{print $2}'`/g" server.xml
cd /home/pp_res/
rm -rf /data/service/pp-col/webapps/*
unzip pinpoint-collector-1.7.3.war -d /data/service/pp-col/webapps/ROOT
cd /data/service/pp-col/bin/
./startup.sh
10、配置快速启动脚本
cd /home/pp_res
sed -i "s/JAVA_HOME=\/usr\/java\/default\//JAVA_HOME=\/usr\/java\/1.8.0_73\//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
chmod 711 pp-collector.init
mv pp-collector.init /etc/init.d/pp-col
/etc/init.d/pp-col restart
11、安装pinpoint-web
cd /home/pp_res/
cp -R apache-tomcat-8.0.36 /data/service/pp-web
cd /data/service/pp-web/conf/
sed -i 's/port="8005"/port="28005"/g' server.xml
sed -i 's/port="8080"/port="28080"/g' server.xml
sed -i 's/port="8443"/port="28443"/g' server.xml
sed -i 's/port="8009"/port="28009"/g' server.xml
sed -i 's/redirectPort="8443"/redirectPort="28443"/g' server.xml
sed -i "s/localhost/`ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | awk -F: '{print $2}'`/g" server.xml
cd /home/pp_res/
rm -rf /data/service/pp-web/webapps/*
unzip pinpoint-web-1.7.3.war -d /data/service/pp-web/webapps/ROOT
12、进行web的数据库初始化。
cd /data/service/pp-web/webapps/ROOT/WEB-INF/classes/
mysql -uroot -p
>grant all privileges on *.* to root@"%" identified by "mysql";
>create database pinpoint character set utf8;
>grant all privileges on *.* to admin@"%" Identified by "pinpoint";
>use mysql;
>delete from user where host <> '%';
>flush privileges;
>EOF
mysql -uadmin -ppinpoint pinpoint < sql/CreateTableStatement-mysql.sql
mysql -uadmin -ppinpoint pinpoint < sql/SpringBatchJobRepositorySchema-mysql.sql
13、修改web的数据库配置值
more jdbc.properties
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/pinpoint?characterEncoding=UTF-8
jdbc.username=admin
jdbc.password=pinpoint
14、启动web
cd /data/service/pp-web/bin/
./startup.sh
15、设置快速启动
cd /home/pp_res
sed -i "s/JAVA_HOME=\/usr\/java\/default\//JAVA_HOME=\/usr\/java\/jdk1.8.0_73\//g" pp-web.init
sed -i "s/CATALINA_HOME=\/data\/service\/pinpoint-web\//CATALINA_HOME=\/data\/service\/pp-web\//g" pp-web.init
sed -i "s/CATALINA_BASE=\/data\/service\/pinpoint-web\//CATALINA_BASE=\/data\/service\/pp-web\//g" pp-web.init
chmod 711 pp-web.init
mv pp-web.init /etc/init.d/pp-web
/etc/init.d/pp-web restart
16、agengt设置
cd /opt
mkdir ppagent
tar -zxvf pinpoint-agent-1.7.3.tar.gz -C ppagent
cd ppagent/
配置连接到pp-col的服务器地址
more pinpoint.config
profiler.collector.ip=192.168.1.55
默认需要访问pp-col服务器的tcp 9994 udp 9995 9996
17、tomcat配置加载agent配置
more catalina.sh
#!/bin/sh
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/ppagent/pinpoint-bootstrap-1.7.3.jar"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=tomcat1"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=tomcat"
部署完成。