日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

coreseek mysql安装_coreseek安装和使用(一)

發布時間:2023/12/10 数据库 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 coreseek mysql安装_coreseek安装和使用(一) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

什么是sphinx,sphinx和coreseek有什么區別和作用。

coreseek的安裝和配置。

coreseek的使用方式。

sphinx和coreseek

** sphinx: **

Sphinx是開源的搜索引擎,它支持英文的全文檢索。

** coreseek: **

單獨搭建Sphinx,已經可以使用全文索引了。但是往往我們要求的是中文索引,coreseek就是國人提供了一個可供企業使用的,基于Sphinx的中文全文檢索引擎。也就是說Coreseek實際上的內核還是Sphinx。

coreseek安裝流程和遇到問題的解決方法

第一步下載coreseek安裝包,點擊下載coreseek的3.2.14.tar.gz版本

下載完成后解壓進入coreseek目錄,會發現有兩個目錄csft-3.2.14和mmseg-3.2.14,這里簡單說明下:Csft-3.2.14就相當玩sphinx安裝目錄,mmseg-3.2.14即為中文分詞安裝包,先安裝中文分詞庫,請看代碼:

Cd coreseek-3.2.14/ mmseg-3.2.14

./configure --prefix=/usr/local/mmseg/

./configure出現錯誤:config.status: error: cannot find input file: src/Makefile.in

要先安裝automake,再重新執行configure

yum -y install autoconf automake

aclocal

yum -y install libtool

aclocal

libtoolize –force

automake --add-missing

make

make install

安裝中文分詞mmseg完畢,安裝coreseek。

cd ../ csft-3.2.14

./configure --prefix=/usr/local/coreseek --with-mysql=/usr/local/mysql --with-mmseg-includes=/usr/local/mmseg/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg/lib/

make

make install

```

但我的環境是使用yum直接安裝的lnmp,不知道mysql的地址。需要先安裝mysql-devel ,再安裝csft的時候直接用-with-mysql 會自動搜索安裝的mysql的文件。重新執行上面的代碼,--with--mysql不用帶參數,自動搜索。

4. 安裝好coreseek和mmesg我們要給php加上sphinx模塊,這樣php就可以用到sphinx軟件的功能,先下載php的sphinx模塊包,代碼如下

wget http://pecl.php.net/get/sphinx-1.1.0.tgz

tar zxvf sphinx-1.1.0.tgz

cd sphinx-1.1.0

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make

make install

安裝擴張有可能遇到的錯誤:

一、configure: error: Cannot find libsphinxclient headers

解決方法:進入下載包的ctsf文件夾的api文件夾找到libsphinxclient文件夾,進入文件夾編譯安裝configure make && make isntall

二、/root/sphinx-1.1.0/sphinx.c:1888:43: warning: assignment from incompatible pointer type [enabled by default]

這是因為擴張的版本和以安裝的php的版本之間代碼的嚴格行造成的。

修改sphinx.c文件105行,添加默認值null

retval = std_hnd->read_property(object, member, type TSRMLS_CC, NULL);

配置擴展:在php.ini的下面加上:extension=”sphinx.so”

總結

以上是生活随笔為你收集整理的coreseek mysql安装_coreseek安装和使用(一)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。