问题描述
我想知道Django-Haystack + elasticsearch + pyelasticsearch / elasticsearch-py的最佳组合是什么。我在Ubuntu 12.04机器上部署了使用干草堆2.1.1-dev + elasticsearch 1.1.1 + elasticsearch-py 1.0的设置。我尝试使用Haystack 2.1.0(最新的稳定版本)与弹性搜索1.1.1和pyelasticsearch 0.6.1,但它不断给我一个错误,说Django-Haystack取决于pyelasticsearch;所以我切换到2.1.1-dev的,这美丽的工作。但现在我想部署一个Django应用程序到一个CentOS 6.5的机器的一个实例(草垛2.1 .1开发+ elasticsearch 1.1.1 + elasticsearch-PY 1.0),和我得到同样的pyelasticsearch相关性错误。
这是谁的人有任何提示或提示。部署至CentOS将不胜感激
得到它的工作,似乎是一个SELinux的误差,固定有:
#setenforce 0
有关参考,我们有这些包安装在的virtualenv:
-e GIT中://github.com/toastdriven /django-haystack.git@366e7489169d460d36ac4d942c22c0e97e58c26b#egg=django_haystack-master
elasticsearch == 1.0.0
和弹性搜索-1.1.1-1.noarch通过yum在CentOS 6上
编辑:更广泛的修复不会广泛禁用SELinux:
#setsebool -P httpd_can_network_connect on
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.
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
这篇关于稳定的Django-Haystack +弹性搜索设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!