報錯內容:
sh setup.sh
+==========================================+
| Welcome to setup xunsearch(full) |
| 歡迎使用 xunsearch (完整版) 安裝程序 |
+------------------------------------------+
| Follow the on-screen instructions please |
| 請按照屏幕上的提示操作以完成安裝 |
+==========================================+
Please specify the installation directory
請指定安裝目錄 (默認爲中括號內的值)
[/www/server/xunsearch]:
Confirm the installation directory
請確認安裝目錄:/www/server/xunsearch [Y/n]
Checking scws ... 1.2.3
Checking scws dict ... ok
Checking libuuid ... yes: /usr
Checking xapian-core-scws ... 1.4.20
Checking libevent ... no
Installing libevent (2.0.21-stable) ...
Extracting libevent package ...
Configuring libevent ...
Compiling & installing libevent ...
-----
| ^~
bufferevent_openssl.c: At top level:
bufferevent_openssl.c:228:19: error: storage size of 'methods_bufferevent' isn't known
228 | static BIO_METHOD methods_bufferevent = {
| ^~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:793: bufferevent_openssl.lo] Error 1
make[2]: Leaving directory '/root/xunsearch-full-1.4.17/libevent-2.0.21-stable'
make[1]: *** [Makefile:857: install-recursive] Error 1
make[1]: Leaving directory '/root/xunsearch-full-1.4.17/libevent-2.0.21-stable'
make: *** [Makefile:1182: install] Error 2
-----
ERROR: failed to compile libevent, see 'setup.log' for more detail安裝迅搜時出現的這個Error2錯誤經經過測試基本都是因爲linux的版本與迅搜安裝需要的libeven版本不一致導致的。
現在基本常用的linux發行版系統的openssl都是1.1.0+,但是訊搜解壓的安裝目錄裏面的是libeven2.0.x,與之匹配需要的是openssl<1.1.0纔行,所以這個版本的差異就導致在安裝訊搜(XunSearch)時會出現libeven錯誤Error2。
解決方式就是升級訊搜(XunSearch)中libeven2.0.x版本來實現匹配一致。
方法一:
1、下載libevent2.1.12安裝包並上傳到xunsearch安裝文件夾中;
2、libevent解壓(使用如下命令或者可視化解壓)
tar -zxvf libevent-2.1.12-stable.tar.gz3、壓縮成bz2格式,這是迅搜(XunSearch)安裝包的支持的格式(使用如下命令或者可視化壓縮)
tar -cjf libevent-2.1.12-stable.tar.bz2 libevent-2.1.12-stable4、複製到xunsearch下的packages文件夾內(使用如下命令或者可視化複製)
cp libevent-2.1.12-stable.tar.bz2 xunsearch-full-1.4.15/packages/5、刪除訊搜(XunSearch)自帶的安裝包(使用如下命令或者可視化刪除)
cd xunsearch-full-1.4.15/packages/ rm -f libevent-2.0.X6、重新運行訊搜(XunSearch)安裝指令即可
./setup.sh方法二:
我已經將xunsearch的包修改好了,也就是以上步驟,直接上傳到root目錄下面,解壓,然後運行命令
cd xunsearch-full-1.4.17
sh setup.sh備份包鏈接:
+=================================================+
| Installation completed successfully, Thanks you |
| 安裝成功,感謝選擇和使用 xunsearch |
+-------------------------------------------------+
| 說明和注意事項: |
| 1. 開啓/重新開啓 xunsearch 服務程序,命令如下: |
| /www/server/xunsearch/bin/xs-ctl.sh restart
| 強烈建議將此命令寫入服務器開機腳本中 |
| |
| 2. 所有的索引數據將被保存在下面這個目錄中: |
| /www/server/xunsearch/data
| 如需要轉移到其它目錄,請使用軟鏈接。 |
| |
| 3. 您現在就可以在我們提供的開發包(SDK)基礎上 |
| 開發您自己的搜索了。 |
| 目前只支持 PHP 語言,參見下面文檔: |
| /www/server/xunsearch/sdk/php/README
+=================================================+