elasticsearch-6.0.1安装
elasticsearch-6.0.1安装
1
2
|
tar -zxvf elasticsearch-6.0.1.tar.gz
mv elasticsearch-6.0.1.tar.gz /usr/local/elasticsearch
|
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
|
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的时间间隔
|
1
2
3
|
vim /usr/local/elasticsearch/config/jvm.options
-Xms2g
-Xmx2g
|
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 &
|
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"
}
|
1
2
3
4
5
6
7
|
vi /etc/security/limits.conf
#添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
|
1
2
3
4
5
|
vim /etc/sysctl.conf 添加一行
vm.max_map_count=655360
# 执行命令:
sysctl -p
|
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
|
1
2
3
4
5
6
|
vim /etc/profile
export NODEJS_HOME=/usr/local/node/
export PATH=$PATH:$NODEJS_HOME/bin
# 使变量生效
source /etc/profile
|
1
2
|
[root@test1 bin]# node -v
v8.9.3
|
1
2
|
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
|
1
|
npm install
|
1
2
3
4
5
|
#安装国内镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
# 安装插件(在elasticsearch-head目录下)
cnpm install
|
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
}
}
}
|
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";
|
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
|
1
|
npm run start &
|
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
1
|
nohup ./bin/elasticsearch &
|
附:es启动脚本
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
|
转载于:https://www.cnblogs.com/Su-per-man/p/8625463.html
elasticsearch-6.0.1安装相关推荐
- 【Linux环境部署】最新版 elasticsearch + kibana(7.15.0)安装、配置、启动(多个问题处理 + kibana仪表盘使用)
本文的安装文件是 2021.09.23 最新发布的[elasticsearch-7.15.0-linux-x86_64.tar.gz]和[kibana-7.15.0-linux-x86_64.tar. ...
- 在Windows上安装Elasticsearch 5.0
在windows上安装Elasticsearch Elasticsearch可以使用.zip软件包安装在Windows上. elasticsearch-service.bat命令,它将设置Elasti ...
- hadoop集群安装ES(ElasticSearch 5.0.2)
配置/etc/hosts,ntp服务,免密码登录,关闭防火墙这里不做详细说明. 安装java环境 [root@manager ~]# mkdir /usr/java [root@manager ~]# ...
- linux下载python的es库,Elasticsearch py客户端库安装及使用方法解析
一.介绍 elasticsearch-py是一个官方提供的low-level的elasticsearch python客户端库.为什么说它是一个low-level的客户端库呢?因为它只是对elasti ...
- Elasticsearch 7.0中引入的新集群协调子系统如何使用?
Elasticsearch之所以如此流行,其中一个原因是它可以从只有几个节点的小集群扩展到拥有数百个节点的大集群.它的核心是集群协调子系统.Elasticsearch 7提供了一个新的集群协调子系统, ...
- ElasticSearch 6.0.0 IK分词 Kibana 6.0.0
ElasticSearch 6.0.0 & IK分词 & Kibana 6.0.0 1. 安装ES 6.0.0 docker run -itd -p 9200:9200 -p 9300 ...
- Elasticsearch 7.0 已经发布,盘他!
Elastic{ON}北京分享了Elasticsearch7.0在Speed,Scale,Relevance等方面的很多新特性. 比快更快,有传说中的那么牛逼吗?盘他! 通过本文,你能了解到: Ela ...
- 启动elasticsearch命令_快速安装ElasticSearch
现在对ES有一点了解了.索性就从头从安装到使用ES做一个详细的总结,也分享给其他人供他人学习 首先咱们要官网上去下载ES的安装包,推荐下载Linux版的,要是windos 用户可以自己安装一个虚拟机. ...
- kubesphere3.0的安装完整文档
kubesphere3.0的安装文档 https://www.yuque.com/leifengyang/kubesphere/hxzk3t#SAP5W 基于kubernetes环境安装kubesph ...
- [翻译]ElasticSearch官方文档-安装
本文翻译自:www.elastic.co/guide/en/el- 本文是Elasticsearch的入门文档,将会介绍ElasticSearch在不同环境下的安装. 安装 Elasticsearch ...
最新文章
- mysql5.6.30源码安装_Centos7.1 for MySQL5.6.30源码安装及多实例配置
- Exadata上的分页查询性能测试
- mysql 数学函数
- springboot entity date_「Java」 - SpringBoot amp; JPA多数据源
- 三包围结构的字是什么样的_四张图说清楷书结构技巧,学硬笔书法的有福了
- 文本转成图片(自动换行、自定义字体),图片抗锯齿优化,图片压缩优化
- Windows 10 输入法莫名其妙变为繁体的解决方法
- 2021-2027全球与中国微机械角速率传感器市场现状及未来发展趋势
- 新的IcedTea项目
- 网络跳线接续的四种方法
- 【刷题篇】鹅厂文化衫问题
- 酷比魔方iwork1x i30双系统版,重装单Ubuntu 20.04系统记录(重力传感器、触摸屏、启动菜单、声卡问题、优化充电慢)
- git fetch 理解
- error: resource style/Theme.AppCompat.Light.NoActionBar
- 累加器 java_Spark笔记之累加器(Accumulator)
- JOL:查看Java 对象布局、大小工具
- 基于Modbus RTU 485通信协议实现对PH、溶解氧传感器的数据采集
- OpenStack_Rocky版-8.安装Dashboard面板服务
- 治疗腰椎间盘突出特效方
- WiFiSpoof for Mac(wifi地址修改工具)
热门文章
- [na]华为acl(traffic-filter)和dhcp管理
- 获取打开文件的路径和文件名
- 计算机基础知识:什么是位、字节、字、KB、MB
- 多线程之间共享的资源有哪些
- python的print
- Matlab repmat函数
- oracle数据库升级失败,Oracle 11.2.0.1 rac 升级失败后,数据库降级方案(flashback database)...
- MFC程序在其他机器运行
- Java嵌入oracle,Java插入Oracle Spatial空间数据
- 多线程 调用 axis 报错_java笔记录(三、多线程)