2012-06-04 21 views
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”。使用Sphinx的searchd命令创建服务

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? 

回答

0

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

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

C:\窗口\ system32> C:\斯芬克斯\ BIN \ searchd.exe --install --config C:\斯芬克斯\ sphinx.conf中

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

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

同时,把配置文件放在Sphinx目录下。

0

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

+0

请不要在您的帖子中使用签名/标语。您的用户箱计为您的签名,您可以使用您的个人资料发布您喜欢的任何关于您自己的信息。 [关于签名/标语的常见问题](http://stackoverflow.com/faq#signatures) –