Linux下安裝部署ElasticSearch

2021-10-21 02:32:01 字數 1989 閱讀 5804

系統:centos linux release 7.7.1908 (core)

軟體:elasticsearch-7.9.2

安裝步驟

mkdir -p /usr/local/soft/package

cd /usr/local/soft/package

wget

tar -xzvf elasticsearch-7.9.2-linux-x86_64.tar.gz

mv elasticsearch-7.9.2 ..

cd../elasticsearch-7.9.2

#不允許使用root啟動 為elasticsearch新增使用者

useradd es -p 密碼

chown es:es -r /usr/local/soft/elasticsearch-7.9.2

su es

cd /usr/local/soft/elasticsearch-7.9.2/bin

#直接啟動

#./elasticsearch

#後台啟動

./elasticsearch -d

#檢視日誌

tail -f /usr/local/soft/elasticsearch-7.9.2/logs/elasticsearch.log

啟動報錯處理:

#報錯日誌 max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

#處理 vim /etc/security/limits.conf檔案,新增以以下兩行

* soft nofile 65535

* hard nofile 65535

#報錯日誌 max number of threads [3818] for user [admin] is too low, increase to at least [4096]

#處理 vim /etc/security/limits.conf檔案,新增以下兩行

* soft nproc 4096

* hard nproc 4096

#報錯日誌 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

#臨時生效處理 重啟伺服器失效

sysctl -w vm.max_map_count=262144

#永久生效處理 vim /etc/sysctl.conf 檔案,新增以下一行

vm.max_map_count=262144

#報錯日誌 the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

#處理 vim /usr/local/soft/elasticsearch-7.9.2/config/elasticsearch.yml 檔案,新增以下行

cluster.initial_master_nodes: [

"node-1"

]

允許外網訪問:

vim /usr/local/soft/elasticsearch-7.9.2/config/elasticsearch.yml

#新增以下內容:'''

network.host: 0.0.0.0

#如果需要修改埠

Linux下安裝部署Redis

wget 解壓tar包 tar zxf redis 3.0.7.tar.gz進入解壓的redis目錄,進行編譯 cd redis 3.0.7make完成後進入src目錄進行安裝 make install安裝過程到此結束 2 部署配置 方便管理,可將redis檔案中的conf配置檔案和常用命令進行統一...

Linux下 redmine安裝部署

下面的版本很重要 作業系統 centos7 6.5應該也可以,沒試過 redmine 版本 3.3 ruby 版本 2.3.3 gem 版本 2.6.12 rails 版本 4.2.6 安裝epel源 yum install epel release 安裝依賴 yum install curl de...

Linux下安裝部署Redis

系統 centos linux release 7.7.1908 core 軟體 redis 6.2.1 安裝步驟 mkdir p usr local soft package cd usr local soft package wget 國內映象 wget tar xzvf redis 6.2.1...