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 ...
随机推荐
- 影响SEO 搜索引擎优化的网页制作细节
1.将css与javascript全部用下边的方法分离到外部文件中去. [html]<link rel=”stylesheet” type=”text/css” href=”css/style. ...
- linux elasticsearch-5.1.1的安装
(一)下载elasticsearch linux安装包 https://www.elastic.co/downloads/past-releases,然后解压,然后要有对应的java8,即必须先安装j ...
- 【代码备份】ZJ10086测试环境成功代码备份
vuser_init(){ lr_start_transaction("login"); web_url("101.132.17.138", ...
- mysql 权限管理 对所有库 所有表 授权 *.*
对miek这个账号localhost 授予了所有库,所表的select权限 mysql> grant select on *.* to 'mike'@'localhost'; Query OK, ...
- VMware上安装VMware tools
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/walkerkalr/article/details/34896407 VMware上安装VMw ...
- 3.cassandra遇到内存占用过高的问题
目前cssandra的内存分配如下: https://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_tune_jvm_c.ht ...
- 使用webpy创建一个简单的restful风格的webservice应用
下载:wget http://webpy.org/static/web.py-0.38.tar.gz解压并进入web.py-0.38文件夹安装:easy_install web.py 这是一个如何使用 ...
- PAT 1034 Head of a Gang[难][dfs]
1034 Head of a Gang (30)(30 分) One way that the police finds the head of a gang is to check people's ...
- PAT Radix[二分][进制转换][难]
1010 Radix (25)(25 分) Given a pair of positive integers, for example, 6 and 110, can this equation 6 ...
- [lr] 基本色调调整和色调曲线
基本色调调整 • 曝光度调整 ▶ 控制区域 在Lightroom中,软件提示我们曝光控制的是如图中间调的区域.我们把鼠标移动到曝光工具条上,软件会提示我们这个区域: ▶ 实际效果 ▪ 增加曝光值 增加 ...