材料准备
https://github.com/NLPchina/elasticsearch-sql/releases/download/5.1.2.0/elasticsearch-sql-5.1.2.0.zip
https://github.com/mobz/elasticsearch-head/tree/master
https://github.com/mobz/elasticsearch-head/archive/master.zip
[root@node1 ~]# cd /opt
[root@node1 opt]# ls -l
total 13116
drwxr-xr-x 9 root root 4096 Jan 29 2016 collectd
drwxr-xr-x 8 hadoop hadoop 4096 Apr 9 2016 elasticsearch-2.0.0-rc1
drwxr-xr-x 9 hadoop hadoop 4096 Apr 15 2016 elasticsearch-2.1.1
drwxr-xr-x 7 root root 4096 Nov 24 2015 flume1.6
drwxr-xr-x 7 root root 4096 Nov 23 2015 grafana-2.5.0
drwxr-xr-x 16 root root 4096 Dec 8 2015 hadoop
drwxr-xr-x 4 root root 4096 Dec 8 2015 hadoop_data
drwxr-xr-x 12 hadoop hadoop 4096 Jan 19 2016 httpd-2.2.23
drwxr-xr-x 3 influxdb influxdb 4096 Jan 29 2016 influxdb
drwxr-xr-x 7 root root 4096 Apr 27 2016 kafka_2.10-0.9.0.1
drwxrwxr-x 16 nagios nagios 4096 Dec 25 2015 nagios
drwxrwxrwx 16 10002 10002 4096 Dec 25 2015 nagios-plugins-1.4.13
drwxr-xr-x 22 root root 4096 Apr 9 2016 openssl-1.0.0e
drwxr-xr-x 3 root root 4096 Jan 25 2016 ORCLfmap
drwxr-xr-x 3 root root 4096 Apr 15 2016 path
drwxr-xr-x 17 nagios games 4096 Dec 25 2015 php-5.4.10
drwxrwxr-x 18 1000 1000 4096 Apr 9 2016 Python-2.6.6
-rw-r--r-- 1 root root 13318547 Apr 8 2016 Python-2.6.6.tgz
drwxr-xr-x 2 root root 4096 Apr 27 2016 soft
drwxr-xr-x 11 root root 4096 Apr 10 2016 storm096
-rw-r--r-- 1 root root 4628 Apr 10 2016 stormTest.jar
drwxr-xr-x 11 root root 4096 Apr 10 2016 zookeepe346
[root@node1 opt]# mkdir es5.0
[root@node1 opt]# ls
collectd es5.0 hadoop influxdb nagios-plugins-1.4.13 path Python-2.6.6.tgz
stormTest.jar elasticsearch-2.0.0-rc1 flume1.6 hadoop_data kafka_2.10-0.9.0.1 openssl-1.0.0e php-5.4.10 soft zookeepe346 elasticsearch-2.1.1 grafana-2.5.0 httpd-2.2.23 nagios ORCLfmap Python-2.6.6 storm096
[root@node1 opt]# cd es5.0/
[root@node1 es5.0]# ls
[root@node1 es5.0]# ls
elasticsearch-5.1.2.zip elasticsearch-head-master.zip elasticsearch-sql-5.1.2.0.zip
jdk-8u111-linux-x64.tar.gz
[root@node1 es5.0]# tar -zxvf jdk-8u111-linux-x64.tar.gz
[root@node1 es5.0]# ls
elasticsearch-5.1.2.zip elasticsearch-head-master.zip elasticsearch-sql-5.1.2.0.zip jdk1.8.0_111 jdk-8u111-linux-x64.tar.gz
[root@node1 es5.0]# unzip elasticsearch-5.1.2.zip
[root@node1 es5.0]# chmod -R hadoop:hadoop /opt/es5.0/*
chmod: invalid mode: `hadoop:hadoop'
Try `chmod --help' for more information.
[root@node1 es5.0]# chown -R hadoop:hadoop /opt/es5.0/*
[root@node1 es5.0]# ls -l
total 217032
drwxr-xr-x 7 hadoop hadoop 4096 Jan 11 20:21 elasticsearch-5.1.2
-rw-r--r-- 1 hadoop hadoop 33317437 Feb 24 03:52 elasticsearch-5.1.2.zip
-rw-r--r-- 1 hadoop hadoop 919566 Feb 24 03:47 elasticsearch-head-master.zip
-rw-r--r-- 1 hadoop hadoop 6304850 Feb 24 03:47 elasticsearch-sql-5.1.2.0.zip
drwxr-xr-x 8 hadoop hadoop 4096 Sep 22 16:27 jdk1.8.0_111
-rw-r--r-- 1 hadoop hadoop 181442359 Nov 3 08:46 jdk-8u111-linux-x64.tar.gz
[root@node1 es5.0]#
[root@node1 es5.0]# su - hadoop
[hadoop@node1 ~]$ cd /opt/es5.0/elasticsearch-5.1.2/bin/
[hadoop@node1 bin]$ ./elasticsearch
[hadoop@node1 bin]$ ./elasticsearch
The system is going down for reboot NOW!
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported
major.minor version 52.0 -->JDK版本问题
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
命令格式: ln [参数][源文件或目录][目标文件或目录]
[root@node1 ~]# ln -s /opt/es5.0/jdk1.8.0_111/bin/java /usr/bin/java
[root@node1 ~]# whereis java
java: /usr/bin/java
[root@node1 ~]# ls -l /usr/bin/java
lrwxrwxrwx 1 root root 32 Feb 24 13:36 /usr/bin/java -> /opt/es5.0/jdk1.8.0_111/bin/java
[root@node1 ~]#
[root@node1 ~]# java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
[root@node1 ~]#
[root@node1 ~]# su - hadoop
[hadoop@node1 ~]$ mkdir -p /opt/es5.0/s/data
mkdir: cannot create directory `/opt/es5.0/s': Permission denied
[hadoop@node1 ~]$ exit
logout
[root@node1 ~]# /opt/es5.0/s/data
-bash: /opt/es5.0/s/data: No such file or directory
[root@node1 ~]# mkdir -p /opt/es5.0/s/data
[root@node1 ~]# mkdir -p /opt/es5.0/s/log
[root@node1 ~]# chown -R hadoop:hadoop /opt/es5.0/*
[root@node1 ~]#
[hadoop@node1 bin]$ ./elasticsearch
[2017-02-24T13:47:04,415][WARN ][o.e.b.JNANatives ] unable to install syscall filter:
java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
at org.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:349) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.JNANatives.trySeccomp(JNANatives.java:215) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Natives.trySeccomp(Natives.java:99) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:105) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:176) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.1.2.jar:5.1.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.1.2.jar:5.1.2]
[2017-02-24T13:47:09,012][INFO ][o.e.n.Node ] [node-1] initializing ...
[2017-02-24T13:47:09,512][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] data paths, mounts [[/ (/dev/hdc2)]], net usable_space [7gb], net total_space [17.1gb], spins? [possibly], types [ext3]
[2017-02-24T13:47:09,513][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-02-24T13:47:09,516][INFO ][o.e.n.Node ] [node-1] node name [node-1], node ID [EdHbn3S_Sxm4Cwz0pMxwRQ]
[2017-02-24T13:47:09,547][INFO ][o.e.n.Node ] [node-1] version[5.1.2], pid[6353], build[c8c4c16/2017-01-11T20:18:39.146Z], OS[Linux/2.6.18-128.el5/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_111/25.111-b14]
[2017-02-24T13:47:18,120][INFO ][o.e.p.PluginsService ] [node-1] loaded module [aggs-matrix-stats]
[2017-02-24T13:47:18,121][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-common]
[2017-02-24T13:47:18,122][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-expression]
[2017-02-24T13:47:18,123][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-groovy]
[2017-02-24T13:47:18,123][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-mustache]
[2017-02-24T13:47:18,123][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-painless]
[2017-02-24T13:47:18,124][INFO ][o.e.p.PluginsService ] [node-1] loaded module [percolator]
[2017-02-24T13:47:18,124][INFO ][o.e.p.PluginsService ] [node-1] loaded module [reindex]
[2017-02-24T13:47:18,124][INFO ][o.e.p.PluginsService ] [node-1] loaded module [transport-netty3]
[2017-02-24T13:47:18,124][INFO ][o.e.p.PluginsService ] [node-1] loaded module [transport-netty4]
[2017-02-24T13:47:18,126][INFO ][o.e.p.PluginsService ] [node-1] no plugins loaded
[2017-02-24T13:47:35,099][INFO ][o.e.n.Node ] [node-1] initialized
[2017-02-24T13:47:35,100][INFO ][o.e.n.Node ] [node-1] starting ...
[2017-02-24T13:47:35,940][INFO ][o.e.t.TransportService ] [node-1] publish_address {192.168.1.104:9300}, bound_addresses {192.168.1.104:9300}
[2017-02-24T13:47:35,948][INFO ][o.e.b.BootstrapCheck ] [node-1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
max file descriptors [1024] for elasticsearch process is too low, increase to at least [65536]
max virtual memory areas vm.max_map_count [65536] is too low, increase to at least [262144]
[2017-02-24T13:47:36,453][INFO ][o.e.n.Node ] [node-1] stopping ...
[2017-02-24T13:47:37,699][INFO ][o.e.n.Node ] [node-1] stopped
[2017-02-24T13:47:37,699][INFO ][o.e.n.Node ] [node-1] closing ...
[2017-02-24T13:47:38,127][INFO ][o.e.n.Node ] [node-1] closed
问题一:警告提示
[2016-11-06T16:27:21,712][WARN ][o.e.b.JNANatives ] unable to install syscall filter:
java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
at org.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:349) ~[elasticsearch-5.0.0.jar:5.0.0]
at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.0.0.jar:5.0.0]
报了一大串错误,其实只是一个警告。
解决:使用新linux版本kernel 3.5+,就不会出现此类问题了。
问题二:
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
解决:切换到root用户修改配置sysctl.conf
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sysctl -p
相关推荐
Elasticsearch-Bulk-Insert-Plugin 是一个专为Kettle设计的插件,主要用于高效地将大量数据批量插入到Elasticsearch(ES)集群中。Elasticsearch是一种流行且功能强大的分布式搜索引擎,常用于大数据分析、日志分析...
Elasticsearch(ES)作为一个开源的全文搜索引擎,因其强大的搜索功能和分布式特性而备受青睐。然而,对于中文这种复杂的语言,分词是搜索引擎理解文本的关键步骤。本文将详细介绍elasticsearch-analysis-ik-7.10.2...
总的来说,elasticsearch-bulk-insert-plugin-8.2.0.0-342.zip是一个解决Kettle与Elasticsearch 7.x兼容问题的插件,提供了数据批量导入的能力,帮助用户充分利用Elasticsearch的强大功能进行数据分析和存储。...
"ranger-2.1.0-elasticsearch-plugin"是Ranger为Elasticsearch设计的安全插件,适用于Elasticsearch 5.x及更高版本。该插件旨在增强Elasticsearch的数据安全性,允许管理员对索引、文档、字段级别设置权限,实现用户...
Elasticsearch是一个开源的全文搜索引擎,它基于Lucene构建,被广泛用于大数据分析、日志收集、实时搜索和监控等领域。在Linux系统上部署和使用Elasticsearch是许多IT专业人士的常见任务。最新版的Elasticsearch ...
5. **配置文件**: 解压后的目录中包含一个名为`elasticsearch.yml`的配置文件,这是Elasticsearch的主要配置文件。你可以在这里修改集群名称、节点角色、网络设置、索引存储等参数。 6. **Java运行环境**: Elastic...
Elasticsearch(简称ES)是一个强大的分布式全文搜索引擎,而Elasticsearch-SQL插件则使得我们能够通过熟悉的SQL语法来查询ES中的数据,极大地降低了使用门槛,尤其对熟悉关系型数据库的开发者而言。下面我们将详细...
强烈建议安装和配置X-Pack或Open Distro for Elasticsearch安全插件,以实现认证、授权和加密通信。 集群与节点: 1. **集群配置**:通过修改 "elasticsearch.yml" 文件中的 "cluster.name" 参数,你可以定义集群的...
Elasticsearch是一个强大的开源搜索引擎,基于Java开发,其核心功能是全文检索,但同时也提供了数据分析、实时聚合以及数据存储的能力。这个"elasticsearch-7.17.7-windows-x86-64.zip"文件是Elasticsearch的7.17.7...
这一版本的发布旨在提供最新的特性和性能优化,同时也解决了之前版本中可能存在的问题,确保了与Elasticsearch 7.x系列的兼容性。对于那些无法通过常规渠道获取更新的开发者来说,这个版本的提供尤为关键。 **依赖...
将压缩包中的所有内容解压到一个合适的目录,通常推荐创建一个新的文件夹来存放Elasticsearch的安装文件。 解压后,你会看到一个名为"elasticsearch-7.11.1"的文件夹,这是Elasticsearch的根目录。在这个目录下,有...
安装Elasticsearch 8.5.2在Windows上,你需要执行以下步骤: 1. **解压**:将"elasticsearch-8.5.2-windows-x86_64.zip"文件解压缩到你选择的目录。 2. **配置**:修改`config/elasticsearch.yml`配置文件,根据...
Elasticsearch是一个强大的开源搜索引擎,广泛应用于大数据分析和实时数据搜索。版本7.6.2是它的一个稳定版本,提供了诸多改进和优化。这个压缩包"elasticsearch-7.6.2.rar"包含了该版本的完整安装文件,适用于对...
安装Elasticsearch 7.2.0步骤: 1. 下载`elasticsearch-7.2.0-linux-x86_64.tar.gz`到Linux服务器。 2. 使用`tar -zxvf elasticsearch-7.2.0-linux-x86_64.tar.gz`解压文件。 3. 设置Elasticsearch的运行目录和数据...
Elasticsearch是一款开源的全文搜索引擎,它基于Lucene构建,为大数据分析和实时搜索提供了强大的支持。在Linux环境下,Elasticsearch的安装和使用是许多系统管理员和开发者的必备技能。"最新版linux elasticsearch-...
4. 为了验证IK Analysis插件是否成功安装,可以发送一个GET请求到Elasticsearch的插件列表API: ``` curl -X GET "localhost:9200/_cat/plugins?h=plugin" ``` 如果插件安装成功,你应该能在返回的结果中看到...
安装X-Pack的步骤包括在每个节点上解压`x-pack`插件,然后在`elasticsearch.yml`中启用它,如`xpack.security.enabled: true`。之后,使用`bin/elasticsearch-setup-passwords interactive`命令初始化默认用户和密码...
在Linux环境下,Elasticsearch的安装和管理是一项基础但至关重要的任务。最新版的Elasticsearch为8.2.3,针对x86_64架构的Linux系统,这表明它已经优化了对64位处理器的支持,能够充分利用现代服务器的性能。 首先...