Cenos7 SkyWalking7.0 +elasticsearch7.8 +zookpper

安裝elasticsearch7.8

  1. 下載elasticsearch7.8
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-linux-x86_64.tar.gz
  1. 安裝
    準(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

  1. 配置
  • 修改 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
  1. 啟動(dòng)
./bin/elasticsearch -d -p pid  #-d 指后臺(tái)運(yùn)行
  1. 驗(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 前端

參考文檔:

skywalking

后臺(tái)安裝文檔
JAVA Agent安裝文檔
Nginx LUA Agent 安裝文檔
PHP Agent 安裝文檔
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容