计算机系统应用教程网站

网站首页 > 技术文章 正文

Skywalking环境搭建 skywalking client js

btikc 2024-10-19 03:09:29 技术文章 13 ℃ 0 评论

重新完善了Skywalking的环境搭建,记录如下

一、Elasticsearch7安装

1、下载镜像:

docker pull elasticsearch:7.5.1

2、创建es7基础环境

docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -d elasticsearch:7.5.1

docker ps

571efe3de689 elasticsearch:7.5.1 "/usr/local/bin/do..." About a minute ago Up About a minute 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp elasticsearch

mkdir -p /usr/local/app/elasticsearch/config

docker cp 571efe3de689:/usr/share/elasticsearch/config/elasticsearch.yml /usr/local/app/elasticsearch/config/elasticsearch.yml

mkdir -p /usr/local/app/elasticsearch/data

mkdir -p /usr/local/app/elasticsearch/plugins

chmod -R 777 /usr/local/app/elasticsearch/config

chmod -R 777 /usr/local/app/elasticsearch/data

chmod -R 777 /usr/local/app/elasticsearch/data/nodes

chmod -R 777 /usr/local/app/elasticsearch/plugins

3、启动es7

docker run --name elasticsearch --privileged=true -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -v /usr/local/app/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v /usr/local/app/elasticsearch/data:/usr/share/elasticsearch/data -v /usr/local/app/elasticsearch/plugins:/usr/share/elasticsearch/plugins -d elasticsearch:7.5.1

4、访问地址: http://192.168.43.237:9200/

二、Kibana安装

1、下载镜像:

docker pull kibana:7.5.1

2、创建Kibana基础环境

mkdir -p /usr/local/app/kibana/config/

docker run --name kibana -d kibana:7.5.1

docker ps

7527cc7489fe kibana:7.5.1 "/usr/local/bin/du..." 6 seconds ago Up 5 seconds 5601/tcp kibana

docker cp 7527cc7489fe:/usr/share/kibana/config/kibana.yml /usr/local/app/kibana/config/kibana.yml

chmod -R 777 /usr/local/app/kibana/

vi /usr/local/app/kibana/config/kibana.yml

#

# ** THIS IS AN AUTO-GENERATED FILE **

#

# Default Kibana configuration for docker target

server.name: kibana

server.host: "0"

elasticsearch.hosts: [ "http://192.168.43.237:9200" ]

xpack.monitoring.ui.container.elasticsearch.enabled: true

3、启动Kibana

docker run --name=kibana --privileged=true -p 5601:5601-v /usr/local/app/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml -d docker.io/kibana:7.5.1

4、访问地址: http://192.168.43.237:5601/app/kibana

三、Skywalking安装

1、下载镜像:

docker pull apache/skywalking-oap-server:8.6.0-es7

docker pull apache/skywalking-ui:8.6.0

2、创建Skywalking基础环境

mkdir -p /usr/local/app/skywalking/config/

chmod -R 777 /usr/local/app/skywalking/config/

下载https://archive.apache.org/dist/skywalking/8.6.0/apache-skywalking-apm-8.6.0.tar.gz,解压apache-skywalking-apm-8.6.0.tar.gz,解压目录为/usr/local/app/apache-skywalking-apm-bin/

将目录/usr/local/app/apache-skywalking-apm-bin/config中所有配置文件拷贝到/usr/local/app/skywalking/config

配置application.yml,使用elasticsearch7存储数据,并配置es的链接地址

3、启动Skywalking

docker run --name skywalking-oap --restart always -p 11800:11800 -p 12800:12800 -v /usr/local/app/skywalking/config:/skywalking/ext-config -d docker.io/apache/skywalking-oap-server:8.6.0-es7

4、启动UI

docker run --name skywalking-ui --restart always -p 9898:8080 --link skywalking-oap:skywalking-oap -e SW_OAP_ADDRESS=skywalking-oap:12800 -d docker.io/apache/skywalking-ui:8.6.0

5、访问地址: http://192.168.43.237:9898/

6、程序启动加入监控脚本

java -javaagent:/usr/local/app/apache-skywalking-apm-bin/agent/skywalking-agent.jar -Dskywalking.agent.service_name=gateway-service -Dskywalking.collector.backend_service=192.168.43.237:11800 -Dserver.port=9090 -jar /usr/local/webapp/gateway.jar > /dev/null 2>&1 &

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表