准备安装文件
# 下载安装包
wget -c -P /tmp http://mirrors.hust.edu.cn/apache/incubator/skywalking/5.0.0-GA/apache-skywalking-apm-incubating-5.0.0-GA.tar.gz
# 解压
tar xf /tmp/apache-skywalking-apm-incubating-5.0.0-GA.tar.gz -C /tmp
# 拷贝到安装位置
mkdir -p /home/test/apps/skywalking-agent;\
mv /tmp/apache-skywalking-apm-incubating/agent /home/test/apps/skywalking-agent/5.0.0;\
ln -s /home/test/apps/skywalking-agent/5.0.0 /home/test/apps/skywalking-agent/current;\
chown -R svwcop. /home/test/apps
配置Agent
# 备份配置文件
mv /home/test/apps/skywalking-agent/current/config/agent.config /home/test/apps/skywalking-agent/current/config/agent.config_bak
# 创建配置文件
tee /home/test/apps/skywalking-agent/current/config/agent.config << 'EOF'
# 命名空间,一般是项目编码
agent.namespace=testns
# Collector认证Token
agent.authentication=Password_1234
# 每3秒收集的请求数,负数表示全部收集
agent.sample_n_per_3_secs=-1
agent.span_limit_per_segment=300
# 排除项
agent.ignore_suffix=.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg
agent.is_open_debugging_class=false
collector.servers=192.168.1.41:10800,192.168.1.42:10800,192.168.1.43:10800
logging.level=WARN
EOF
应用启动配置VM参数
-javaagent:/home/test/apps/skywalking-agent/current/skywalking-agent.jar -Dskywalking.agent.application_code=test-app