Elasticsearch安装及其插件安装

安装
环境必须是java环境;如果设置java环境变量设置之后启动加载不了环境变量,可以打开启动文件在
fi
echo 111
echo $JAVA_HOME
if [ -x "$JAVA_HOME/bin/java" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA=`which java`
fi

if [ ! -x "$JAVA" ]; then
echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME"
exit 1
fi
将$JAVA_HOME手动设置为jre所在路径
在官网下载 https://www.elastic.co/products/elasticsearch源码包,tar zxvf 将源码包解压,将解压之后的elasticsearch-2.4.0所有用户设置为非root账户,进入conf目录更改其配置
#
# Use a descriptive name for the node:
#
node.name: node-1
#
# Add custom attributes to the node:
#
# node.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/es/data
#
# Path to log files:
#
path.logs: /var/es/logs
#
# -------------------------------
用非root账户启动./elasticsearch curl "http://127.0.0.1:9200";查看
返回
{
"name" : "node-1",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.4.0",
"build_hash" : "ce9f0c7394dee074091dd1bc4e9469251181fc55",
"build_timestamp" : "2016-08-29T09:14:17Z",
"build_snapshot" : false,
"lucene_version" : "5.5.2"
},
"tagline" : "You Know, for Search"
}
启动成功。
插件安装
先安装kibana
下载 https://www.elastic.co/downloads/kibana源码包,解压
在es主目录执行
bin / plugin install license
启动es
在kibana执行安装graph
bin / kibana plugin -- install elasticsearch / graph / latest
其他插件安装方法类似,见官网,插件安装后访问
localhost:5601


常见错误多是由于权限所引起,将整个目录以及子目录设置成非root账号及非root用户组再运行

猜你喜欢

转载自blog.csdn.net/abc595951988/article/details/71429881
今日推荐