Jump to content
View in the app

A better way to browse. Learn more.

PHP论坛人

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

安裝 OpenSearch 2.5.0 強化中文搜尋 (論壇目前 不支援 此版本)

Featured Replies

IPS論壇目前 不支援 此版本

IPS論壇目前 不支援 此版本

IPS論壇目前 不支援 此版本

Debian簡易安裝需要 .deb 安裝檔,而到OpenSearch 2.5.0版本才有出 .deb 安裝檔

2.5.0.png

安裝 OpenSearch 2.5.0 強化中文搜尋 (IPS論壇目前 不支援 此版本)

IPS論壇目前 不支援 此版本
IPS論壇目前 不支援 此版本
IPS論壇目前 不支援 此版本


Debian簡易安裝需要 .deb 安裝檔,而到OpenSearch 2.5.0版本才有出 .deb 安裝檔


------------------------------------------------------------
安裝套件、依賴包
------------------------------------------------------------


檢查Java是否已安裝
which java

java -version



安裝Java (OpenJDK)
apt update

apt install -y default-jdk



安裝必要的依賴包
apt install -y wget gnupg apt-transport-https



確認版本,已安裝 openjdk version "21.0.9" 2025-10-21
java -version



------------------------------------------------------------
安裝 OpenSearch
------------------------------------------------------------

OpenSearch 舊版本
https://opensearch.org/lines/2x.html

IPS論壇後端有寫,必須執行OpenSearch 2.1.x 版本




下載 .deb 安裝檔
wget https://artifacts.opensearch.org/releases/bundle/opensearch/2.5.0/opensearch-2.5.0-linux-x64.deb


安裝
dpkg -i opensearch-2.5.0-linux-x64.deb




啟用服務,注意:第一次啟動可能需要幾分鐘
systemctl daemon-reload

systemctl enable opensearch

systemctl start opensearch



---------------------------------------
查詢RAM占用情況
---------------------------------------

free -h

VPS 4C/8G RAM
Mem:  3.0G used (已占用3GB RAM)




---------------------------------------
修改設定檔
---------------------------------------

修改opensearch.yml
vi /etc/opensearch/opensearch.yml


建議設定 (小論壇、單機)

#network.host: 192.168.0.1
修改為
network.host: 127.0.0.1


#http.port: 9200
修改為
http.port: 9200


在底下加入這幾行
# If you previously disabled the Security plugin in opensearch.yml,
# be sure to re-enable it. Otherwise you can skip this setting.
plugins.security.disabled: true



ESC儲存並離開
:wq








------------------
調整 JVM 記憶體
------------------

編輯 JVM 設定
vi /etc/opensearch/jvm.options


搜尋
-Xms1g
-Xmx1g


將這兩個1g調低,因為只是小論壇用量不大

-Xms256m
-Xmx256m




ESC儲存並離開
:wq





---------------------------------------
重新啟動
---------------------------------------

重新啟動
systemctl restart opensearch



確認狀態
systemctl status opensearch


重開機
reboot



重開機後,確認opensearch是否正常
systemctl status opensearch


curl http://127.0.0.1:9200


成功應回傳訊息 "tagline" : "The OpenSearch Project: https://opensearch.org/"

表示OpenSearch有在運行了




---------------------------------------
查詢RAM占用情況
---------------------------------------

free -h

VPS 4C/8G RAM
Mem:  2.1 G used (已占用2.1GB RAM)





---------------------------------------
如果要更換版本,就移除OpenSearch
---------------------------------------

systemctl stop opensearch

dpkg -r opensearch


重開機後,回到上面的教學,再次安裝OpenSearch其他版本
reboot

Edited by Jack

Create an account or sign in to comment

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.