CentOS 7.3 安装ElasticSearch5.6.1步骤
来源:互联网 发布:数据挖掘岗位要求 编辑:程序博客网 时间:2024/06/04 23:34
1.准备并安装好CentOS系统(本文是在Vmware下安装,配置的硬件信息是双核4G内存),下载链接如下:
CentOS: https://www.centos.org/download/
2.用户设置,如果当前默认登录root用户,需要创建一个普通用户(ES5.x以后版本不支持root下启动):
添加用户es,所属root组密码test123
>useradd es -g root -p test123
3. 下载ElasticSearch包,链接如下:
>wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.1.zip
>unzip elasticsearch-5.6.1.zip
4.解压elasticsearch-5.6.1.zip至/home/es/目录下,并给目录elasticsearch-5.6.1赋es权限
>chown -R es:root elasticsearch-5.6.1
5.安装java:
>yum install java -y
6.在root用户下操作:
>vi /etc/security/limits.conf
添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
保存退出.
>vim /etc/security/limits.d/20-nproc.conf
修改如下内容:
* soft nproc 4096
#修改为
* soft nproc 2048
修改配置sysctl.conf
>vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
>sysctl -p
修改yml配置文件:
> vim config/elasticsearch.yml
修改bind address:
network.host: 0.0.0.0
6.启动es:
>cd /home/es/elasticsearch-5.6.1/
>su es
> ./bin/elasticsearch
显示如下信息说明安装成功:
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module[aggs-matrix-stats]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module [ingest-common]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module[lang-expression]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module [lang-groovy]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module [lang-mustache]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module [lang-painless]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module [parent-join]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module [percolator]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module [reindex]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module[transport-netty3]
[2017-09-21T01:26:28,877][INFO ][o.e.p.PluginsService ] [9dhujIO] loaded module[transport-netty4]
[2017-09-21T01:26:28,878][INFO ][o.e.p.PluginsService ] [9dhujIO] no plugins loaded
[2017-09-21T01:26:30,574][INFO ][o.e.d.DiscoveryModule ] [9dhujIO] using discovery type [zen]
[2017-09-21T01:26:31,258][INFO ][o.e.n.Node ] initialized
[2017-09-21T01:26:31,258][INFO ][o.e.n.Node ] [9dhujIO] starting ...
[2017-09-21T01:26:31,455][INFO ][o.e.t.TransportService ] [9dhujIO] publish_address {127.0.0.1:9300},bound_addresses {127.0.0.1:9300}
[2017-09-21T01:26:31,467][WARN ][o.e.b.BootstrapChecks ] [9dhujIO] max file descriptors [4096] forelasticsearch process is too low, increase to at least [65536]
[2017-09-21T01:26:34,555][INFO ][o.e.c.s.ClusterService ] [9dhujIO] new_master{9dhujIO}{9dhujIOFR9-vaVR2ZLjhSw}{iN4sZh8PRdmOrDvUir7pXQ}{127.0.0.1}{127.0.0.1:9300},reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-09-21T01:26:34,646][INFO ][o.e.g.GatewayService ] [9dhujIO] recovered [0] indices intocluster_state
[2017-09-21T01:26:34,649][INFO][o.e.h.n.Netty4HttpServerTransport] [9dhujIO] publish_address{127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2017-09-21T01:26:34,649][INFO ][o.e.n.Node ] [9dhujIO] started
7.用curl检查是否连接成功或浏览器连接http://localhost:9200:
>curl localhost:9200
{
"name" :"9dhujIO",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "PeP7JMg7R9mAvU6suUPJNw",
"version": {
"number": "5.6.1",
"build_hash" : "667b497",
"build_date" : "2017-09-14T19:22:05.189Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline": "You Know, for Search"
}
8.设置防火墙端口9200,9300例外:
>systemctl start firewalld.service
>systemctl enable firewalld.service
>systemctl status firewalld.service
>firewall-cmd --permanent --add-port={9200/tcp,9300/tcp}
>firewall-cmd --reload
>firewall-cmd --state
>firewall-cmd --list-all
9. 配置ElasticSearch后台运行
>./bin/elasticsearch -d
若启动出现错误根据信息去度娘或谷哥搜一下吧 ,好运~~
- CentOS 7.3 安装ElasticSearch5.6.1步骤
- ElasticSearch5.6.3 安装步骤
- Elasticsearch5、Elasticsearch-head安装步骤
- Centos 下安装elasticsearch5.1
- CentOS 7 安装 Elasticsearch5.2.2
- CentOS 6.8 安装elasticsearch5.2集群
- CentOS上安装ElasticSearch5.4集群
- elasticsearch5安装
- centos+elasticsearch5.1+ik+head+kibana+x-pack安装
- CentOS 7 安装 Elasticsearch5.2.2 的 Head 插件
- linux安装步骤(CentOS 7.3)
- centOs 安装rrdtool 步骤
- centos minimal 安装步骤
- centos安装LAMP步骤
- centos+mysql安装步骤
- Centos安装tmux步骤
- CentOS安装intellijIDEA步骤
- Elasticsearch5 centos 中文搜索搭建
- Linux 系统下jdk环境变量配置
- GET请求中的乱码原理解析和解决方案
- Matlab
- redis基础简介(六)- jedis使用管道(pipeline)对redis进行读写(使用hmset、hgetall测试)
- router 3版本设置router进入的组件对应的离开检测
- CentOS 7.3 安装ElasticSearch5.6.1步骤
- 单调队列优化多重背包
- android mail发送邮件(包含163邮箱及qq邮箱,使用mail.jar,activation.jar,additionnal.jar)
- Java数组详解
- oracle中wm_concat函数将同一列的多行字段值拼接成一行
- 基于 Azure 托管磁盘配置高可用共享文件系统
- 开源电子商城
- 欢迎使用CSDN-markdown编辑器
- 编译pycaffe. matcaffe和mattest出现的问题