Install kuromoji on CentOS7


Install kuromoji in the environment where elasticsearch and kibana are installed.

Development environment

centos7 on virtualbox elasticsearch 6.8.13 kibana 5.6.16 kuromoji 6.8.13 java 1.8.0_262

elasticsearch installation

· 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"
}

Install kibana

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

Installation of kuromoji

#/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

Install kuromoji on CentOS7
Install Golang on CentOS 8
Install Neo4j 4.1.3 on centOS
Install Vertica 10.0 on CentOS 6.10
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install Python 3 on CentOS 7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Redmine 4.1.1 on CentOS 7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Install OpenFOAM v2006 on CentOS
Install Jenkins on Docker's CentOS
Install Apache on CentOS on VirtualBox
Install Ruby 2.7 on CentOS 7 (SCL)
Try DPDK20 SDK on CentOS7 ①Install
Install Ruby 2.5 on CentOS 7 using SCL
Install Java Open JDK 8 on CentOS 7
How to install MariaDB 10.4 on CentOS 8
Install apache 2.4.46 from source on CentOS7
Steps to install MySQL 8 on CentOS 8
Steps to install devtoolset-6 on CentOS 7
Install Java 9 on windows 10 and CentOS 7
Install MariaDB (CentOS 8)
[CentOS] Install apache-loggen
OpenVPN on CentOS 8
Install the webmail client Rainloop on CentOS 8
How to install beta php8.0 on CentOS8
Install CentOS 7 on Raspberry pi 4 Model B
Install NextCloud on CentOS 7 with Alibaba Cloud ECS
Install gradle on mac
Command to install nginx / PHP7 / php-fpm on CentOS7
Maven on CentOS 7 tutorial
Install OpenJDK on macOS
Install Java on Mac
Docker installation on CentOS 6
Use perltidy on CentOS 8
Install pyqt5 on ubuntu
Try OpenLiteSpeed on CentOS8
Tomcat v8 on CentOS7
[CentOS7] Install aws cli
Zabbix 5 installation on CentOS 8
Use mod_auth_cas on CentOS 8
Install GitLab on CentOS 8 with no internet connection
Use bat on Centos.
Jetty v8 on CentOS7
Install Autoware on Ubuntu 18.04.5
OpenJDK installation on CentOS 7
Install openjdk11 on mac
Install Homebrew on Ubuntu 20.04
Install CMS Made Simple v2.2.2 on LAMP on CentOS 7.3
Install OpenJDK 8 on mac
Install BookStack Documentation Wiki on Elastic Compute Service on CentOS 7
Install the latest hardware drivers from ELRepo on CentOS
Install MySQL 5.6 on CentOS6 [How to specify the version]
Install ag (the silver searcher) [on CentOS / Ubuntu / Mac]
Try RabbitMQ + PHP on CentOS
Install Docker on Raspberry Pi
Install Docker on Windows 10 PRO