0
    I make index on one Sphinx compatible xml document.It runs success fully.
Then i make service using searchd command.Following is command to make service 

searchd --install --config "配置文件路径" --servicename "servicename" --port "portnumber"。

If Sphinx config file is put inside Sphinx directory then service create and start successfully.

But if config file is not inside Sphinx directory then service created successfully but it can not start successfully.

Should i change something inside searchd block in config file?
4

2 回答 2

0

根据文档(http://sphinxsearch.com/docs/current.html#ref-searchd),在启动服务时调用创建服务时指定的所有参数。

--install 将 searchd 作为服务安装到 Microsoft 管理控制台(控制面板/管理工具/服务)。在命令行上指定的任何其他参数,其中指定了 --install 也将成为服务未来启动时命令行的一部分。例如,作为调用 searchd 的一部分,您可能还需要使用 --config 指定配置文件,并且您将在指定 --install 的同时执行此操作。一旦调用,通常的启动/停止工具将通过管理控制台变得可用,因此您可以用于启动、停止和重新启动服务的任何方法也适用于 searchd。例子:

C:\WINDOWS\system32> C:\Sphinx\bin\searchd.exe --install --config C:\Sphinx\sphinx.conf

上述命令意味着配置文件必须始终存在于 C:\Sphinx\sphinx.conf 中。

如果您的“配置文件路径”存在并且服务仍然没有启动,那么我建议在http://sphinxsearch.com/bugs/main_page.php创建一个错误,以便解决它。

同时,将配置文件放在它工作的 Sphinx 目录中。

于 2012-06-05T05:19:11.057 回答
0

确保 sphinx 文件夹中有一个日志文件夹。如果您检查配置文件的 searchd 部分,它将有一个选项用于放置日志文件和 pid 的位置。如果目录不存在,则服务将不会启动。

于 2013-01-04T19:31:02.680 回答