centos+php+coreseek+sphinx+mysql之一coreseek安裝篇_php執行個體

來源:互聯網
上載者:User

首先附上coreseek4.1版本下載

前期準備工作:

yum install make gcc g++ automake libtool MySQL-client libMySQLclient15-dev libxml2-dev libexpat1-dev autoconf automake libtool

假設我們將檔案包下載在 /usr/local/src下

cd /usr/local/srctar zxvf coreseek-4.1-beta.tar.gzcd coreseek-4.1-beta

1.安裝mmseg分詞模組

cd mmseg-3.2.14/./bootstrap./configure --prefix=/usr/local/mmseg3makemake install

2.安裝CoreSeek

cd ../csft-4.1/

首先提前解決後面會出現的問題:

  a)修改sphinxexpr.cpp檔案,將檔案中的T val = ExprEval ( this->m_pArg, tMatch ) 都修改為 T val = this->ExprEval ( this->m_pArg, tMatch ),總共有三處

vi src/sphinxexpr.cpp

  b)修改buildconf.sh檔案,在&& aclocal \下添加一行 && automake --add-missing \,即變成

#! /bin/shautoheader \&& aclocal \&& automake --add-missing \&& automake --foreign \&& autoconf

  c)修改檔案MakeFile,尋找LIBS, LIBS = -lm -lexpat -L/usr/local/lib 修改為 LIBS = -lm -lexpat -liconv -L/usr/local/lib

vi ./src/MakeFile/

  或者

  在你之前如果已經進行過./configure 操作時,修改檔案configure中,尋找 #define USE_LIBICONV 1 修改為 define USE_LIBICONV 0

  d)修改檔案configure.ac,AM_INIT_AUTOMAKE([-Wall -Werror foreign])改為 AM_INIT_AUTOMAKE([-Wall foreign])

    AC_PROG_RANLIB 下添加一行 AM_PROG_AR

然後運行

sh buildconf.sh./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-mysqlmakemake install 

如果以上還有問題,請留言探討,謝謝,我的資訊也是整合了網上的資源

在服務端進行測試:

cd /usr/local/src/coreseek-4.1-beta/testpackcat var/test/test.xml #此時應該正確顯示中文/usr/local/coreseek/bin/indexer -c etc/csft.conf –all #建立索引/usr/local/coreseek/bin/search -c etc/csft.conf 網路搜尋 #尋找關鍵字

以上所述是小編給大家介紹的centos+php+coreseek+sphinx+mysql之一coreseek安裝篇,希望對大家有所協助,如果大家有任何疑問請給我留言,小編會及時回複大家的。在此也非常感謝大家對雲棲社區網站的支援!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.