System centos6.7
1, install jdk-1.8.0
Yum Install JAVA-1.8.0-OPENJDK
2, download elasticsearch-2.4.3.tar.gz and install
Tar zxvf elasticsearch-2.4.3.tar.gz-c/optvi/opt/elasticsearch-2.4.3/conf/elasticsearch.yml
Add configuration
Http.cors.enabled:truehttp.cors.allow-origin: "*"
3, start
Error
PENJDK 64-bit Server VM warning:if The number of processors is expected to increase from one and then you should configure T He number of parallel GC threads appropriately using-xx:parallelgcthreads=n
Exception in thread "main" Java.lang.RuntimeException:don ' t run Elasticsearch as root.
At Org.elasticsearch.bootstrap.Bootstrap.initializeNatives (bootstrap.java:94)
At Org.elasticsearch.bootstrap.Bootstrap.setup (bootstrap.java:160)
At Org.elasticsearch.bootstrap.Bootstrap.init (bootstrap.java:286)
At Org.elasticsearch.bootstrap.Elasticsearch.main (elasticsearch.java:45)
Refer to the log for complete error details.
[email protected] elasticsearch]# su es bin/elasticsearch
OpenJDK 64-bit Server VM warning:if The number of processors is expected to increase from one and then you should configure The number of parallel GC threads appropriately using-xx:parallelgcthreads=n
[2016-12-29 08:56:59,510] [WARN] [Bootstrap] Unable to install syscall Filter:seccomp unavailable:config_seccomp no compiled into kernel , Config_seccomp and Config_seccomp_filter are needed
Exception in thread "main" java.lang.IllegalStateException:Unable to access ' path.plugins ' (/opt/elasticsearch/plugins )
Likely root cause:java.nio.file.AccessDeniedException:/opt/elasticsearch/plugins
At Sun.nio.fs.UnixException.translateToIOException (unixexception.java:84)
At Sun.nio.fs.UnixException.rethrowAsIOException (unixexception.java:102)
At Sun.nio.fs.UnixException.rethrowAsIOException (unixexception.java:107)
At Sun.nio.fs.UnixFileSystemProvider.createDirectory (unixfilesystemprovider.java:384)
At Java.nio.file.Files.createDirectory (files.java:674)
At Java.nio.file.Files.createAndCheckIsDirectory (files.java:781)
At Java.nio.file.Files.createDirectories (files.java:767)
At Org.elasticsearch.bootstrap.Security.ensureDirectoryExists (security.java:337)
At Org.elasticsearch.bootstrap.Security.addPath (security.java:314)
At Org.elasticsearch.bootstrap.Security.addFilePermissions (security.java:246)
At Org.elasticsearch.bootstrap.Security.createPermissions (security.java:212)
At Org.elasticsearch.bootstrap.Security.configure (security.java:118)
At Org.elasticsearch.bootstrap.Bootstrap.setupSecurity (bootstrap.java:212)
At Org.elasticsearch.bootstrap.Bootstrap.setup (bootstrap.java:183)
At Org.elasticsearch.bootstrap.Bootstrap.init (bootstrap.java:286)
At Org.elasticsearch.bootstrap.Elasticsearch.main (elasticsearch.java:45)
Refer to the log for complete error details.
Cause: 1, the new version is not allowed to start with root, 2, the software directory does not have the appropriate permissions
Solve:
Groupadd esuseradd-g es espasswd es
Reboot:
Su es-c/opt/elasticsearch-2.4.3/bin/elasticsearch-xmx2g-xms2g-des.index.storage.type=memory–d >/dev/null 2> &1 & "#因为我用的是虚拟机, memory is relatively small, so start to see the actual situation-xmx2g is the maximum memory-xms2g is the smallest memory-D is the background run # My Run command is su es-c/opt/elasticsearch/bin/ Elasticsearch–d >/dev/null 2>&1 &
Install plugin: Elasticsearch-head (is the cluster Front section display page)
Switch to the bin directory to execute
./plugin Install Mobz/elasticsearch-head
Page display: Http://localhost/_plugin/head
Test:
Curl http://localhost:9200 appears with a JSON data indicating a successful start, as follows
{
"status": $,
"name": " Omen ",
"version" : {
"number": "1.1.1",
"Build_hash": "F1585F096D3F3985E73456DEBDC1A0745F512BBC",
"Build_timestamp": "2014-04-16t14:27:12z",
"Build_snapshot": false,
"Lucene_version": "4.7"
},
"tagline" : "Know, for Search"
}
Install plugin: Elasticsearch-kopf
Execute command:
./plugin Install Lmenezes/elasticsearch-kopf
Page display: http://localhost/_plugin/bigdesk/
Elk Installation and problems encountered