LoginSignup
3
4

More than 5 years have passed since last update.

Crowiに検索機能を追加する方法

Posted at

Crowiに検索機能が欲しくなったため、構築済のCrowi1.6に機能を追加する。

検証環境

  • CentOS 7.4 x64 (Minimal Install)
  • Crowi 1.6.2

Crowiのセットアップ方法は以下の記事を参照
https://qiita.com/SkyLaptor/items/f5de5f8528da277abd8f

セットアップに必要なモジュールのインストール

# yum install java-1.8.0-openjdk
# rpm -qa | grep java-
java-1.8.0-openjdk-headless-1.8.0.144-0.b01.el7_4.x86_64
java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64

Elasticsearchのインストール

# vi /etc/yum.repos.d/elasticsearch.repo
# yum install elasticsearch
# rpm -qa | grep elasticsearch
elasticsearch-5.6.1-1.noarch
# cd /usr/share/elasticsearch
# bin/elasticsearch-plugin install analysis-kuromoji
# systemctl start elasticsearch
# systemctl enable elasticsearch
elasticsearch.repo
[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

参考: https://www.elastic.co/guide/en/elasticsearch/plugins/current/installation.html

Crowiの設定変更

# vi /etc/sysconfig/crowi
# systemctl restart crowi
/etc/sysconfig/crowi
# 追記
ELASTICSEARCH_URI="http://localhost:9200"

検索機能の動作確認

Crowiにアクセスし、検索機能が追加されていることを確認する。

2017-09-22_12h22_28.png

なぜかInternetExplorerでは表示されない。ChromeとFirefoxは問題なし。

参考

https://qiita.com/bezeklik/items/48fe054c2df05f03f3d1
https://qiita.com/oshuya/items/05883de5cc275d87a7b8

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4