Ubuntu卸载elasticsearch

前端之家收集整理的这篇文章主要介绍了Ubuntu卸载elasticsearch前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在ubuntu中使用deb文件安装了elasticsearch.90.7.
我尝试使用以下命令卸载elasticsearch.90.7:
sudo apt-get --purge autoremove elasticsearch

然后我下载了elasticsearch-1.6.0.deb来安装elasticsearch 1.6.

当我运行此命令以通过deb文件安装elasticsearch 1.6时:

dpkg -i elasticsearch-1.6.0.deb

它告诉我这个:

Selecting prevIoUsly unselected package elasticsearch.
(Reading database ... 89826 files and directories currently installed.)
Preparing to unpack elasticsearch-1.6.0.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (1.6.0) ...
Setting up elasticsearch (1.6.0) ...
Processing triggers for ureadahead (0.100.0-16) ...

当我使用服务弹性搜索启动elasticsearch时,它开始启动,但是当我运行此命令时:curl http:// localhost:9200

显示了这个错误

curl: (7) Failed to connect to localhost port 9200: Connection refused

我认为elasticsearch没有正确安装.我想知道我应该怎么做才能正确安装elasticsearch.

(1)删除以前版本的ElasticSearch:
sudo apt-get --purge autoremove elasticsearch

(2)删除ElasticSearch目录:

sudo rm -rf /var/lib/elasticsearch/
sudo rm -rf /etc/elasticsearch

(3)安装ElasticSearch 1.6:

sudo dpkg -i elasticsearch-1.6.0.deb

(4)启动服务:

sudo service elasticsearch start

(5)测试它是否有效:

sudo service elasticsearch status
curl -XGET "http://localhost:9200/_cluster/health?pretty=true"
curl "localhost:9200/_nodes/settings?pretty=true"
原文链接:/ubuntu/348911.html

猜你在找的Ubuntu相关文章