elasticsearch-6.0.1安装
elasticsearch-6.0.1安装

Python
1
2
|
tar -zxvf elasticsearch-6.0.1.tar.gz
mv elasticsearch-6.0.1.tar.gz /usr/local/elasticsearch
|
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
|
cluster.name: cluster-es
node.name: es-node1
path.data: /usr/local/elasticsearch/data
path.logs: /usr/local/elasticsearch/logs
network.host: 172.16.64.137
http.port: 9200
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.unicast.hosts: ["172.16.64.137", "172.16.64.138", "172.16.64.147"]
node.master: true
node.data: false
discovery.zen.fd.ping_timeout: 180s
discovery.zen.fd.ping_retries: 10
discovery.zen.fd.ping_interval: 30s
|
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
cluster.name: cluster-es
# 集群名称
node.name: es-node1
# 节点名称,其余两台为es-node2、es-node3
path.data: /usr/local/elasticsearch/data
# 数据目录
path.logs: /usr/local/elasticsearch/logs
# 日志目录
network.host: 172.16.64.137
# 本机IP
http.port: 9200
# 本机http端口
discovery.zen.minimum_master_nodes: 1
# 指定集群中的节点中有几个有master资格的节点
discovery.zen.ping.unicast.hosts: ["172.16.64.137", "172.16.64.138", "172.16.64.147"]
# 指定集群中其他节点的IP
node.master: true
# 是否为master
node.data: false
# 是否为数据节点
discovery.zen.fd.ping_timeout: 180s
# 设置集群中自动发现其它节点时ping连接超时时间
discovery.zen.fd.ping_retries: 10
# 集群中节点之间ping的次数
discovery.zen.fd.ping_interval: 30s
# 集群中节点之间ping的时间间隔
|
Python
1
2
3
|
vim /usr/local/elasticsearch/config/jvm.options
-Xms2g
-Xmx2g
|
Python
1
2
3
4
5
6
7
8
9
|
# 创建用户
useradd ela
# 赋予ela用户所有者权限
chown -R ela:ela /usr/local/elasticsearch
su - ela
[ela@test1 ~]$/usr/local/elasticsearch/bin/elasticsearch -d # -d参数是后台运行
# 建议按以下命令启动
[ela@test1 ~]$ nohup /usr/local/elasticsearch/bin/elasticsearch &
|
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{
"name" : "dcV-DRJ",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "N6qGE15TQqq9-RQedQqqEw",
"version" : {
"number" : "6.1.1",
"build_hash" : "bd92e7f",
"build_date" : "2017-12-17T20:23:25.338Z",
"build_snapshot" : false,
"lucene_version" : "7.1.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
|
Python
1
2
3
4
5
6
7
|
vi /etc/security/limits.conf
#添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
|
Python
1
2
3
4
5
|
vim /etc/sysctl.conf 添加一行
vm.max_map_count=655360
# 执行命令:
sysctl -p
|
Python
1
2
3
4
5
|
tar node-v8.9.3.tar.gz
cd node-v8.9.3
./configure --prefix=/usr/local/node/
make # make时间较长
make install
|
Python
1
2
3
4
5
6
|
vim /etc/profile
export NODEJS_HOME=/usr/local/node/
export PATH=$PATH:$NODEJS_HOME/bin
# 使变量生效
source /etc/profile
|
Python
1
2
|
[root@test1 bin]# node -v
v8.9.3
|
Python
1
2
|
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
|
Python
1
|
npm install
|
Python
1
2
3
4
5
|
#安装国内镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
# 安装插件(在elasticsearch-head目录下)
cnpm install
|
Python
1
2
3
4
5
6
7
8
9
10
11
|
vi Gruntfile.js
connect: {
server: {
options: {
hostname: "0.0.0.0", #新增的一行
port: 9100,
base: '.',
keepalive: true
}
}
}
|
Python
1
2
3
4
|
# 搜索
http://localhost:9200
# 修改为本机IP
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://192.168.1.138:9200";
|
Python
1
2
3
4
5
6
7
|
# 在配置文件的最后加上运行head插件跨域访问rest接口
vim /usr/local/elasticsearch/config/elasticsearch.yml
# 添加如下内容:
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-credentials: true
|
Python
1
|
npm run start &
|
Python
1
2
3
4
5
6
7
8
9
10
11
|
[root@test1 elasticsearch-head]# npm run start
> elasticsearch-head@0.0.0 start /usr/local/elasticsearch-head
> grunt server
>> Local Npm module "grunt-contrib-jasmine" not found. Is it installed?
(node:16304) ExperimentalWarning: The http2 module is an experimental API.
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
|

最简单的方法就是使用nohup。先按Ctrl + C,停止当前运行的Elasticsearch,改用下面的命令运行Elasticsearch
Python
1
|
nohup ./bin/elasticsearch &
|
附:es启动脚本
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/sh
#chkconfig: 2345 80 05
#description: es
export JAVA_HOME=/usr/local/jdk1.8.0_151
export JAVA_BIN=/usr/local/jdk1.8.0_151/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
case $1 in
start)
su ela<<!
cd /usr/local/elasticsearch
./bin/elasticsearch -d
exit
!
echo "es startup"
;;
stop)
es_pid=`ps aux|grep elasticsearch | grep -v 'grep elasticsearch' | awk '{print $2}'`
kill -9 $es_pid
echo "es stopup"
;;
restart)
es_pid=`ps aux|grep elasticsearch | grep -v 'grep elasticsearch' | awk '{print $2}'`
kill -9 $es_pid
echo "es stopup"
su ela<<!
cd /usr/local/elasticsearch
./bin/elasticsearch -d
!
echo "es startup"
;;
*)
echo "start|stop|restart"
;;
esac
|
elasticsearch-6.0.1安装的更多相关文章
- 在Windows上安装Elasticsearch 5.0
在windows上安装Elasticsearch Elasticsearch可以使用.zip软件包安装在Windows上. elasticsearch-service.bat命令,它将设置Elasti ...
- Elasticsearch 5.0 安装 Search Guard 5 插件 (五)
一.Search Guard 简介 Search Guard 是 Elasticsearch 的安全插件.它为后端系统(如LDAP或Kerberos)提供身份验证和授权,并向Elasticsearc ...
- ElasticSearch 5.0.0 集群安装部署文档
1. 搭建环境 3台物理机 操作系统 centos7 es1 192.168.31.141 4g内存 2核 es2 192.168.31.142 4g内存 2核 es3 ...
- ElasticSearch 5.0及head插件安装
一.elasticsearch安装配置 1.官网下载源码包 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0 ...
- Elasticsearch学习之ElasticSearch 5.0.0 安装部署常见错误或问题
ElasticSearch 5.0.0 安装部署常见错误或问题 问题一: [--06T16::,][WARN ][o.e.b.JNANatives ] unable to install syscal ...
- elasticsearch 6.0在Ubuntu下的安装
1:直接下载 elasticsearch 6.0 zip文件 https://www.elastic.co/downloads/past-releases 2:解压:进入到解压后的bin目录,执行 ...
- ElasticSearch 5学习(1)——安装Elasticsearch、Kibana和X-Pack
安装准备: 安装Elasticsearch唯一的要求是安装官方新版的Java,包括对应的Jdk. 安装Elasticsearch 首先到官网下载最新版本的Elasticsearch压缩包. 可以使用命 ...
- ElasticSearch 2 (6) - 插件安装Head、Kopf与Bigdesk
ElasticSearch 2 (6) - 插件安装Head.Kopf与Bigdesk 摘要 安装Elasticsearch插件Head.Kopf与Bigdesk 版本 elasticsearch版本 ...
- Elasticsearch 5.0
Elasticsearch 5.0 使用ES的基本都会使用过head,但是版本升级到5.0后,head插件就不好使了.下面就看看如何在5.0中启动Head插件吧! 官方粗略教程 Running wit ...
- (新)elasticsearch6.0版本安装head插件
ES6.0版本安装head插件 1.1 前言 不知道是我电脑问题还是最近的开源软件都比较**,mysql和elasticsearch新版本变动都比较大. elasticsearch6.0貌似已经不支持 ...
随机推荐
- 为什么总是弹出报错“百度未授权使用地图API”?
今天打开网站的时候出现了这个问题“百度未授权使用地图API, 可能是因为您提供的密钥不是有效的百度开放平台密钥或此密钥未对本应用的百度地图JavasoriptAPI授权.…”经过研究终于知道什么原因了 ...
- spring注解开发:ComponentScan组件扫描
在使用xml方式配置时,我们只需要在xml中配置如下代码: <context:component-scan base-package="包名"></context ...
- Java - 集合框架完全解析
来自:http://www.jianshu.com/p/63e76826e852 数据结构是以某种形式将数据组织在一起的集合,它不仅存储数据,还支持访问和处理数据的操作.Java提供了几个能有效地组织 ...
- HDU 3571 N-dimensional Sphere( 高斯消元+ 同余 )
N-dimensional Sphere Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Oth ...
- FZU 2060 The Sum of Sub-matrices(状态压缩DP)
The Sum of Sub-matrices Description Seen draw a big 3*n matrix , whose entries Ai,j are all integer ...
- A re-introduction to JavaScript (JS Tutorial) 转载自:https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
A re-introduction to JavaScript (JS Tutorial) Redirected from https://developer.mozilla.org/en-US/do ...
- Java面试宝典(3)Java基础部分
51.启动一个线程是用run()还是start()? . 启动一个线程是调用start()方法,使线程就绪状态,以后可以被调度为运行状态,一个线程必须关联一些具体的执行代码,run()方法是该线程所关 ...
- CocoaPods CDN: trunk Repo update failed
问题 今天升级 CocoaPods 到 1.8.4 版本但是随即问题就来了, 执行 pod install 下载库时,出现错误 解决 在 Podfile 加上 source ‘https://gith ...
- 2019-9-2-win10-uwp-颜色转换
title author date CreateTime categories win10 uwp 颜色转换 lindexi 2019-09-02 12:57:38 +0800 2018-2-13 1 ...
- ThreadLocal简单使用示例
ThreadLocal为每个线程提供单独的数据副本,线程间的数据为自身线程所独有(不存在共享变量问题),直接看代码 public class ThreadLocalTest { private sta ...