安裝elasticsearch7.8
- 下載elasticsearch7.8
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-linux-x86_64.tar.gz
- 安裝
準(zhǔn)備:
- 創(chuàng)建elasticsearch 數(shù)據(jù)文件目錄和日志文件目錄
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
#默認(rèn)只能本機(jī)請(qǐng)求,0.0.0.0 是指監(jiān)聽所有ip的連接
network.host: 0.0.0.0
#開啟memory_lock 需修改系統(tǒng)配置(/etc/security/limits.conf)并重啟系統(tǒng)
#bootstrap.memory_lock: true
#端口號(hào)使用默認(rèn)端口
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
- 修改系統(tǒng)配置-limit數(shù)量 (開啟memory_lock時(shí)才需要)
vim /etc/security/limits.conf #添加以下內(nèi)容(需要重新登陸系統(tǒng)生效)
* soft nofile 75535
* hard nofile 75535
- 修改內(nèi)核參數(shù)vm.max_map_count(開啟memory_lock時(shí)才需要)
vim /etc/sysctl.conf #添加以下內(nèi)容
vm.max_map_count=262144
#執(zhí)行以下命令生效
sysctl -p
- 啟動(dòng)
./bin/elasticsearch -d -p pid #-d 指后臺(tái)運(yùn)行
- 驗(yàn)證是否啟動(dòng)成功:
[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 有單獨(dú)針對(duì)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
- 啟動(dòng)
./bin/startup.sh # 前后臺(tái)同時(shí)啟動(dòng)
./bin/oapService.sh #只啟動(dòng)后臺(tái)
./bin/webappService.sh # 只啟動(dòng)UI 前端
- 查看UI 監(jiān)控
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
后臺(tái)安裝文檔
- https://github.com/apache/skywalking/blob/v7.0.0/docs/en/setup/backend/ui-setup.md
- https://github.com/apache/skywalking-cli

