zoukankan      html  css  js  c++  java
  • 在yum安装lamp的环境下安装coreseek以及php的sphinx扩展

    首先说明下,之前的lamp环境用yum快速安装的现在装一个coreseek学习学习;

    在安装前建议安装下这四个东西,以免后续安装报错

    $ curl -O -L http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
        $ tar -xzvf m4-1.4.13.tar.gz
        $ cd m4-1.4.13
        $ ./configure --prefix=/usr/local
        $ make && make install
        $ cd ..
    
        $ curl -O -L http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
        $ tar -xzvf autoconf-2.65.tar.gz
        $ cd autoconf-2.65
        $ ./configure --prefix=/usr/local
        $ make && make install
        $ cd ..
    
        $ curl -O -L http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
        $ tar xzvf automake-1.11.tar.gz
        $ cd automake-1.11
        $ ./configure --prefix=/usr/local
        $ make && make install
        $ cd ..
    
        $ curl -O -L http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
        $ tar xzvf libtool-2.2.6b.tar.gz
        $ cd libtool-2.2.6b
        $ ./configure --prefix=/usr/local
        $ make && make install
        $ cd ..

    下载coreseek:http://www.coreseek.cn/products-install/install_on_bsd_linux/

    按照官网上介绍的一样来安装

    ##安装mmseg
    $ cd 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 --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64/mysql   ##如果提示mysql问题,可以查看MySQL数据源安装说明
    $ make && make install
    $ cd ..

    在安装之前记得yum已经把mysql-devel这个安装好,到此coreseek就安装好了
    我测试的一个配置文件,大家可以试试 配置下载
    /usr/local/coreseek/bin/search -c /usr/local/coreseek/etc/csft_mysql.conf  abc 
    
    用这个命令来测试下,看是否有搜索结果

    【sphinx的php扩展安装】

     先下载扩展包 【下载

    cd /coreseek-4.1-beta/csft-4.1/api/libsphinxclient

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

    出现一个报错

    config.status: error: cannot find input file: `Makefile.in'

    然后运行automake,又弹出一个提示说automake版本不匹配(唉安装就是这么累)

    按照提示要求的版本重新下载了automake【下载

    然后再automake.11一下(重新安装后我名字加了个.11,命令的名称也要变,不然还是之前的命令)

    继续回到上面

    cd /coreseek-4.1-beta/csft-4.1/api/libsphinxclient
    
    ./configure --prefix=/usr/local/sphinxclient
    完成后
    make && make install

    解压之前下载好的扩展包

    tar -zxf sphinx-1.3.2.tgz

    进入目录
    cd sphinx-1.3.2
    执行下
    /usr/bin/phpize
    
    ./configure --with-php-config=/usr/bin/php-config --with-sphinx=/usr/local/sphinxclient/
    我配置中的相关目录大家注意下,因为我的php环境是yum安装的,如和你们的不一样换响应替换下
    
    make && make install
    
    到这里就基本上安装完了
    
    最后在php.ini中添加
    extension=sphinx.so
    重启httpd服务后再看看phpinfo页面

    大功告成了,祝你也成功,不成功留言一起研究。

    [特别说明]

    Linux系统下进行configure时,有时候会出现如下莫名其妙的错误:

                   .infig.status: error: cannot find input file:

            查看config.log日志文件也看不出什么问题,该问题是configure.ac(或configure.in)文件的格式不正确导致,只需要用vi打开configure.ac或configure.in文件,然后用set ff=unix命令重新设置一下文件格式,然后保存退出,再autoreconf -vif一下,重新configure就OK了。

     
  • 相关阅读:
    VC计时器的一个使用心得
    从送新年礼物给外甥想到的
    对公司用人的一些思考
    [Python学习]PycURL简单学习 limodou的学习记录 limodou是一个程序员,他关心的焦点是Python, DocBook, Open Source …
    Django tips: the difference between 'blank' and 'null'
    django 单独使用数据模型
    Django application as a standalone desktop application at finally{}
    和煦: curl_setopt($ch, CURLOPT_RETURNTRANSFER,1) 使用
    [sqllite]c语言操作sqlite一: 连接sqlite数据库
    使用curl抓取网页遇到HTTP跳转时得到多个HTTP头部的问题
  • 原文地址:https://www.cnblogs.com/zhucheer/p/4048334.html
Copyright © 2011-2022 走看看