計劃上年年頭做的事,中間一直沒做,還以為要放棄了,想不到周周轉轉,在今年年頭給做了出來。還是有少少開心的。
而下都是我在安裝過程中的坑,都記錄下來了,希望幫到自己又幫到人啦。
安裝mmseg
$ cd mmseg
$ ./configure --prefix=/usr/local/mmseg
$ make
$ make install
安裝mmseg3時出現config.status: error: cannot find input file: src/Makefile.in
http://vtrtbb.iteye.com/blog/1933050 (根據不同系統,按需安裝,我的是m4)
2.安裝Coreseek
./buildconf.sh (記得要先運行這個,再初始化)
安裝Coreseek ./configure時 是報:checking MySQL include files... configure: error: missing include files.
因為mysql5.5的/usr/local/mysql/lib/mysql是不存在的,所以把--with-mysql-libs這個配置去掉
因為--with-mysql-includes這個配置是需要mysql.h這個文件,而這個文件在mysql的源碼里面,所以配置要寫成--with-mysql-includes=/root/lnmp1.1-full/mysql-5.5.37/include/ (在實際環境中這個地址要改成其他地方)
不然在make 命令就會報這個錯sphinx.h:62:19: error: mysql.h: No such file or directory
./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql/ --with-mysql-includes=/root/lnmp1.1-full/mysql-5.5.37/include/ --with-mmseg=/usr/local/mmseg/ --with-mmseg-includes=/usr/local/mmseg/include/mmseg --with-mmseg-libs=/usr/local/mmseg/lib/
make && make install
3.php安裝sphinx擴展
安裝完 make test報錯
The test-suite requires that proc_open() is available.
到php.ini 將disable_functions 里面的proc_open這個去掉
4.多表多索引查詢
在/usr/local/sphinx/etc/csft_mysql.cnf 那里寫多幾個source(根據自己要查多少個表,就寫多少個source,包括增量索引),注意在index配置里面的source,要寫回對應source源,而php代碼如下
$sphObj->AddQuery($keyword, 'goods_brand,goods_cate'); $res = $sphObj->RunQueries()
參考鏈接:
詳細安裝配置:http://blog.csdn.net/e421083458/article/details/21529969#t3
按錯錯誤解決辦法:http://vtrtbb.iteye.com/blog/1933050
配置coreseek支持mysql數據源:http://www.phperz.com/article/14/0615/95.html
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。