xunsearch安装使用
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                xunsearch安装使用
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                目錄
- 1.下載
 - 2.進(jìn)入,安裝
 - 3.安裝成功后,啟動后臺服務(wù)
 - 4.安裝PHP-SDK
 
安裝步驟
1.下載
wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2 tar -xjf xunsearch-full-latest.tar.bz22.進(jìn)入,安裝
cd xunsearch-full-1.4.11/ sh setup.sh +=================================================+ | Installation completed successfully, Thanks you | | 安裝成功,感謝選擇和使用 xunsearch | +-------------------------------------------------+ | 說明和注意事項(xiàng): | | 1. 開啟/重新開啟 xunsearch 服務(wù)程序,命令如下: | | /home/jiqing/xunsearch/bin/xs-ctl.sh restart | 強(qiáng)烈建議將此命令寫入服務(wù)器開機(jī)腳本中 | | | | 2. 所有的索引數(shù)據(jù)將被保存在下面這個目錄中: | | /home/jiqing/xunsearch/data | 如需要轉(zhuǎn)移到其它目錄,請使用軟鏈接。 | | | | 3. 您現(xiàn)在就可以在我們提供的開發(fā)包(SDK)基礎(chǔ)上 | | 開發(fā)您自己的搜索了。 | | 目前只支持 PHP 語言,參見下面文檔: | | /home/jiqing/xunsearch/sdk/php/README +=================================================+3.安裝成功后,啟動后臺服務(wù)
sudo sh /home/jiqing/xunsearch/bin/xs-ctl.sh restart $ sudo sh /home/jiqing/xunsearch/bin/xs-ctl.sh restart INFO: stopping server[xs-indexd] (BIND:127.0.0.1:8383) .... [OK] INFO: re-starting server[xs-indexd] ... (BIND:127.0.0.1:8383) INFO: stopping server[xs-searchd] (BIND:127.0.0.1:8384) .... [OK] INFO: re-starting server[xs-searchd] ... (BIND:127.0.0.1:8384)可以查看服務(wù)啟動情況
$ ps -ef |grep xs root 14050 3097 0 09:59 00:00:00 xs-indexd: server root 14055 3097 0 09:59 00:00:00 xs-searchd: master root 14056 14055 0 09:59 00:00:00 xs-searchd: worker[1] root 14057 14055 0 09:59 00:00:00 xs-searchd: worker[2] root 14058 14055 0 09:59 00:00:00 xs-searchd: worker[3] ... $ sudo netstat -anp | grep xs tcp 0 0 127.0.0.1:8383 0.0.0.0:* LISTEN 14050/xs-indexd: se tcp 0 0 127.0.0.1:8384 0.0.0.0:* LISTEN 14055/xs-searchd: m ...可以將此命令添加到開機(jī)啟動腳本中/etc/rc.local
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. sudo sh /home/jiqing/xunsearch/bin/xs-ctl.sh restart4.安裝PHP-SDK
只需要引入SDK即可。
require_once '$prefix/sdk/php/lib/XS.php';檢查環(huán)境情況
$php RequiredCheck.php Xunsearch PHP-SDK 運(yùn)行需求檢查 ==============================檢查內(nèi)容 --------本程序用于確認(rèn)您的服務(wù)器配置是否能滿足運(yùn)行 Xunsearch PHP-SDK 的要求。 它將檢查服務(wù)器所運(yùn)行的 PHP 版本,查看是否安裝了合適的PHP擴(kuò)展模塊,以及 確認(rèn) php.ini 文件是否正確設(shè)置。+------------+------------+--------------------------+--------------------------------+ | 項(xiàng)目 | 結(jié)果 | 用于 | 備注 | +------------+------------+--------------------------+--------------------------------+ | PHP 版本 | 5.6.31 | XS(core) | PHP 5.2.0 或更高版本是必須的。 | | SPL 擴(kuò)展 | OK | XS(core) | SPL 擴(kuò)展用于自動加載和對象戲法 | | PCRE 擴(kuò)展 | OK | XSDocument, XSSearch | 用于字符串切割、判斷 | | 編碼轉(zhuǎn)換 | mbstring | XSDocument, XSSearch | 用于支持非 UTF-8 字符集 | | 緩存模塊 | WARNING | XS | 用于緩存項(xiàng)目配置文件的解析結(jié)果 | | JSON 擴(kuò)展 | OK | util.Quest, util.Indexer | 用于讀取或輸出 JSON 格式的數(shù)據(jù) | | XML 擴(kuò)展 | OK | util.Indexer | 用于讀取導(dǎo)入 XML 格式的數(shù)據(jù) | | MySQL 擴(kuò)展 | mysql | util.Indexer | 用于讀取導(dǎo)入 MySQL 的數(shù)據(jù)庫 | | SQLite 擴(kuò) | sqlite3 | util.Indexer | 用于讀取導(dǎo)入 SQLite 的數(shù)據(jù)庫 | +------------+------------+--------------------------+--------------------------------+檢查結(jié)果 --------共計(jì) 8 項(xiàng)通過,1 項(xiàng)警告,0 項(xiàng)錯誤。您的服務(wù)器配置符合 Xunsearch/PHP-SDK 的最低要求。 如果您需要使用特定的功能,請關(guān)注上述的 WARNING 項(xiàng)。轉(zhuǎn)載于:https://www.cnblogs.com/jiqing9006/p/9252980.html
總結(jié)
以上是生活随笔為你收集整理的xunsearch安装使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: android ViewPager 图片
 - 下一篇: 唐宇迪学习笔记19:聚类算法——Kmea