最終更新日:2023/06/24 原本2023-04-09

install Fess-14.7.0, Elasticsearch-8.6.2

https://end0tknr.hateblo.jp/entry/20221013/1665611749

以前、上記のentry で fess-13を centos7へ installしましたが、 今回は、windows11へのインストール。

java17

download & install

fess-14.7は java17前提のようです。

https://www.oracle.com/jp/java/technologies/downloads/#jdk17-windows

システム環境変数設定 - JAVA_HOME , PATH

今回、fessとelasticsearchは、windowsのサービスとして起動しますので、 JAVA_HOME , PATHの環境変数を以下のように設定します。

変数
JAVA_HOME C:\jdk-17.0.2
PATH %JAVA_HOME%\bin

念の為、確認

CMD> java -version
java version "17.0.2" 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing)

Elasticsearch-8.6.2

Elasticsearch-8.6.2 を Elasticsearch-8.8.1 としても可能である。

download & 解凍

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.6.2-windows-x86_64.zip
上記urlより、zipをダウンロードし、 c:/Users/%USERNAME%/AppData/local/elasticsearch-8.6.2 として解凍します。

%USERNAME%は自分のuserIDを入力する

# mkdir \tmp
# curl -o /tmp/elasticsearch-8.6.2-windows-x86_64.zip https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.6.2-windows-x86_64.zip
# unzip -d /Users/%USERNAME%/AppData/local/elasticsearch-8.6.2 /tmp/elasticsearch-8.6.2-windows-x86_64.zip
# call powershell -command "Expand-Archive -LiteralPath '/tmp/elasticsearch-8.6.2-windows-x86_64.zip' -DestinationPath \Users\%USERNAME%\AppData\local\elasticsearch-8.6.2"

install plugin - 3個

以下のインストールコマンドは、実際にはそれぞれ1行で実行します。

CMD> C:/Users/%USERNAME%/AppData/local/elasticsearch-8.6.2/bin/elasticsearch-plugin install org.codelibs:elasticsearch-analysis-fess:8.6.2.0
CMD> C:/Users/%USERNAME%/AppData/local/elasticsearch-8.6.2/bin/elasticsearch-plugin install org.codelibs:elasticsearch-analysis-extension:8.6.2.0
CMD> C:/Users/%USERNAME%/AppData/local/elasticsearch-8.6.2/bin/elasticsearch-plugin install org.codelibs:elasticsearch-minhash:8.6.2.0

install module

download & 解凍

https://repo.maven.apache.org/maven2/org/codelibs/elasticsearch-configsync/8.6.2.0/elasticsearch-configsync-8.6.2.0.zip を c:/Users/%USERNAME%/AppData/local/elasticsearch-8.6.2/modules/configsync として解凍

%USERNAME%は自分のuserIDを入力する

# mkdir \tmp
# curl -o /tmp/configsync.zip https://repo1.maven.org/maven2/org/codelibs/elasticsearch-configsync/8.6.2.0/elasticsearch-configsync-8.6.2.0.zip
# mkdir -p \Users\%USERNAME%\AppData\local\elasticsearch-8.6.2\modules\configsync
# unzip.exe -d \Users\%USERNAME%\AppData\local\elasticsearch-8.6.2\modules\configsync \tmp\configsync.zip
# call powershell -command "Expand-Archive -LiteralPath '\tmp\configsync.zip' -DestinationPath \Users\%USERNAME%\AppData\local\elasticsearch-8.6.2\modules\configsync"

elasticsearch.yml 編集

C:/Users/%USERNAME%/AppData/local/elasticsearch-8.6.2/config/elasticsearch.yml

に、以下の2行を追加します。

%USERNAME%は自分のuserIDを入力する
configsync.config_path: C:/Users/%USERNAME%/AppData/local/elasticsearch-8.6.2/config
xpack.security.enabled: false

windowsサービスへの追加と起動

以下の通りです。(ちなみに、停止やサービスからの削除は、stopとremove)

CMD> C:\Users\%USERNAME%\AppData\local\elasticsearch-8.6.2\bin\elasticsearch-service.bat install
削除する場合[ CMD> C:\Users\%USERNAME%\AppData\local\elasticsearch-8.6.2\bin\elasticsearch-service.bat remove ]
C:\Users\%USERNAME%\AppData\local\elasticsearch-8.6.2\bin\elasticsearch-service.bat start

上記コマンドを実行後、ブラウザで以下へアクセスし、表示されれば、okです

Fess-14.7.0

download & 解凍

https://github.com/codelibs/fess/releases/download/fess-14.7.0/fess-14.7.0.zip を C:/Users/%USERNAME%/AppData/local/fess-14.7.0 として解凍

%USERNAME%は自分のuserIDを入力する

# mkdir \tmp
# curl -o /tmp/fess-14.7.0.zip https://github.com/codelibs/fess/releases/download/fess-14.7.0/fess-14.7.0.zip
# unzip -d /Users/%USERNAME%/AppData/local/fess-14.7.0 /tmp/fess-14.7.0.zip
# call powershell -command "Expand-Archive -LiteralPath '/tmp/fess-14.7.0.zip' -DestinationPath \Users\%USERNAME%\AppData\local\fess-14.7.0"

fess.in.bat の編集

C:/Users/%USERNAME%/AppData/local/fess-14.7.0/bin/fess.in.bat 内にある以下のコメント解除

変更前 REM set FESS_JAVA_OPTS=%FESS_JAVA_OPTS% -Dfess.search_engine.http_address=http://localhost:9200
変更後 set FESS_JAVA_OPTS=%FESS_JAVA_OPTS% -Dfess.search_engine.http_address=http://localhost:9200

windowsサービスへの追加と起動

CMD> C:\Users\%USERNAME%\AppData\local\fess-14.7.0\bin\service.bat install
CMD> C:\Users\%USERNAME%\AppData\local\fess-14.7.0/bin\service.bat start

上記コマンドを実行後、ブラウザで http://localhost:8080 へ id/pw = admin/admin で、アクセスできれば、完了です。