Stable Django-Haystack + elasticsearch setup

淺唱寂寞╮ 提交于 2019-12-24 00:39:51

问题


I'm wondering what the best combination of Django-Haystack + elasticsearch + pyelasticsearch/elasticsearch-py is. I've deployed a setup using Haystack 2.1.1-dev + elasticsearch 1.1.1 + elasticsearch-py 1.0 on an Ubuntu 12.04 machine. I tried using Haystack 2.1.0 (latest stable release) with elasticsearch 1.1.1 and pyelasticsearch 0.6.1, but it kept throwing me an error saying Django-Haystack depends on pyelasticsearch; so I switched to 2.1.1-dev, which worked beautifully.

But now I'm trying deploy an instance of a Django app to a CentOS 6.5 machine (Haystack 2.1.1-dev + elasticsearch 1.1.1 + elasticsearch-py 1.0), and I'm getting the same pyelasticsearch dependency error.

Any hints or tips from someone who has deployed to CentOS would be much appreciated.


回答1:


Got it working, seemed to be a SELinux error, fixed with:

# setenforce 0

For reference, we have these packages installed in a virtualenv:

-e git://github.com/toastdriven/django-haystack.git@366e7489169d460d36ac4d942c22c0e97e58c26b#egg=django_haystack-master
elasticsearch==1.0.0

And elasticsearch-1.1.1-1.noarch through yum on CentOS 6

Edit: The more general fix that doesn't broadly disable SELinux:

# setsebool -P httpd_can_network_connect on


来源:https://stackoverflow.com/questions/23573109/stable-django-haystack-elasticsearch-setup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!