CENTOS安装ElasticSearch
原文链接:https://my.oschina.net/topeagle/blog/591451?fromerr=mzOr2qzZ
CENTOS安装ElasticSearch
ElasticSearch 概述
- ElasticSearch是一个高可扩展的开源的全文搜索分析引擎。
它允许你快速的存储、搜索和分析大量数据。ElasticSearch通常作为后端程序,为需要复杂查询的应用提供服务。- Elasticsearch是一个基于Lucene的开源分布式搜索引擎,具有分布式多用户能力。Elasticsearch是用java开发,提供Restful接口,能够达到实时搜索、高性能计算;同时Elasticsearch的横向扩展能力非常强,不需要重启服务,基本上达到了零配置。
ElasticSearch 安装
安装前准备
- 安装JDK7及以上版本(这里不再讲述JDK安装步骤)
- 下载ElasticSearch安装包,点击 获取elasticsearch-2.1.1.tar.gz安装包
安装ElasticSearch
运行下面命令将安装包移动到 /opt 目录,然后转到 opt 目录
mv elasticsearch-2.1.1.tar.gz /opt cd /opt解压安装包,然后重命名为 elasticsearch
tar zxvf elasticsearch-2.1.1.tar.gz
mv elasticsearch-2.1.1 elasticsearch进入elasticsearch/bin下运行elasticsearch脚本启动
cd elasticsearch/bin
./elasticsearch
如果是用root启动,需要继续下面步骤
如果是用root账号启动,会报以下错误
Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root. at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35) Refer to the log for complete error details.这是出于系统安全考虑设置的条件。由于ElasticSearch可以接收用户输入的脚本并且执行,为了系统安全考虑,
建议创建一个单独的用户用来运行ElasticSearch创建elsearch用户组及elsearch用户
groupadd elsearch
useradd elsearch -g elsearch -p elasticsearch更改elasticsearch文件夹及内部文件的所属用户及组为elsearch:elsearch
cd /opt
chown -R elsearch:elsearch elasticsearch切换到elsearch用户再启动
su elsearch cd elasticsearch/bin
./elasticsearch启动后打印信息如下
[2015-12-30 10:15:44,876][WARN ][bootstrap ] unable to install syscall filter: prctl(PR_GET_NO_NEW_PRIVS): Invalid argument
[2015-12-30 10:15:45,175][INFO ][node ] [Grim Hunter] version[2.1.1], pid[26383], build[40e2c53/2015-12-15T13:05:55Z]
[2015-12-30 10:15:45,176][INFO ][node ] [Grim Hunter] initializing ...
[2015-12-30 10:15:45,243][INFO ][plugins ] [Grim Hunter] loaded [], sites []
[2015-12-30 10:15:45,272][INFO ][env ] [Grim Hunter] using [1] data paths, mounts [[/ (/dev/mapper/vg_yong-lv_root)]], net usable_space [33.3gb], net total_space [49gb], spins? [no], types [ext4]
[2015-12-30 10:15:47,318][INFO ][node ] [Grim Hunter] initialized
[2015-12-30 10:15:47,318][INFO ][node ] [Grim Hunter] starting ...
[2015-12-30 10:15:47,388][INFO ][discovery ] [Grim Hunter] elasticsearch/fnXUCLOQQBiC1aR7hhB82Q
[2015-12-30 10:15:50,442][INFO ][cluster.service ] [Grim Hunter] new_master {Grim Hunter}{fnXUCLOQQBiC1aR7hhB82Q}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2015-12-30 10:15:50,491][INFO ][node ] [Grim Hunter] started
[2015-12-30 10:15:50,526][INFO ][gateway ] [Grim Hunter] recovered [0] indices into cluster_state
ElasticSearch后端启动命令
./elasticsearch -d
CENTOS安装ElasticSearch的更多相关文章
- CENTOS安装ElasticSearch(转)
From: https://my.oschina.net/topeagle/blog/591451?fromerr=mzOr2qzZ CENTOS安装ElasticSearch ElasticSear ...
- Centos安装elasticsearch教程
elasticsearch安装是ytkah在做laravel电商站内搜索要实现的,通过自己的搜索和学习能力不算很费力解决了.下面就整理一下安装elasticsearch教程,服务器是Centos 7, ...
- Centos安装elasticsearch,php连接使用
一.下载安装JAVA 下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html ...
- centos安装Elasticsearch步骤
1.安装JDK:centos删除openJDK,安装JDK,vim /etc/profile配置JAVA_HOME 2.官网下载elasticsearch:https://www.elastic.co ...
- CentOS 安装 elasticsearch 注意点
注意点: 1. 从官网下载以 rpm 结尾的软件包 7.3.1版本 下载地址: https://artifacts.elastic.co/downloads/elasticsearch/elastic ...
- centos安装服务参考博客,亲测可用
centos 安装nginx参考 日志log报错 nginx -c /etc/nginx/nginx.conf https://blog.csdn.net/weixin_41004350/articl ...
- mac以及centos下安装Elasticsearch 以及权限管理插件
Elasticsearch安装(提前系统需要安装java环境)mac安装 brew install elasticsearch centos安装 下载ElasticSearch安装包,https:// ...
- Centos 7上安装Elasticsearch
1. 先安装jdk yum search java|grep jdk查看yum库中都有哪些jdk版本 yum install java-1.8.0-openjdk.x86_64 两次y确认 2. ce ...
- (转载)Centos下Elasticsearch安装详细教程
原文地址:http://www.cnblogs.com/sunny1009/articles/7874251.html Centos下Elasticsearch安装详细教程 1.Elasticsear ...
随机推荐
- 使用 resizableImageWithCapInsets 方法实现可伸缩图片
之前介绍过通过 stretchableImageWithLeftCapWidth:topCapHeight: 方法来实现可伸缩图片: 可看这篇随笔:使用 stretchableImageWithLef ...
- 远程执行命令和文件分发shell脚本
deploy.conf node01,all,other,datanode,journalnode,zookeeper, node02,all,other,datanode,journalnode,z ...
- Pair programming
Pair programming is an agile software development technique in which two programmers work together a ...
- linux环境变量的概述
https://blog.csdn.net/u010533843/article/details/54986646 https://www.linuxidc.com/Linux/2017-08/146 ...
- 分表需要解决的问题 & 基于MyBatis 的轻量分表落地方案
分表:垂直拆分.水平拆分 垂直拆分:根据业务将一个表拆分为多个表. 如:将经常和不常访问的字段拆分至不同的表中.由于与业务关系密切,目前的分库分表产品均使用水平拆分方式. 水平拆分:根据分片算法将一个 ...
- Java Comparable和Comparator
Java中在进行数据排序时,Comparable和Comparator不可缺少会遇得到.普通的String.Integer等类型,已经实现了Comparable接口,而有些时候,我们须要对一些其它不存 ...
- MongoDB管理
前几篇文章都是从开发和使用的角度了解了MongoDB的各个知识点,这篇文章将从MongoDB管理的角度入手,了解MongoDB管理所要了解的基本知识. 数据库命令 在前面几篇文章中,已经接触了一些数据 ...
- [Cubieboard] 在 Cubieboard 上安装 Node.js 和 npm
你有两个选择可以实现在Cubieboard上安装NodeJS,下载别人已经编译完成适用于Cubieboard的NodeJS二进制包,或者自己下载源码自行在Cubieboard上进行编译. 使用编译完成 ...
- 【摘】50个jQuery代码段帮助你成为一个更好的JavaScript开发者
今 天的帖子会给你们展示50个jQuery代码片段,这些代码能够给你的JavaScript项目提供帮助.其中的一些代码段是从jQuery1.4.2才 开始支持的做法,另一些则是真正有用的函数或方法,他 ...
- javaweb项目中表单生成的验证码以及校验
首先先来看一下项目的结构吧,有两个servlet,一个是进行验证码的生成以及存储的,一个是进行校验的,还有一个jsp页面是用来实现form表单的书写和展示: 我们只需要看这三个就行了,其他的自动忽略: ...