• <fieldset id="8imwq"><menu id="8imwq"></menu></fieldset>
  • <bdo id="8imwq"><input id="8imwq"></input></bdo>
    最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
    問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
    當前位置: 首頁 - 科技 - 知識百科 - 正文

    sphinx/coreseek安裝

    來源:懂視網 責編:小采 時間:2020-11-09 13:20:46
    文檔

    sphinx/coreseek安裝

    sphinx/coreseek安裝:Sphinx 官方版本安裝 wget http://sphinxsearch.com/files/sphinx-2.0.3-release.tar.gz tar zxvf sphinx-2.0.3-release.tar.gz ./configure prefix=/usr/local/sphinx with-mysql make make insta
    推薦度:
    導讀sphinx/coreseek安裝:Sphinx 官方版本安裝 wget http://sphinxsearch.com/files/sphinx-2.0.3-release.tar.gz tar zxvf sphinx-2.0.3-release.tar.gz ./configure prefix=/usr/local/sphinx with-mysql make make insta

    Sphinx 官方版本安裝 wget http://sphinxsearch.com/files/sphinx-2.0.3-release.tar.gz tar zxvf sphinx-2.0.3-release.tar.gz ./configure prefix=/usr/local/sphinx with-mysql make make install cd /usr/local/sphinx cp etc/sphinx-min.conf.dist etc/

    Sphinx 官方版本安裝
    wget http://sphinxsearch.com/files/sphinx-2.0.3-release.tar.gz
    tar zxvf sphinx-2.0.3-release.tar.gz
    ./configure –prefix=/usr/local/sphinx –with-mysql
    make && make install
    cd /usr/local/sphinx
    cp etc/sphinx-min.conf.dist etc/sphinx.conf
    測試數據庫,新建test數據庫,導入etc/example.sql做測試
    #修改mysql帳戶密碼
    vim etc/sphinx.conf
    #建立索引
    bin/indexer -c etc/sphinx.conf test1
    #查詢
    bin/search -c etc/sphinx.conf test
    #開啟守護進程
    bin/searchd -c etc/sphinx.conf


    但是官方不支持中文分詞,硬傷……
    支持中文方案:
    1. 安裝 Sphinx-For-Chinese
    wget http://sphinx-for-chinese.googlecode.com/files/sphinx-for-chinese-2.1.0-dev-r3361.tar.bz2
    tar -xvf sphinx-for-chinese-2.0.2-dev-r2894.tar.gz
    $ cd sphinx-for-chinese-2.0.2-dev-r2894
    $ ./configure –prefix=/usr/local/sphinx-for-chinese
    –prefix 指定安裝路徑
    –with-mysql 編譯mysql支持
    –with-pgsql 編譯pgsql支持
    $ make
    $ make install

    配置中文支持
    wget http://sphinx-for-chinese.googlecode.com/files/xdict_1.1.tar.gz
    $ tar -xvf xdict_1.1.tar.gz
    $ /usr/local/sphinx-for-chinese/bin/mkdict xdict_1.1.txt xdict #從xdict_1.1.txt生成xdict文件,xdict_1.1.txt文件可以根據需要進行修改
    $ cp xdict /usr/local/sphinx-for-chinese/etc/

    修改sphinx.conf索引配置文件,在索引配置項中添加以下兩項
    charset_type = utf-8
    chinese_dictionary = /usr/local/sphinx-for-chinese/etc/xdict

    2. 按照Coreseek
    具體參照: http://www.coreseek.cn/products-install/install_on_bsd_linux/
    $ wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz
    $ tar xzvf coreseek-4.1-beta.tar.gz
    $ cd coreseek-4.1-beta/mmseg-3.2.14/
    $ ./bootstrap #輸出的warning信息可以忽略,如果出現error則需要解決
    $ ./configure –prefix=/usr/local/mmseg3
    $ make && make install
    $ cd ..

    ##安裝coreseek
    $ cd csft-3.2.14 或者 cd csft-4.0.1 或者 cd csft-4.1
    $ sh buildconf.sh #輸出的warning信息可以忽略,如果出現error則需要解決
    $ ./configure –prefix=/usr/local/coreseek –without-unixodbc –with-mmseg –with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ –with-mmseg-libs=/usr/local/mmseg3/lib/ –with-mysql ##如果提示mysql問題,可以查看MySQL數據源安裝說明
    $ make && make install
    $ cd ..

    PHP安裝sphinx擴展
    #先安裝sphinxclient
    cd sphinx-2.0.3-release/api/libsphinxclient
    vim sphinxclient.c
    #找到 void sock_close ( int sock );
    改為 static void sock_close ( int sock );
    ./configure –prefix=/usr/local/sphinxclient
    make && make install

    wget http://pecl.php.com/get/sphinx-1.3.0.tgz
    tar zxvf sphinx-1.3.0.tgz
    cd sphinx-1.3.0
    /usr/local/php/bin/phpize
    ./configure –with-php-config=/usr/local/php/bin/php-config –with-sphinx=/usr/local/sphinxclient
    make && make install

    在php.ini加入sphinx.so

    這里最后選擇Coreseek
    更新索引,可以放在Crontab中執行,每天自動更新
    /usr/local/coreseek/bin/indexer –rotate -c /usr/local/coreseek/etc/sphinx.conf –all

    聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

    文檔

    sphinx/coreseek安裝

    sphinx/coreseek安裝:Sphinx 官方版本安裝 wget http://sphinxsearch.com/files/sphinx-2.0.3-release.tar.gz tar zxvf sphinx-2.0.3-release.tar.gz ./configure prefix=/usr/local/sphinx with-mysql make make insta
    推薦度:
    標簽: 安裝 官方
    • 熱門焦點

    最新推薦

    猜你喜歡

    熱門推薦

    專題
    Top
    主站蜘蛛池模板: 亚洲精品无码99在线观看| 亚洲精品456播放| 四虎影视永久在线精品免费| 国产高清国产精品国产专区| 香蕉99久久国产综合精品宅男自| 久久r热这里有精品视频| 久久亚洲中文字幕精品有坂深雪| 久久国产午夜精品一区二区三区| 精品国产自在在线在线观看| 国产在线精品无码二区| 亚洲精品无码久久久影院相关影片 | 国产精品高清2021在线| 91精品国产自产在线观看永久| 日韩人妻无码精品久久久不卡| 在线亚洲欧美中文精品| 人妻VA精品VA欧美VA| 黑人无码精品又粗又大又长 | 精品无码国产一区二区三区AV| 亚洲精品无码久久久久sm| 拍国产真实乱人偷精品| 久久精品国产精品亚洲艾草网美妙| 国产精品成人啪精品视频免费| 亚洲无删减国产精品一区| 精品一区二区三区中文字幕 | 亚洲国产成人一区二区精品区 | 色综合久久精品中文字幕首页 | 北条麻妃国产九九九精品视频| 久久精品国产一区二区三区日韩| 97r久久精品国产99国产精| 国产精品偷伦视频观看免费| 999在线视频精品免费播放观看| 国内精品久久久久影院优| 人妻少妇精品中文字幕av蜜桃| 日韩精品无码久久久久久| 无码精品视频一区二区三区| 久久精品亚洲日本波多野结衣| 久久精品国产亚洲AV无码麻豆| 国产精品视频二区不卡| 国产精品嫩草影院一二三区入口 | 亚洲综合无码精品一区二区三区| 中文字幕乱码中文乱码51精品|