Start to use skywalking
- Install JDK8
- Install ES
- Install skywalking
- Run Springboot JAR
Install JDK8
If you have installed jdk8, and you can get JAVA_HOME path by
echo $JAVA_HOME
, then please skip this step.
yum install -y java-1.8.0-openjdk-devel.x86_64
Install ES
docker pull elasticsearch:6.5.4
docker create --name my_elasticsearch --net host -e "discovery.type=single-node" -e "network.host=172.16.55.xxxthe server internal ip" elasticsearch:6.5.4
docker start my_elasticsearch
docker logs my_elasticsearch
Install skywalking
Official link to download skywalking:
http://skywalking.apache.org/downloads/
tar -zxvf ...
./bin/startup.sh
Now you can visit port 8080… see the page below
Run Springboot JAR
A few steps:
- Copy the
calledentire folder
agent
to your server, we will need its absolute path
You will get the folder
when you uncompress the file you download from official site.agent
- vim
underagent.config
/agent/config/
agent.service_name=${SW_AGENT_NAME:PartyTest_1}
collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:192.xxx.xxx.xxx:11800}
Explain:is your project name
PartyTest_1
is your server ip
192.xxx.xxx.xxx
keep it and the rest
11800
- create
and start it.startUpSky.sh
#!/bin/bash
str=$1
str1=${str%-*}
str2=${str1%-*}
nohup /usr/local/jdk1.8.0_162/bin/java -javaagent:/opt/devlop/agent/skywalking-agent.jar -Dskywalking.agent.service_name=${str2} -jar -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -Xms512m -Xmx512m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC $1 > logs/$1.out &
Explain:better use your own
str2=${str1%-*}
if you installed jdk manually, get the path by
/usr/local/jdk1.8.0_162/bin/java
, else you can get the path following below
echo $JAVA_HOME
Take this part /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.el7_7.x86_64/bin/java[[email protected]_0_13_centos ~]# whereis javac javac: /usr/bin/javac /usr/share/man/man1/javac.1.gz [[email protected]_0_13_centos ~]# ll /usr/bin/javac lrwxrwxrwx 1 root root 23 Sep 19 11:35 /usr/bin/javac -> /etc/alternatives/javac [[email protected]_0_13_centos ~]# ll /etc/alternatives/javac lrwxrwxrwx 1 root root 70 Sep 19 11:35 /etc/alternatives/javac -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.el7_7.x86_64/bin/javac
to define the name on the skywalking board, of cource you can put a name there directly as well
-Dskywalking.agent.service_name=${str2}
Thanks to below for installation guides and relevant intruductions, you can find help there
https://www.cnblogs.com/aspirant/p/8796974.html
http://mp.ofweek.com/bigdata/a645673326616
https://www.jianshu.com/p/77b4e70c7817