1、インストールされたバージョンと環境
elasticsearchバージョン:C-6.5.4
elasticsearchディレクトリ:は/ opt / elasticsearch /
centos7サーバーのメモリ要件少なくとも8G。
2、3台のサーバーのクラスタ
172.17.115.124マスター
172.17.115.125マスタデータ
172.17.115.126マスタデータ
3、elasticsearchを開始するためにアカウントを作成します
useraddのNEWUSER
passwdのNEWUSER
4、データとログディレクトリを作成します
ます。mkdir -pは/ opt / elasticsearch /データ/データ/
ます。mkdir -pは/ opt / elasticsearch /データ/ログ/
オーソライズ
chownコマンド-R NEWUSER:NEWUSERは/ opt
5、設定変更elasticsearch
1)172.17.115.124構成情報:
cluster.name: my-application
node.name: node-172-17-115-124
path.data: /opt/elasticsearch/data/data
path.logs: /opt/elasticsearch/data/logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 172.17.115.124
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.17.115.125:9300","172.17.115.124:9300","172.17.115.126:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false
http.cors.enabled: true
http.cors.allow-origin: "*"
2)172.17.115.125構成情報:
cluster.name: my-application
node.name: node-172-17-115-125
path.data: /opt/elasticsearch/data/data
path.logs: /opt/elasticsearch/data//logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 172.17.115.125
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.17.115.125:9300","172.17.115.124:9300","172.17.115.126:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false
http.cors.enabled: true
http.cors.allow-origin: "*"
3)172.17.115.126構成情報:
cluster.name: my-application
node.name: node-172-17-115-126
path.data: /opt/elasticsearch/data/data
path.logs: /opt/elasticsearch/data/logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 172.17.115.126
http.port: 9200
discovery.zen.ping.unicast.hosts: ["172.17.115.125:9300","172.17.115.124:9300","172.17.115.126:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false
http.cors.enabled: true
http.cors.allow-origin: "*"
6、elasticsearch開始
./bin/elasticsearch
またはバックグラウンド化
./bin/elasticsearch -d
正常に起動した後、CURLでリクエストが成功したテストクラスタを構築するかどうか。
http://172.17.115.124:9200/_cat/nodes?vカール
以下は、172.17.115.126マスターノード
説明:
3台のマシンのcluster.name値は同じ、node.name値は異なっていなければなりませんでなければなりません。
7、ヘッド構成
あなた_site / app.js
8、ヘッドスタート
#1 node_modules /イサキ/ binに/イサキサーバ&
バックグラウンド化
#1 nohupをするnode_modules /イサキ/ binに/イサキサーバ&
高への次、つまり、偉大な作品を参照してください。
この記事は、ご質問は次の二つの記事、コメントや議論を読んでください、基礎のインストール手順を尋ねる次の二つの記事に提示されています