2012-06-04 20 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) –