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

歡迎訪問 生活随笔!

生活随笔

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

linux

Linux 搭建Sphinx 全文检索引擎

發布時間:2025/3/17 linux 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux 搭建Sphinx 全文检索引擎 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?首先下載mysql和sphinx源碼包

解壓sphinx:
> tar zxvf sphinx-2.0.6-release.tar.gz

解壓Mysql
> tar zxvf mysql-5.1.42.tar.gz

進入到mysql源碼目錄,在mysql-5.1.42/storage目錄下新建sphinx目錄,

進入到sphinx源碼目錄,將sphinx-2.0.6-release/mysqlse/目錄下的所有文件拷貝到mysql-5.1.42/storage/sphinx.

進入到mysql源碼目錄,執行下面命令

1 2 3 4 5 6 7 8 9 >sh BUILD/autorun.sh #它會執行automake 和 autoconf命令生成Makefile >./configure --prefix=/home/admin/mysql-5.1.42 --with-charset=utf8 --with-extra-charsets=all --enable-thread-safe-client --enable-assembler --with-readline --with-big-tables --with-plugins=sphinx >make && make install >cp support-files/my-medium.cnf /etc/my.cnf #拷貝配置文件 >cp ./support-files/mysql.server /etc/init.d/mysqld? #注冊server服務 >chmod +x /etc/init.d/mysqld >chkconfig mysqld on >service mysql start >/home/admin/mysql-5.1.42/bin/mysql_install_db? #安裝數據庫

執行完成后沒有出錯就說明mysql安裝成功了,

登錄mysql

執行 show engines命令,查看sphinx引擎是否安裝成功。

如果有 說明就成功了!

接下來就是編譯安裝sphinx了

1 2 3 4 5 #設置動態加載庫搜索的目錄。 >ldconfig /home/admin/mysql-5.1.42/lib/mysql >ldconfig /home/admin/mysql-5.1.42/include/mysql >./configure --prefix=/home/admin/sphinx-2.0.6 --with-mysql=/home/admin/mysql-5.1.42 >make && make install

這樣就安裝成功了。

下一章,我們來看看怎么用PHP怎么調用Sphinx服務。

原文出處:http://www.imsiren.com/archives/761

轉載于:https://blog.51cto.com/imsiren/1142202

總結

以上是生活随笔為你收集整理的Linux 搭建Sphinx 全文检索引擎的全部內容,希望文章能夠幫你解決所遇到的問題。

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