Centos7.2 安装Elasticsearch 6
迁移文件到usr/local中
mv elasticsearch-6.0..tar.gz /usr/local/
cd /usr/local
tar zxvf elasticsearch-6.0..tar.gz
修改elasticsearch6.0.0文件夹的权限,es 规定 root 用户不能启动 es,所以需要使用一个其他用户来启动 es
[hongdada@localhost elasticsearch]$ ll
总用量
drwxr-xr-x. hongdada hongdada 11月 : elasticsearch-6.0.
-rwxrw-rw-. root root 11月 : elasticsearch-6.0..tar.gz
[hongdada@localhost elasticsearch]$ chown -R root: elasticsearch-6.0.
chown: 正在更改"elasticsearch-6.0.0/lib/elasticsearch-6.0.0.jar" 的所有者: 不允许的操作
........
chown: 正在更改"elasticsearch-6.0.0" 的所有者: 不允许的操作
[hongdada@localhost elasticsearch]$ ll
总用量
drwxr-xr-x. hongdada hongdada 11月 : elasticsearch-6.0.
-rwxrw-rw-. root root 11月 : elasticsearch-6.0..tar.gz
[hongdada@localhost elasticsearch]$ su
密码:
[root@localhost elasticsearch]# chown -R root: elasticsearch-6.0.
[root@localhost elasticsearch]# ll
总用量
drwxr-xr-x. root root 11月 : elasticsearch-6.0.
-rwxrw-rw-. root root 11月 : elasticsearch-6.0..tar.gz
[root@localhost elasticsearch]# chown -R hongdada:hongdada elasticsearch-6.0.
[root@localhost elasticsearch]# ll
总用量
drwxr-xr-x. hongdada hongdada 11月 : elasticsearch-6.0.
-rwxrw-rw-. root root 11月 : elasticsearch-6.0..tar.gz
因为本来已经设置好了,为了copy命令重新改了权限
现在就可以访问本地的,但是该主机的ip192.168.1.108此时并不能访问。
要访问主机的ip,需要修改config/elasticsearch.yml文件
network.host: 0.0.0.0
取消network.host前面的注释#,并修改ip为0.0.0.0,或者本机的外网ip192.168.1.108都可以,但是0.0.0.0适用范围广。
修改配置以后要重启es,但是es的重启还有点烦,要先杀死es进程关闭,然后再次启动
重启:
[hongdada@localhost elasticsearch-6.0.]$ cd bin
[hongdada@localhost bin]$ ps -ef |grep elastic
hongdada : pts/ :: grep --color=auto elastic
[hongdada@localhost bin]$ ps -ef |grep elasticsearch
hongdada : pts/ :: grep --color=auto elasticsearch
[hongdada@localhost bin]$ sh elasticsearch -d
[hongdada@localhost bin]$ ps -ef |grep elastic
hongdada : pts/ :: /usr/local/jdk/jdk1..0_121/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction= -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF- -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread= -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/local/elasticsearch/elasticsearch-6.0. -Des.path.conf=/usr/local/elasticsearch/elasticsearch-6.0./config -cp /usr/local/elasticsearch/elasticsearch-6.0./lib/* org.elasticsearch.bootstrap.Elasticsearch -d
hongdada 6586 6411 0 22:41 pts/0 00:00:00 grep --color=auto elastic
[hongdada@localhost bin]$
kill:
kill -
再次启动:
sh elasticsearch -d
安装过程中的异常:
[hongdada@localhost bin]$ sh elasticsearch
[--23T23::,][INFO ][o.e.n.Node ] [] initializing ...
[--23T23::,][INFO ][o.e.e.NodeEnvironment ] [l2KjKQB] using [] data paths, mounts [[/ (rootfs)]], net usable_space [.4gb], net total_space [.5gb], types [rootfs]
[--23T23::,][INFO ][o.e.e.NodeEnvironment ] [l2KjKQB] heap size [.8mb], compressed ordinary object pointers [true]
[--23T23::,][INFO ][o.e.n.Node ] node name [l2KjKQB] derived from node ID [l2KjKQBBSRacQ3kzNB2Qgg]; set [node.name] to override
[--23T23::,][INFO ][o.e.n.Node ] version[6.0.], pid[], build[8f0685b/--10T18::.859Z], OS[Linux/3.10.-514.26..el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) -Bit Server VM/1.8.0_121/25.121-b13]
[--23T23::,][INFO ][o.e.n.Node ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/local/elasticsearch/elasticsearch-6.0., -Des.path.conf=/usr/local/elasticsearch/elasticsearch-6.0./config]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [aggs-matrix-stats]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [analysis-common]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [ingest-common]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [lang-expression]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [lang-mustache]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [lang-painless]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [parent-join]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [percolator]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [reindex]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [repository-url]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [transport-netty4]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] loaded module [tribe]
[--23T23::,][INFO ][o.e.p.PluginsService ] [l2KjKQB] no plugins loaded
[--23T23::,][INFO ][o.e.d.DiscoveryModule ] [l2KjKQB] using discovery type [zen]
[--23T23::,][INFO ][o.e.n.Node ] initialized
[--23T23::,][INFO ][o.e.n.Node ] [l2KjKQB] starting ...
[--23T23::,][INFO ][o.e.t.TransportService ] [l2KjKQB] publish_address {192.168.1.108:}, bound_addresses {[::]:}
[--23T23::,][INFO ][o.e.b.BootstrapChecks ] [l2KjKQB] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [] bootstrap checks failed
[]: max file descriptors [] for elasticsearch process is too low, increase to at least []
[]: max virtual memory areas vm.max_map_count [] is too low, increase to at least []
[--23T23::,][INFO ][o.e.n.Node ] [l2KjKQB] stopping ...
[--23T23::,][INFO ][o.e.n.Node ] [l2KjKQB] stopped
[--23T23::,][INFO ][o.e.n.Node ] [l2KjKQB] closing ...
[--23T23::,][INFO ][o.e.n.Node ] [l2KjKQB] closed
这里面很明显的有两个参数的值太小
1.max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
修改/etc/security/limits.conf文件,添加或修改如下行:
* hard nofile
* soft nofile
2.max virtual memory areas vm.max......
修改 /etc/sysctl.conf 文件,添加如下行:
vm.max_map_count=
修改好了以后,调用sysctl -a查看,发现参数并没有变动,要重启才可以。
重启以后,再启动es即可,就可以通过主机ip访问。
这个时候可以在本机通过本机ip访问,还没有开防火墙,外网是不可以访问的。
https://www.biaodianfu.com/centos-7-install-elasticsearch.html
http://blog.csdn.net/sinat_29581293/article/details/53894033
http://blog.csdn.net/lu_wei_wei/article/details/51263153
http://blog.csdn.net/kongxx/article/details/52993057
http://blog.csdn.net/Gamer_gyt/article/details/52960941
Centos7.2 安装Elasticsearch 6的更多相关文章
- Centos7下安装Elasticsearch 5.6.6
环境 因为elasticsearch是用java编写的,所以需要先安装JDK ES 5,安装需要 JDK 8 以上ES 6.5,安装需要 JDK 11 以上ES 7.2.1,内置了 JDK 12 安装 ...
- 在centos7上安装elasticSearch
因为elasticsearch是用java编写的,所以需要先安装JDK: jdk1.8的安装:安装指导 elasticsearch的下载和安装 一.下载elasticSearch 1.下载地址: ht ...
- centos7环境安装ElasticSearch
操作系统: Centos7 .64位 ========================================= 查看系统版本和系统位数: [root@localhost /]# cat /e ...
- centos7下安装elasticSearch错误总结(单节点模式)
1.首先确定你安装了jdk,版本需要1.8以上 2.上传elasticsearchjar包,只需配置一个文件即可 修改配置文件config/elasticsearch.yml network.h ...
- Centos7中安装elasticsearch
第一步:必须要有jre支持 elasticsearch是用Java实现的,跑elasticsearch必须要有jre支持,所以必须先安装jre 第二步:下载elasticsearch 进入官方下载 h ...
- Centos7 中安装Elasticsearch
1.下载安装包 1.1 下载elasticsearch 7.13.3 curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/e ...
- Centos7.4安装elasticsearch6.3+kibana6.3集群
Centos7.4安装elasticsearch+kibana集群 Centos7.4安装elasticsearch+kibana集群 主机环境 软件环境 主机规划 主机安装前准备 安装jdk1.8 ...
- Centos7安装elasticsearch、logstash、kibana、elasticsearch head
环境:Centos7, jdk1.8 安装logstash 1.下载logstash 地址:https://artifacts.elastic.co/downloads/logstash/logsta ...
- ElasticSearch | centos7 上安装ES
0 参考博客文章(感谢!!!) [1] https://www.jianshu.com/p/10949f44ce9c 在linux服务器上安装jdk [2] https://www.elastic ...
随机推荐
- CF576C Points on Plane 构造
正解:构造 解题报告: 先放下传送门趴QAQ 话说我jio得这题好玄学啊,,,就是,我实在觉得我这题做得完美无缺了?可就是过不去,,,而且它告诉我的奇异错误是"wrong output fo ...
- Dubbo简单环境搭建
Dubbo服务的发展和作用: 首先,看下一般网站架构随着业务的发展,逻辑越来越复杂,数据量越来越大,交互越来越多之后的常规方案演进历程. 其次,当服务越来越多之后,我们需要做哪些服务治理? 最后,是d ...
- zabbix 自定义监控项 获取nginx监控状态
本篇是基于zabbix 源码安装的 [root@localhost conf]# curl "http://192.168.0.73:8080/nginx_status" Acti ...
- 创建list方法总结
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/sheismylife/article/details/28878593 构建一个list 注意要标记 ...
- Mysql技术内幕——InnoDB存储引擎
Mysql技术内幕——InnoDB存储引擎 http://jingyan.baidu.com/article/fedf07377c493f35ac89770c.html 一.mysql体系结构和存储引 ...
- [vue]vue v-on事件绑定(原生修饰符+vue自带事件修饰符)
preventDefault阻止默认行为和stopPropagation终止传递 event.preventDefault() 链接本来点了可以跳转, 如果注册preventDefault事件,则点了 ...
- python接口自动化-参数化
原文地址https://www.cnblogs.com/yoyoketang/p/6891710.html python接口自动化 -参数关联(一)https://www.cnblogs.com/11 ...
- iOS 开发笔记-plist使用
1.创建一个plist 2.填写为ImageList.plist 3.填入数据 4.完成 加载代码: @interface UYViewController () //图片信息的数组 @propert ...
- sql 关于存储过程的查询
--查数据库中所有的存储过程select * from sys.procedures ----------------------查数据库中所有的存储过程select o.name from sysc ...
- RVDS编译器
不同ARM的体系结构,使用的ARM RealView编译工具时的异同点. 1)ARM体系结构v6K首次引入对4个CPU的MPCore处理器支持,高效的多重处理系统与单CPU系统相比,功耗更低,散热量更 ...