安装elasticsearch7.8
- 下载elasticsearch7.8
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-linux-x86_64.tar.gz
- 安装
准备:
- 创建elasticsearch 数据文件目录和日志文件目录
mkdir -p /data/elastic-data/data
mkdir -p /data/elastic-data/logs
解压即安装
cd /opt
tar -xvf elasticsearch-7.8.0-linux-x86_64.tar.gz
cd elasticsearch-7.8.0
- 配置
- 修改 config/elasticsearch.yml
- yml
#默认只能本机请求,0.0.0.0 是指监听所有ip的连接
network.host: 0.0.0.0
#开启memory_lock 需修改系统配置(/etc/security/limits.conf)并重启系统
#bootstrap.memory_lock: true
#端口号使用默认端口
http.port: 9200
cluster.name: ES_Cluster
node.name: node-s01-1
path.data: /data/elastic-data/data
path.logs: /data/elastic-data/logs
discovery.seed_hosts: ["172.16.1.126", "172.16.1.128","172.16.1.129","172.16.1.130"]
cluster.initial_master_nodes: ["172.16.1.126","172.16.1.1
28"]
gateway.recover_after_nodes: 3
- 修改系统配置-limit数量 (开启memory_lock时才需要)
vim /etc/security/limits.conf #添加以下内容(需要重新登陆系统生效)
* soft nofile 75535
* hard nofile 75535
- 修改内核参数vm.max_map_count(开启memory_lock时才需要)
vim /etc/sysctl.conf #添加以下内容
vm.max_map_count=262144
#执行以下命令生效
sysctl -p
- 启动
./bin/elasticsearch -d -p pid #-d 指后台运行
- 验证是否启动成功:
[release@izbp195wx elasticsearch-7.8.0]$ curl http://172.16.1.128:9200
{
"name" : "node-s02-2",
"cluster_name" : "ES_Cluster",
"cluster_uuid" : "r4AQsaRiSSm6WAOZDKNd_Q",
"version" : {
"number" : "7.8.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "757314695644ea9a1dc2fecd26d1a43856725e65",
"build_date" : "2020-06-14T19:35:50.234439Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
安装:SkyWalking7.0
-
注意:SkyWalking 有单独针对elasticsearch7 以上的安装包
下载页地址
下载:
wget https://www.apache.org/dyn/closer.cgi/skywalking/7.0.0/apache-skywalking-apm-es7-7.0.0.tar.gz
- 安装
tar -xvf apache-skywalking-apm-es7-7.0.0.tar.gz
cd apache-skywalking-apm-bin-es7
- 配置 :vim config/application.yml
cluster:
selector: ${SW_CLUSTER:zookeeper}
zookeeper:
nameSpace: ${SW_NAMESPACE:"skywalking"}
...
storage:
selector: ${SW_STORAGE:elasticsearch7}
...
elasticsearch7: #elasticsearch7
nameSpace: ${SW_NAMESPACE:"es4skywalking"}
clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:192.168.1.123:9200}
- SkyWalking UI 端口配置:vi webapp/webapp.yml
server:
port: 8080
collector:
path: /graphql
ribbon:
ReadTimeout: 10000
# Point to all backend's restHost:restPort, split by ,
listOfServers: 127.0.0.1:12800
- 初始化
./bin/oapServiceInit.sh
- 启动
./bin/startup.sh # 前后台同时启动
./bin/oapService.sh #只启动后台
./bin/webappService.sh # 只启动UI 前端
- 查看UI 监控
http://192.168.1.123:8080/
image.png
参考文档:
skywalking
- https://blog.51cto.com/andyxu/2442691?source=dra
- https://github.com/apache/skywalking
- https://github.com/apache/skywalking/blob/v7.0.0/docs/README.md
- https://github.com/apache/skywalking/blob/v7.0.0/docs/en/setup/README.md
- https://github.com/apache/skywalking/blob/v7.0.0/docs/en/setup/backend/backend-setup.md
后台安装文档
- https://github.com/apache/skywalking/blob/v7.0.0/docs/en/setup/backend/ui-setup.md
- https://github.com/apache/skywalking-cli