您的位置:首页 > 运维架构 > Linux

centos6安装elasticsearch-2.3.3

2016-05-19 17:30 399 查看
摘要: centos6安装elasticsearch-2.3.3

一、elasticsearch安装
# cd /usr/local/src
# wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.3/elasticsearch-2.3.3.tar.gz # tar -zxvf elasticsearch-2.3.3.tar.gz
如果是用root启动会报错,需要创建用户
# groupadd elsearch
# useradd elsearch -g elsearch -p elasticsearch
# cd /usr/local/src/
# chown -R elsearch:elsearch elasticsearch-2.3.3
# su elsearch
# ./bin/elasticsearch
在浏览器中输入 http://ip:9200/ 访问,如果无法访问,需要修改配置文件elasticsearch.yml
# vim /usr/local/src/elasticsearch-2.3.3/config/elasticsearch.yml
# Set the bind address to a specific IP (IPv4 or IPv6):
network.host: 192.168.1.216
# Set a custom port for HTTP:
http.port: 9200
# ./bin/elasticsearch -d #后台进程启动
再次访问显示如下内容说明成功
{
"name" : "Agron",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.3.3",
"build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
"build_timestamp" : "2016-05-17T15:40:04Z",
"build_snapshot" : false,
"lucene_version" : "5.5.0"
},
"tagline" : "You Know, for Search"
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: