Elasticsearch 服务器迁移 目标服务初始化安装

服务安装

1
2
3
4
5
6
sudo yum install java-1.8.0-openjdk-devel
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.3.rpm
wget https://artifacts.elastic.co/downloads/kibana/kibana-5.5.3-x86_64.rpm

rpm --install elasticsearch-5.5.3.rpm
rpm --install kibana-5.5.3-x86_64.rpm

修改配置

修改绑定ip和端口

1
vim /etc/elasticsearch/elasticsearch.yml
1
2
network.host: 0.0.0.0
http.port: 9200

修改Kibana配置

1
vim /etc/kibana/kibana.yml
1
2
3
server.host: "0.0.0.0"
server.port: 5601
elasticsearch.url: "http://localhost:9200"

安装插件

安装阿里oss备份插件

1
2
3
wget https://github.com/aliyun/elasticsearch-repository-oss/releases/download/v5.5.3/elasticsearch-repository-oss-5.5.3.zip
unzip -d elasticsearch-repository-oss elasticsearch-repository-oss-5.5.3.zip
mv elasticsearch-repository-oss /usr/share/elasticsearch/plugins/elasticsearch-repository-oss

安装ik分词

1
2
3
wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v5.5.3/elasticsearch-analysis-ik-5.5.3.zip
unzip -d elasticsearch-analysis-ik elasticsearch-analysis-ik-5.5.3.zip
mv elasticsearch-analysis-ik/elasticsearch /usr/share/elasticsearch/plugins/elasticsearch-analysis-ik

重启es,插件生效

1
/usr/share/elasticsearch/bin/elasticsearch-plugin list