## 官网地址:
skywalking.apache.org/
## 中文文档地址:
https://skyapm.github.io/document-cn-translation-of-skywalking/
## 下载地址
https://skywalking.apache.org/downloads/
##
https://blog.csdn.net/qq_45518774/article/details/128798893
##
https://zhuanlan.zhihu.com/p/346605953
## 官网下载
wget https://dlcdn.apache.org/skywalking/9.3.0/apache-skywalking-apm-9.3.0.tar.gz
wget https://dlcdn.apache.org/skywalking/java-agent/8.14.0/apache-skywalking-java-agent-8.14.0.tgz
## 后端存储选择ES
elasticsearch-7.17.9-linux-x86_64.tar.gz
vi /etc/security/limits.conf
* soft nofile 640000
* hard nofile 640000
* soft nproc 640000
* hard nproc 640000
vi /etc/sysctl.conf
vm.max_map_count=655360
vim /opt/app/skywalking/config/application.yml
node.master: true
node.data: true
node.name: node-01
path.data: /opt/data/es/data
path.logs: /opt/data/es/logs
network.host: 0.0.0.0
http.port: 9200
## 支持跨域访问
http.cors.enabled: true
#以es用户启动
groupadd es
useradd es -g es -p es
##
chown -R es:es /opt/data/es/
cat /etc/systemd/system/elastic.service
[Unit]
Description=elasticsearch
[Service]
Type=forking
User=es
LimitNOFILE=65536
LimitNPROC=65536
ExecStart=/opt/app/elastic/bin/elasticsearch -d
[Install]
WantebBy=multi-user.target
vi /opt/app/skywalking/config/application.yml
storage:
#selector: ${SW_STORAGE:h2}
selector: ${SW_STORAGE:elasticsearch}
elasticsearch:
namespace: ${SW_NAMESPACE:""}
clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:10.1.1.32:9200}
protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"}
connectTimeout: ${SW_STORAGE_ES_CONNECT_TIMEOUT:3000}
socketTimeout: ${SW_STORAGE_ES_SOCKET_TIMEOUT:30000}
responseTimeout: ${SW_STORAGE_ES_RESPONSE_TIMEOUT:15000}
numHttpClientThread: ${SW_STORAGE_ES_NUM_HTTP_CLIENT_THREAD:0}
user: ${SW_ES_USER:""}
password: ${SW_ES_PASSWORD:""}
#
../bin/startup.sh
vi /opt/app/skywalking/config/application.yml
storage:
#selector: ${SW_STORAGE:h2}
selector: ${SW_STORAGE:mysql}
..............................
mysql:
properties:
jdbcUrl: ${SW_JDBC_URL:"jdbc:mysql://localhost:3306/db_apm?rewriteBatchedStatements=true"}
dataSource.user: ${SW_DATA_SOURCE_USER:root}
dataSource.password: ${SW_DATA_SOURCE_PASSWORD:root@1234}
官方是没有mysql的包的。去下载:
###
create database db_apm;
## 依赖驱动包下载地址
https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.28
##
mysql-connector-java-8.0.28.jar
## jar放到以下目录
/opt/app/skywalking/oap-libs/
##
tar -xzvf apache-skywalking-apm-9.3.0.tar.gz
tar -zxvf apache-skywalking-java-agent-8.15.0.tgz
##接入方法: java-ops
-javaagent:/skywalking/skywalking-agent/skywalking-agent.jar # jar包位置
-DSW_AGENT_NAME=dev::demo2 # 前面的代表分组,后面的是项目名称
-DSW_AGENT_COLLECTOR_BACKEND_SERVICES=127.0.0.1:11800 # 数据接入点
# 每个项目需要拷贝一份skywalking-agent.jar