centos7 on virtualbox elasticsearch 6.8.13 kibana 5.6.16 kuromoji 6.8.13 java 1.8.0_262
· Java installation You can delete java7 and install java8
#yum remove -y java-1.7.0-openjdk
#yum install -y java-1.8.0-openjdk-devel
#yum install -y java-1.8.0-openjdk-debuginfo --enablerepo=*debug*
Version confirmation
java -version
・ Installation of elasticsearch Here we use rpm.
#rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Write the repository file.
#vim /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
auto-refresh=1
type=rpm-md
Install with yum.
yum install elasticsearch
systemctl enable elasticsearch
Let's start it.
systemctl start elasticsearch
When starting elasticsearch, it may fail to start if there is not enough memory on virtualbox. At that time, let's expand the memory
Test if it started with
#curl localhost:9200
If the following is displayed, it is successful.
{
"name" : "hKlo_7Y",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "DhFQT2-iTiS_GDeGu8ysIw",
"version" : {
"number" : "6.8.13",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "be13c69",
"build_date" : "2020-10-16T09:09:46.555371Z",
"build_snapshot" : false,
"lucene_version" : "7.7.3",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
kibana also uses rpm.
#rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Write the kibana repository file.
#vim /etc/yum.repos.d/kibana.repo
[kibana-6.x]
name=Kibana repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
Let's install and start kibana
#yum install kibana
#systemctl enable kibana
#systemctl start kibana
Edit the kibana.yml file to make it accessible to kibana.
#vim /etc/kibana/kibana.yml
server.host:“IP address”
elasticsearch.url: "http://localhost:9200"
#systemctl restart kibana
The firewall is stopped here. If you keep the firewall running, open the port. Don't forget to reboot after installing kibana and editing kibana.yml. I can't open it in my browser.
Let's open it in a browser http://IPアドレス:5601
#/usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-kuromoji
Restart elasticsearch
#systemctl restart elasticsearch
If you check below whether kuromoji can be started,
#curl -X GET 'http://localhost:9200/_nodes/plugins?pretty'
{
"_nodes" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"cluster_name" : "elasticsearch",
"nodes" : {
"hKlo_7YNQ6ix8b2BCz7aGQ" : {
"name" : "hKlo_7Y",
"transport_address" : "127.0.0.1:9300",
"host" : "127.0.0.1",
"ip" : "127.0.0.1",
"version" : "6.8.13",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "be13c69",
"roles" : [
"master",
"data",
"ingest"
],
"attributes" : {
"ml.machine_memory" : "10082598912",
"xpack.installed" : "true",
"ml.max_open_jobs" : "20",
"ml.enabled" : "true"
},
"plugins" : [
{
"name" : "analysis-kuromoji",
"version" : "6.8.13",
"elasticsearch_version" : "6.8.13",
"java_version" : "1.8",
"description" : "The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.",
"classname" : "org.elasticsearch.plugin.analysis.kuromoji.AnalysisKuromojiPlugin",
"extended_plugins" : [ ],
"has_native_controller" : false
}
],
Will continue like
You have now installed kuromoji. You can use kuromoji from the devtool console in the upper left of kibana ● Reference https://qiita.com/onlyzs/items/045fb33dbd6bd781ce23
Recommended Posts