Ubuntu安装配置sphinx
twocode

    首先获取资源:

        sudo apt-get install sphinxsearch

    自动进行安装,没有异常错误的话,就安装成功!    

    然后复制配置文件:

        sudo cp /etc/sphinxsearch/sphinx.conf.sample /etc/sphinxsearch/sphinx.conf

    安装成功后,默认的有个测试的sql文件:

        /usr/share/doc/sphinxsearch/example-conf/example.sql

    将sql文件,导入数据库 登陆数据库 

        source /.......sql    

    注意导入的数据库要和sphinx.conf中的一致

    创建索引

        sudo indexer --all   

    展现如图信息,说明创建成功:       1433204874364470.png    若出现下面类似错误肯定就是数据库的信息配置错误:                 sql_connect: Access denied for user 'test'@'localhost' (using password: YES) (DSN=mysql://test:***@localhost:3306/test).

    就是说明sphinx.conf 中的数据库相关信息和你的不一致,注意修改,如图:1433204953257611.png    启动sphinx

        sudo /etc/init.d/sphinxsearch start

    正常启动,显示信息如图:

1433204994366955.png

相关文章:
,请先登录查看所有评论
网友评论已关闭