跳轉到內容
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 搜尋中文 (論壇不支援此版本)

精選回覆

發表於

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

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

所以下面教學內容無法使用在Invision Community論壇

雖然我試過 .rpm 轉換為 .deb,是可以轉換檔案,但是安裝後有錯誤訊息,無法使用

2.5.0.png

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

安裝java
apt install -y default-jdk



顯示已安裝 openjdk version "17.0.14" 2025-01-21
java -version




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

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

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



下載
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.service


systemctl start opensearch.service


systemctl status opensearch.service


按 Ctrl + z 結束



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

free -h

VPS 2C/2G RAM
Mem:  1.7G used





---------------------------------------
修改 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.options
---------------------------------------

vi /etc/opensearch/jvm.options

搜尋
-Xms1g
-Xmx1g

將這兩個1g調低,因為只是小論壇用量不大,就越低越好
-Xms256m
-Xmx256m


ESC儲存並離開
:wq





---------------------------------------
啟動
---------------------------------------

啟動
systemctl start opensearch.service



瀏覽狀態
service opensearch status



測試 OpenSearch 是否安裝成功
curl http://127.0.0.1:9200

結果返回 curl: (52) Empty reply from server




重開機
reboot



再測一次,測試是否有執行
service opensearch status

按 Ctrl + z 結束



curl http://127.0.0.1:9200

返回訊息 "The OpenSearch Project: https://opensearch.org/"
OpenSearch有在運行了




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

free -h

VPS  2C/2G RAM
Mem:  1.1G used









---------------------------------------
移除opensearch
---------------------------------------

dpkg -r opensearch


重開機
reboot


回到上面的教學,再次安裝opensearch其他版本

建立帳號或登入後發表意見

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.