我一直在关注多个教程: http://zrashwani.com/introduction-to-sphinx/#.VsCSf5MrKb8 https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-sphinx-on-ubuntu-14-04
我一直在撞墙。无论何时我使用命令"搜索"我已经跟随每一步到达点。通过SSH我收到以下消息:
该计划'搜索'目前尚未安装。您可以输入以下命令安装它: apt-get install sphinxsearch
现在,我确实安装了sphinxsearch。事实上,我可以通过运行索引器来完成所有工作:
root@panel:/usr/bin# indexer --all
Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'videos_index'...
collected 1 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 1 docs, 148 bytes
total 0.005 sec, 25539 bytes/sec, 172.56 docs/sec
indexing index 'delta'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec
total 8 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 19 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg
我甚至可以打开searchd:
root@panel:/usr/bin# searchd
Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
listening on 127.0.0.1:9312
listening on all interfaces, port=9312
precaching index 'videos_index'
precaching index 'delta'
precached 2 indexes in 0.002 sec
但是当我尝试运行测试搜索时,我收到消息:
root@panel:/usr/bin# search test
The program 'search' is currently not installed. You can install it by typing: apt-get install sphinxsearch
我做错了什么? 这是在运行Ubuntu 14.04和VestaCP
的digitalocean Droplet上答案 0 :(得分:0)
如果安装正确,则不是search
,而是searchd
。假设您按照默认说明进行安装,您应该在/usr/local/sphinx/bin/
中找到该守护进程。
在运行之前,您需要运行同一目录中的indexer
。
答案 1 :(得分:0)
新的spninx版本中已删除搜索程序。使用 SphinxQL 来测试sphinx。
在https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-sphinx-on-ubuntu-16-04
上查看Sphinx的新教程免责声明:我是该文章的作者。