当前位置: 首页 > news >正文

CentOS部署Skywalking

一、安装Docker
#yum -y install gcc
#yum -y install gcc-c++
#yum install -y yum-utils
设置国内的镜像仓库
#yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
更新yum软件包索引
#yum makecache fast
安装Docker引擎
#yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin
启动Docker引擎
#systemctl start docker
设置开机启动
#systemctl enable docker.service
关闭开机启动
#systemctl disable docker.service

二、下载Elasticsearch容器
#docker pull elasticsearch:8.1.0
8.1.0: Pulling from library/elasticsearch
08c01a0ec47e: Pull complete
5ff2ab324559: Pull complete
02ed3593db24: Pull complete
818e9e5e96bb: Downloading [===================> ]
9ffdad5b7c03: Download complete
c75c21c9d887: Download complete
7de9ee659811: Download complete
e251a8179c68: Download complete
fc4fd8fa609a: Download complete
eac1c98ec28b: Download complete

三、启动Elasticsearch容器
#docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e “discovery.type=single-node” elasticsearch:8.1.0

指定外挂目录
docker run -itd
–name=elasticsearch
–restart=always
-p 9200:9200 -p 9300:9300
-e “discovery.type=single-node”
-v /opt/data/elasticsearch8/data:/usr/share/elasticsearch/data
-v /opt/data/elasticsearch8/logs:/usr/share/elasticsearch/logs
elasticsearch:8.1.0

访问:https://192.168.100.201:9200/,用户名:elastic,口令:

四、修改Elasticsearch密码
#docker exec -it elasticsearch /bin/bash
elasticsearch@4bf62698795e:~$ ./bin/elasticsearch-setup-passwords interactive


Note: The ‘elasticsearch-setup-passwords’ tool has been deprecated. This command will be removed in a future release.


Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y

Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana_system]:
Reenter password for [kibana_system]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]

五、部署kibana容器(非必须)
1)下载容器
#docker pull elastic/kibana:8.1.0
8.1.0: Pulling from elastic/kibana
4fb807caa40a: Pull complete
2e80e64cf6e3: Pull complete
4c5043548240: Pull complete
c7c77672bdbf: Pull complete
a65d590a7ad2: Pull complete
f8d7c469c05a: Pull complete
403c1affe949: Pull complete
87804eacf159: Pull complete
ba875619762d: Pull complete
b1435e1654c6: Pull complete
5b69485d1c81: Pull complete
814c00a2ef69: Pull complete
690ca8c6b0d6: Pull complete
Digest: sha256:4a9a3364d29488da257a64ae114e79e2a3c8cf621f8d5c51c62bd1facb5773b0
Status: Downloaded newer image for elastic/kibana:8.1.0
docker.io/elastic/kibana:8.1.0
2)启动容器
#docker run -d --name kibana002 --link elasticsearch -e ELASTICSEARCH_URL=https://192.168.100.201:9200/ -p 5601:5601 elastic/kibana:8.1.0
532df9b9966754e88e25d9a02d407f6014550f7df7c938fbdd44554447890bc5
3)停止容器
#docker stop 0be2e886baaa
#docker kill 0be2e886baaa
4)访问
http://192.168.100.201:5601/
5)验证
#docker exec -it elasticsearch /bin/bash
elasticsearch@4bf62698795e:~$ cd bin
elasticsearch@4bf62698795e:~/bin$ elasticsearch-create-enrollment-token --scope kibana
WARNING: Owner of file [/usr/share/elasticsearch/config/users] used to be [root], but now is [elasticsearch]
WARNING: Owner of file [/usr/share/elasticsearch/config/users_roles] used to be [root], but now is [elasticsearch]
eyJ2ZXIiOiI4LjEuMCIsImFkciI6WyIxNzIuMTcuMC4yOjkyMDAiXSwiZmdyIjoiNzFmMjhkMDhkMTgyZWU3MjllMDcwODFkNWRhMDJiMjc4MGJjY2E5YTM0MmE2MzE4NDMxYWMxZjQ0NDI1ZGFjNSIsImtleSI6Ilh0bjUyNHNCMFhoYm1adWRQMDA5OkR2aGFfRlpYU2tDcEtZTkVDT2pRM1EifQ==
6)验证
#docker exec -it kibana002 /bin/bash
kibana@532df9b99667:~$ cd bin
kibana@532df9b99667:~/bin$ kibana-verification-code
Your verification code is: 894 715
7)登录,同Elasticsearch的密码(elastic)

六、部署Skywalking镜像
#docker pull apache/skywalking-oap-server:8.9.1
#docker pull apache/skywalking-ui:8.9.1
如果pull操作一直有waiting:
[root@boco201 docker]# pwd
/etc/docker
[root@boco201 docker]# more daemon.json
{
“registry-mirrors”:[
“https://9cpn8tt6.mirror.aliyuncs.com”,
“https://registry.docker-cn.com”
]
}
[root@boco201 docker]#

【有问题描述】
一、创建Dockerfile文件
[root@boco201 skywalking]# pwd
/opt/skywalking
[root@boco201 skywalking]# more Dockerfile
#标题使用官方的OpenJDK 8镜像作为基础镜像
FROM openjdk:8-jre-alpine
#设置环境变量
ENV SW_OAP_VERSION=8.1.0
#创建工作目录
WORKDIR /opt/skywalking
#下载并解压SkyWalking OAP Server
RUN wget &&
tar -xzf apache-skywalking-apm-KaTeX parse error: Expected 'EOF', got '&' at position 25: …ERSION}.tar.gz &̲& \ rm apac…{SW_OAP_VERSION}.tar.gz
#将OAP Server的配置文件复制到容器中
COPY config/application.yml apache-skywalking-apm-KaTeX parse error: Expected 'EOF', got '#' at position 41: …pplication.yml #̲暴露OAP Server的端口…{SW_OAP_VERSION}/bin/oap.sh", “start”]
二、创建SkyWalking OAP Server配置文件
[root@boco201 skywalking]# pwd
/opt/skywalking
[root@boco201 skywalking]# more application.yml
management:
metrics:
export:
skywalking:
enabled: true
endpoint:
health:
show-details: always
skywalking:
oap:
cluster:
enabled: false
receiver-trace:
segment-max-send-size: 30000
buffer-size: 10000
grpc:
oap:
host: 192.168.100.201
port: 11800
lte:
host: 192.168.100.201
port: 12800
三、构建Docker镜像
#docker build -t skywalking-oap .

http://www.lryc.cn/news/236010.html

相关文章:

  • window上Clion配置C++版本的opencv
  • FPGA时序分析与约束(14)——虚拟路径
  • 【Python】解析CPP类定义代码,获取UML类图信息
  • Docker存储驱动之- overlay2
  • Vue3 shallowRef 和 shallowReactive
  • Python数据分析实战① Python实现数据可视化
  • ASP.NET 开发几个知识点
  • 企业微信H5开发遇到的坑
  • mysql使用--分组查询
  • Android网络模块基本实现步骤
  • Rust6.2 An I/O Project: Building a Command Line Program (mini_grep)
  • 云轴科技ZStack信创云平台支撑长江航务管理局35套航运管理系统
  • Canal+Kafka实现MySQL与Redis数据同步(一)
  • 集合的运算
  • 在MySQL上实现间隔5分钟汇总取数及相关字符串、时间处理方法实践
  • 什么是AIGC
  • 〖大前端 - 基础入门三大核心之JS篇㊳〗- DOM访问元素节点
  • GitHub Universe 2023:AI 技术引领软件开发创新浪潮
  • 数据结构:红黑树的插入实现(C++)
  • 飞天使-django之数据库简介
  • Flink之KeyedState
  • c语言:模拟实现qsort函数
  • 从0开始学习数据结构 C语言实现 1.前篇及二分查找算法
  • VSCode 使用CMakePreset找不到cl.exe编译器的问题
  • 【Linux系统化学习】进程的状态 | 僵尸进程 | 孤儿进程
  • 深信服AC流量管理技术
  • 二元关系及关系代数中的象集、除运算
  • [PHP]关联和操作MySQL数据库然后将数据库部署到ECS
  • 23.11.19日总结
  • 系列一、JVM概述