LoginSignup
1
1

More than 3 years have passed since last update.

CentOS8でFessを使用し、ローカルファイル検索を試す

Posted at

Fessを使用して、ローカルファイルの全文検索を試す。
オープンソース全文検索サーバー Fess

今回は前回と違い、rpmからインストールする。
zipからインストールする場合はこちら

インストール先のCentOSのバージョン。

CentOS Linux release 8.3.2011

ドキュメントがあるので、インストール作業自体は特に詰まるところはなかったが、minimalインストールをした影響か、言語が不足していて起動時に詰まった。
以下、すべてrootユーザで実行。

en_USがあるかどうかを確認。

locale --all-locales

このあたりが入っていればOK。

en_US
en_US.iso885915
en_US.utf8

なければ下記を実行。

dnf reinstall glibc-common
dnf install langpacks-en

JDKのインストール

dnf install java-11-openjdk-devel

Elasticsearchのインストール

Download Elasticsearch Free | Get Started Now | Elastic | Elastic からダウンロード。
この時点での最新は7.10.1。

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.1-x86_64.rpm
rpm -ivh elasticsearch-7.10.1-x86_64.rpm

Fessのインストール

githubからfessの最新コードを取得。
Releases · codelibs/fess · GitHub
この時点での最新は13.10.2。

wget https://github.com/codelibs/fess/releases/download/fess-13.10.2/fess-13.10.2.rpm
rpm -ivh fess-13.10.2.rpm

Elasticsearchの設定

参考: インストール

ElasticsearchにFessのプラグインをインストール。
githubを確認したところ、最新は7.10.0だった。
Tags · codelibs/elasticsearch-analysis-fess · GitHub

/usr/share/elasticsearch/bin/elasticsearch-plugin install org.codelibs:elasticsearch-analysis-fess:7.10.0
/usr/share/elasticsearch/bin/elasticsearch-plugin install org.codelibs:elasticsearch-analysis-extension:7.10.0
/usr/share/elasticsearch/bin/elasticsearch-plugin install org.codelibs:elasticsearch-configsync:7.10.0
/usr/share/elasticsearch/bin/elasticsearch-plugin install org.codelibs:elasticsearch-dataformat:7.10.0
/usr/share/elasticsearch/bin/elasticsearch-plugin install org.codelibs:elasticsearch-minhash:7.10.0

/var/lib/elasticsearch/configを認識させる。
Fessにアクセスするための設定を追記。

/etc/elasticsearch/elasticsearch.yml
configsync.config_path: /var/lib/elasticsearch/config

自動起動登録

systemctl daemon-reload
systemctl enable elasticsearch.service
systemctl enable fess.service

確認

起動させて、ブラウザでアクセスできるか確認する。
起動していない場合はElasticsearchから起動。

systemctl start elasticsearch
systemctl start fess

http://[サーバのIP]:8080 でアクセスできるか確認
http://[サーバのIP]:8080/admin が管理ログイン画面。
ID: admin
PASS: admin

アクセスできない場合はfirewallまわりを確認する。

ローカルファイルのクロール

前回記事参照。

1
1
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
1
1