关键词:
版本信息
Vmware虚拟机
Centos 6.7
JDK à 1.8或以上版本
ES à 5.5.2
nodeJSà6.0以上(启动elasticsearch-head插件用)
1.2 安装流程
1.2.1 下载ES版本, 解压, 即可使用, ./bin/elasticsearch -d便可在后台开始elasticsearch
1) 将elasticsearch安装包拷贝到相应的目录
[rodge@centos6 elastic]$ ls elasticsearch-5.5.2.tar.gz [rodge@centos6 elastic]$ pwd /home/rodge/local/elastic [rodge@centos6 elastic]$ |
2) 解压
[rodge@centos6 elastic]$ tar -xvf elasticsearch-5.5.2.tar.gz |
3)启动elasticsearch
./elasticsearch-5.5.2/bin/elasticsearch |
如果需要在后台启动, 则在该命令后加上”-d”, 即” ./elasticsearch-5.5.2/bin/elasticsearch -d”
表示启动成功
4) 通过链接方位elasticsearch, 默认http端口为9200
curl -XGET http://localhost:9200 |
5)通过外部浏览器访问方法
首先, 在elasticsearch安装文件中, 修改config/elasticsearch.yml文件访问地址network.host
vi config/elasticsearch.yml |
在文件”Network”中添加” network.host: 192.168.253.128”(192.168.253.128为本机ip), 或者将地址配置为”0.0.0.0”(0.0.0.0为通配ip)
2) 再次启动如报错, 如错误信息为如下信息,
则需要还在elasticsearch.yml文件中新增如下内容(具体说明详见之后的—“常见启动错误”)
在”Memory”中添加:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
此外, 还需要开启防火墙9200端口(9200是elasticsearch默认http端口)
1.2.2 开放防火墙iptables端口
/sbin/iptables -I INPUT -p tcp --dport 9200 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
查看CentOS防火墙信息:/etc/init.d/iptables status
1.2.3 安装head
1) 首先, 将head插件拷贝到指定的目录, 本文将head插件压缩包拷贝至elasticsearch文件夹下
2)解压head插件
unzip elasticsearch-head-master.zip |
3)安装nodeJS, 版本要求在6.0以上
首先, 将nodeJS压缩包拷贝至相应的路径
然后, 解压压缩包
tar -xvf node-v6.9.1-linux-x64.tar.gz |
修改配置文件
vi /etc/profile |
# node (注释作用) export NODE_HOME=/home/rodge/local/nodeJS/node-v6.9.1-linux-x64 export PATH=$PATH:$NODE_HOME/bin export NODE_PATH=$NODE_HOME/lib/node_modules
|
重新编译配置文件
source /etc/profile |
查看nodeJS安装版本
node -v
4) 在elasticsearch-head-master安装目录下运行:
npm install |
5) 启动elasticsearch-head插件
npm run start |
启动成功, 注意要打开防火墙9100端口, elasticsearch-head默认端口为9100
1.2.4 es与head插件关联
在elasticsearch安装目录中更改如下文件
vi conf/elasticsearch.yml |
在最后加入以下内容
http.cors.enabled: true http.cors.allow-origin: "*" |
重新启动elasticsearch和elasticsearch-head插件, 可以通过网页查看elasticsearch集群情况
1.2.5 elasticsearch集群配置
主节点配置
vi config/elasticsearch.yml 在文件最后添加如下内容 #集群名称(每个集群的该名称一致) cluster.name: wali #节点名称(每个节点的名称不同) node.name: master #主机设置 node.master: true #注解ip, 端口默认(9200) network.host: 192.169.253.129 (本机ip) |
从属节点配置
创建从属节点elasticsearch的文件夹
mkdir es_slave
拷贝解压elasticsearch两份
cp elasticsearch-5.5.2.tar.gz es_slave/
cd es_slave/
tar -xvf elasticsearch-5.5.2.tar.gz
cp -r elasticsearch-5.5.2 es_slave1
cp -r elasticsearch-5.5.2 es_slave2
从节点slave1的elasticsearch.yml配置修改
从节点集群名称和节点名称指定, 集群名称必须与主节点一致
cluster.name: wali node.name: slave1 #从节点ip地址和端口 network.host: 192.169.253.129 http.port: 8200 #从节点与主节点的连接 discovery.zen.ping.unicast.hosts: ["192.168.253.129"] |
从节点slave2的配置与从节点1的配置类似
1.3 常见启动错误
1> 不能以root账户启动elasticsearch, 否则有可能报错
2> max file descriptors [4096] for elasticsearch process is too
low, increase to at least [65536]
max number of threads [1024] for user [hadoop] is too low, increase to at least
[2048]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at
least [262144]
解决方案:
编辑limits.conf 文件
vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
vim /etc/security/limits.d/90-nproc.conf
找到如下内容:
soft nproc 1024
修改为
soft nproc 2048
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sysctl -p
3> ERROR: bootstrap
checks failed
system call filters failed to install; check the logs and fix your
configuration or disable system call filters at your own risk
原因:
这是在因为Centos6不支持SecComp,而ES5.2.0默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。
解决:
在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
elasticsearch+kibana+metricbeat安装部署方法
elasticsearch+kibana+metricbeat安装部署方法 本文是elasticsearch+kibana+metricbeat,没有涉及到logstash部分。通过beat收集数据发送到elasticsearch中,用kibana去查询elasticsearch来展示数据。以下是安装部署需要准备的包: 安装包版本elastics... 查看详情
elasticsearch-1.7.0安装部署
1、首先去elasticsearch官网下载软件包版本1.7.0版本.#wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.0.tar.gz2、解压elasticsearch-1.7.0.tar.gz软件包.#tar zxf elasticsearch-1.7.0 查看详情
elasticsearch安装与部署kibana(代码片段)
文章目录安装elasticsearch1.部署单点es1.1.创建网络1.2.加载镜像1.3.运行2.部署kibana2.1.部署2.2.DevTools安装elasticsearch1.部署单点es1.1.创建网络因为我们还需要部署kibana容器,因此需要让es和kibana容器互联。这里先创建一个网络:d... 查看详情
elasticsearch安装与部署kibana(代码片段)
文章目录安装elasticsearch1.部署单点es1.1.创建网络1.2.加载镜像1.3.运行2.部署kibana2.1.部署2.2.DevTools安装elasticsearch1.部署单点es1.1.创建网络因为我们还需要部署kibana容器,因此需要让es和kibana容器互联。这里先创建一个网络:d... 查看详情
elasticsearch6.6.1安装部署
1.下载安装包https://www.elastic.co/cn/downloads/elasticsearch我下的是Linux环境的tar包2.解压安装包tar-xvf elasticsearch-6.1.1.tar.gz3.启动命令切换普通用户,进入bin目录启动./elasticsearch或./elasticsearch-d(守护进程)4.如果有报错按照下面方法... 查看详情
elasticsearch5.5部署安装
1.ElasticSearch介绍ElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTfulweb接口。Elasticsearch是用Java开发的,并作为Apache许可条款下的开放源码发布,是第二流行的企业搜索引擎。设... 查看详情
安装部署elasticsearch(代码片段)
环境准备:服务器:centos7服务器1台,IP:10.0.0.103安装包:elasticsearch-6.1.1.tar.gzjdk-8u151-linux-x64.tar.gz[[email protected]~]#ll-rw-r--r--1rootroot337838806月311:18elasticsearch-6.1.1.tar.gz-rw-r--r--1rootroot1 查看详情
elasticsearch安装部署
版本信息 Vmware虚拟机 Centos6.7 JDKà1.8或以上版本 ESà5.5.2 nodeJSà6.0以上(启动elasticsearch-head插件用) 1.2安装流程1.2.1下载ES版本,解压,即可使 查看详情
elasticsearch的安装部署(代码片段)
https://blog.csdn.net/lubin2016/article/details/81606753 1.elasticsearch的安装1.1集群规划上传elasticsearch的tar.gz包至规划的集群各节点的目录下(规划两个节点rc-fhcb-10-es001,rc-fhcb-10-es002),如:本项目安装在/opt/fhcb/目录下注意:建议elasticse 查看详情
centos7.4安装elasticsearch6.1.3集群部署
Centos7.4安装elasticsearch6.1.3集群部署安装elasticsearch1.依赖环境安装这里使用的java是1.8.0_77的版本.使用的是rpm安装包的形式进行部署安装。配置环境变量[[email protected]~]#cat.bash_profileexportJAVA_HOME=/usr/java/jdk1.8.0_77/ &nbs 查看详情
mac下elasticsearch安装部署(代码片段)
...件的支持,且安装方式较简单地址:https://github.com/medcl/elasticsearch-rtf解压到指定目录后,获取该集成包所支持的插件列表bin/elasticsearch-pluginlist删除多余插件这其中,大多数插件一般都用不上的,因此会浪费一些内存空间bin/elastic... 查看详情
elasticsearch5.0.0安装部署常见错误或问题
ElasticSearch5.0.0安装部署常见错误或问题问题一:[2016-11-06T16:27:21,712][WARN][o.e.b.JNANatives]unabletoinstallsyscallfilter:Java.lang.UnsupportedOperationException:seccompunavailable:requireskernel3.5+withCO 查看详情
elasticsearch5.5安装部署(代码片段)
Elasticsearch5.5下载https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.tar.gzJDK1.8下载http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u18 查看详情
elasticsearch搜索引擎安装部署
实验环境:redhat6.5server1172.25.35.1redhat6.5server1172.25.35.2redhat6.5server1172.25.35.3准备安装包;[[email protected]elk]#lsbigdesk-master.zipjemalloc-devel-3.6.0-1.el6.x86_64.rpmelasticsearch-2.3.3.rpm 查看详情
linux12elk-->02elasticsearch部署(代码片段)
文章目录ELKElasticsearch部署ElasticSearch一、ELK部署1、环境准备2、优化3、下载安装包4、设置elastcsearch内存锁定5、修改elastcsearch内存大小6、修复elastcsearch配置文件(单台测试)7、启动服务二、安装集群head插件1、docker安装2... 查看详情
es实战elasticsearch6.7的安装部署卸载-rpm方式(代码片段)
Elasticsearch6.7的安装部署卸载-RPM方式文章目录Elasticsearch6.7的安装部署卸载-RPM方式环境准备系统调优安装操作错误总结错误一:memlockunlimited错误二:memoryisnotlocked卸载补充知识systemctl常用指令表格RPM包采用系统默认的安装... 查看详情
elasticsearch6.x集群安装部署(代码片段)
...版本不能低于1.8,推荐使用openjdk软件包版本下载地址elasticsearch6.2.3https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.3.rpmopenjdk9.0.4https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz部署步骤三个节分别安... 查看详情
linux下安装部署elasticsearch教程7.10.1
(1)cd到/usr/local目录下,新建es文件夹,cd到es文件夹下cd/usr/local/mkdirescdes(2)下载ElasticSearchwgethttps://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.1-linux-x86_64.tar.gzES下载教程 查看详情