centos搭建elasticsearch

1. 安裝配置JDK 8

(1)下載並解壓縮

[master@localhost ~]# tar -zxvf jdk-8u151-linux-x64.tar.gz -C /opt/java

(2)編輯環境變量 vi /etc/profile.d/custom.sh

[master@localhost~]# vi /etc/profile.d/custom.sh
[master@localhost ~]# cat /etc/profile.d/custom.sh
#!/bin/bash
#java path
export JAVA_HOME=/opt/java
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib

(3)生效

[master@localhost ~]# source /etc/profile.d/custom.sh

(4)查看JDK版本

[master@localhost ~]# java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
[master@localhost ~]#

2. ElasticSearch 下載安裝

(1)ElasticSearch 相關軟件下載官網 https://www.elastic.co/cn/downloads
圖潘在這裏
(2)wget 下載

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.0.tar.gz

(3)解壓
tar -zxvf elasticsearch-6.1.0.tar.gz
 (4)啓動報錯 原因:從5.0開始,ElasticSearch 安全級別提高了,不允許採用root帳號啓動,所以我們要添加一個用戶。在  root下面執行下面命令:
groupadd masteruseradd master -g master -p masterchown -R master:master /home/master/soft/elasticsearch-6.1.0tar -zxvf elasticsearch-6.1.0.tar.gz
 (5) 啓動:
[master@localhost elasticsearch-6.1.0]$ ./bin/elasticsearch
以下是啓動日誌:
[2018-01-14T06:25:03,956][INFO ][o.e.n.Node               ] [] initializing ...[2018-01-14T06:25:04,196][INFO ][o.e.e.NodeEnvironment    ] [Ec9JOBI] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [21.9gb], net total_space [27.7gb], types [rootfs][2018-01-14T06:25:04,197][INFO ][o.e.e.NodeEnvironment    ] [Ec9JOBI] heap size [1015.6mb], compressed ordinary object pointers [true][2018-01-14T06:25:04,207][INFO ][o.e.n.Node               ] node name [Ec9JOBI] derived from node ID [Ec9JOBIUS0mOp1he-niYIA]; set [node.name] to override[2018-01-14T06:25:04,207][INFO ][o.e.n.Node               ] version[6.1.0], pid[30500], build[c0c1ba0/2017-12-12T12:32:54.550Z], OS[Linux/2.6.32-696.el6.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_151/25.151-b12][2018-01-14T06:25:04,207][INFO ][o.e.n.Node               ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/home/master/soft/elasticsearch-6.1.0, -Des.path.conf=/home/master/soft/elasticsearch-6.1.0/config][2018-01-14T06:25:05,815][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [aggs-matrix-stats][2018-01-14T06:25:05,815][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [analysis-common][2018-01-14T06:25:05,815][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [ingest-common][2018-01-14T06:25:05,815][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [lang-expression][2018-01-14T06:25:05,815][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [lang-mustache][2018-01-14T06:25:05,815][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [lang-painless][2018-01-14T06:25:05,817][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [mapper-extras][2018-01-14T06:25:05,817][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [parent-join][2018-01-14T06:25:05,817][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [percolator][2018-01-14T06:25:05,817][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [reindex][2018-01-14T06:25:05,817][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [repository-url][2018-01-14T06:25:05,817][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [transport-netty4][2018-01-14T06:25:05,817][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [tribe][2018-01-14T06:25:05,821][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] no plugins loaded[2018-01-14T06:25:08,628][INFO ][o.e.d.DiscoveryModule    ] [Ec9JOBI] using discovery type [zen][2018-01-14T06:25:09,615][INFO ][o.e.n.Node               ] initialized[2018-01-14T06:25:09,617][INFO ][o.e.n.Node               ] [Ec9JOBI] starting ...[2018-01-14T06:25:09,931][INFO ][o.e.t.TransportService   ] [Ec9JOBI] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}[2018-01-14T06:25:09,956][WARN ][o.e.b.BootstrapChecks    ] [Ec9JOBI] max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536][2018-01-14T06:25:09,956][WARN ][o.e.b.BootstrapChecks    ] [Ec9JOBI] max number of threads [1024] for user [master] is too low, increase to at least [4096][2018-01-14T06:25:09,957][WARN ][o.e.b.BootstrapChecks    ] [Ec9JOBI] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144][2018-01-14T06:25:09,957][WARN ][o.e.b.BootstrapChecks    ] [Ec9JOBI] system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk[2018-01-14T06:25:13,097][INFO ][o.e.c.s.MasterService    ] [Ec9JOBI] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {Ec9JOBI}{Ec9JOBIUS0mOp1he-niYIA}{qxgaipwgTuih4JTXoaBFHg}{127.0.0.1}{127.0.0.1:9300}[2018-01-14T06:25:13,113][INFO ][o.e.c.s.ClusterApplierService] [Ec9JOBI] new_master {Ec9JOBI}{Ec9JOBIUS0mOp1he-niYIA}{qxgaipwgTuih4JTXoaBFHg}{127.0.0.1}{127.0.0.1:9300}, reason: apply cluster state (from master [master {Ec9JOBI}{Ec9JOBIUS0mOp1he-niYIA}{qxgaipwgTuih4JTXoaBFHg}{127.0.0.1}{127.0.0.1:9300} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])[2018-01-14T06:25:13,155][INFO ][o.e.h.n.Netty4HttpServerTransport] [Ec9JOBI] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}[2018-01-14T06:25:13,155][INFO ][o.e.n.Node               ] [Ec9JOBI] started[2018-01-14T06:25:13,175][INFO ][o.e.g.GatewayService     ] [Ec9JOBI] recovered [0] indices into cluster_state

(6)驗證:
[master@localhost ~]$ curl localhost:9200
{
  "name" : "Ec9JOBI",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "AWXAB25zQSWVPjtCHkAU6g",
  "version" : {
    "number" : "6.1.0",
    "build_hash" : "c0c1ba0",
    "build_date" : "2017-12-12T12:32:54.550Z",
    "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"
}
[master@localhost ~]$ 
如果報以下錯誤錯:是liunx版本問題不用關心
[master@localhost elasticsearch-6.1.0]$ [2018-01-14T07:14:14,060][WARN ][o.e.b.JNANatives         ] unable to install syscall filter: 
java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
	at org.elasticsearch.bootstrap.SystemCallFilter.linuxImpl(SystemCallFilter.java:341) ~[elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.SystemCallFilter.init(SystemCallFilter.java:616) ~[elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.JNANatives.tryInstallSystemCallFilter(JNANatives.java:258) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Natives.tryInstallSystemCallFilter(Natives.java:113) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:109) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:171) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:322) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.1.0.jar:6.1.0]
	at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.1.0.jar:6.1.0]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.1.0.jar:6.1.0]
配置文件: vi /home/master/soft/elasticsearch-6.1.0/config/elasticsearch.yml 
#
#action.destructive_requires_name: true
network.host: 10.0.2.10
http.port: 9200
啓動報錯:
ERROR: [4] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1024] for user [master] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
解決方法:切換到root用戶,編輯limits.conf 添加類似如下內容
vi /etc/security/limits.conf 
添加如下內容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
報以下錯誤
ERROR: [3] bootstrap checks failed
[1]: max number of threads [1024] for user [master] is too low, increase to at least [4096]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
解決方案是:
解決:切換到root用戶,進入limits.d目錄下修改配置文件。
vi /etc/security/limits.d/90-nproc.conf 
修改如下內容:
* soft nproc 1024
#修改爲
* soft nproc 4096
報以下錯誤:
ERROR: [2] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
解決:切換到root用戶修改配置sysctl.conf
vi /etc/sysctl.conf 
添加下面配置:
vm.max_map_count=655360
並執行命令:
sysctl -p
[root@localhost elasticsearch-6.1.0]# vi /etc/sysctl.conf 
[root@localhost elasticsearch-6.1.0]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
vm.max_map_count = 655360
報以下錯誤:
ERROR: [1] bootstrap checks failed
[1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
解決方案:因爲Centos6不支持SecComp,而ES默認bootstrap.system_call_filter爲true進行檢測,所以導致檢測失敗,失敗後直接導致ES不能啓動。詳見 :https://github.com/elastic/elasticsearch/issues/22899
在elasticsearch.yml中配置bootstrap.system_call_filter爲false,注意要在Memory下面:
 bootstrap.memory_lock: false
 bootstrap.system_call_filter: false
啓動和驗證:
[master@localhost elasticsearch-6.1.0]$ ./bin/elasticsearch
[2018-01-14T08:02:05,141][INFO ][o.e.n.Node               ] [] initializing ...
[2018-01-14T08:02:05,284][INFO ][o.e.e.NodeEnvironment    ] [Ec9JOBI] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [21.9gb], net total_space [27.7gb], types [rootfs]
[2018-01-14T08:02:05,285][INFO ][o.e.e.NodeEnvironment    ] [Ec9JOBI] heap size [1015.6mb], compressed ordinary object pointers [true]
[2018-01-14T08:02:05,288][INFO ][o.e.n.Node               ] node name [Ec9JOBI] derived from node ID [Ec9JOBIUS0mOp1he-niYIA]; set [node.name] to override
[2018-01-14T08:02:05,289][INFO ][o.e.n.Node               ] version[6.1.0], pid[31931], build[c0c1ba0/2017-12-12T12:32:54.550Z], OS[Linux/2.6.32-696.el6.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_151/25.151-b12]
[2018-01-14T08:02:05,290][INFO ][o.e.n.Node               ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/home/master/soft/elasticsearch-6.1.0, -Des.path.conf=/home/master/soft/elasticsearch-6.1.0/config]
[2018-01-14T08:02:06,752][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [aggs-matrix-stats]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [analysis-common]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [ingest-common]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [lang-expression]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [lang-mustache]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [lang-painless]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [mapper-extras]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [parent-join]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [percolator]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [reindex]
[2018-01-14T08:02:06,753][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [repository-url]
[2018-01-14T08:02:06,756][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [transport-netty4]
[2018-01-14T08:02:06,756][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] loaded module [tribe]
[2018-01-14T08:02:06,758][INFO ][o.e.p.PluginsService     ] [Ec9JOBI] no plugins loaded
[2018-01-14T08:02:09,303][INFO ][o.e.d.DiscoveryModule    ] [Ec9JOBI] using discovery type [zen]
[2018-01-14T08:02:10,235][INFO ][o.e.n.Node               ] initialized
[2018-01-14T08:02:10,235][INFO ][o.e.n.Node               ] [Ec9JOBI] starting ...
[2018-01-14T08:02:10,531][INFO ][o.e.t.TransportService   ] [Ec9JOBI] publish_address {10.0.2.10:9300}, bound_addresses {10.0.2.10:9300}
[2018-01-14T08:02:10,554][INFO ][o.e.b.BootstrapChecks    ] [Ec9JOBI] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2018-01-14T08:02:13,659][INFO ][o.e.c.s.MasterService    ] [Ec9JOBI] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {Ec9JOBI}{Ec9JOBIUS0mOp1he-niYIA}{OaR_0hrtRGGkVj3pqpw8gQ}{10.0.2.10}{10.0.2.10:9300}
[2018-01-14T08:02:13,675][INFO ][o.e.c.s.ClusterApplierService] [Ec9JOBI] new_master {Ec9JOBI}{Ec9JOBIUS0mOp1he-niYIA}{OaR_0hrtRGGkVj3pqpw8gQ}{10.0.2.10}{10.0.2.10:9300}, reason: apply cluster state (from master [master {Ec9JOBI}{Ec9JOBIUS0mOp1he-niYIA}{OaR_0hrtRGGkVj3pqpw8gQ}{10.0.2.10}{10.0.2.10:9300} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
[2018-01-14T08:02:13,715][INFO ][o.e.h.n.Netty4HttpServerTransport] [Ec9JOBI] publish_address {10.0.2.10:9200}, bound_addresses {10.0.2.10:9200}
[2018-01-14T08:02:13,723][INFO ][o.e.n.Node               ] [Ec9JOBI] started
[2018-01-14T08:02:13,731][INFO ][o.e.g.GatewayService     ] [Ec9JOBI] recovered [0] indices into cluster_state
[master@localhost ~]$ curl 10.0.2.10:9200
{
  "name" : "Ec9JOBI",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "AWXAB25zQSWVPjtCHkAU6g",
  "version" : {
    "number" : "6.1.0",
    "build_hash" : "c0c1ba0",
    "build_date" : "2017-12-12T12:32:54.550Z",
    "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"
}
不在報錯

(7)安裝head
修改elasticsearch.yml文件
#設置集羣中master節點的初始列表,可以通過這些節點來自動發現新加入集羣的節點
discovery.zen.ping.unicast.hosts: ["10.0.2.10"]
# 設置節點間交互的tcp端口(集羣),(默認9300)  
transport.tcp.port: 9300  
# 增加參數,使head插件可以訪問es  
http.cors.enabled: true  
http.cors.allow-origin: "*"
cluster.name:es_cluster
node.name:node0
path.data:/home/master/es/data
path.logs:/home/master/es/logs
network.host: 10.0.2.10
http.port: 9200

下載head插件:
wget  https://github.com/mobz/elasticsearch-head/archive/master.zip
安裝node
wget https://npm.taobao.org/mirrors/node/latest-v4.x/node-v4.4.7-linux-x64.tar.gz
tar -zxvf node-v4.4.7-linux-x64.tar.gz配置下環境變量,編輯/etc/profile添加
NODE_HOME=/opt/node/node-v4.4.7-linux-x64
PATH=$NODE_HOME/bin:$PATH
NODE_PATH=$NODE_HOME/lib/node_modules
export PATH NODE_HOME NODE_PATH
執行source /etc/profile
安裝grunt
npm install -g grunt-cli
查看是否安裝成功:

[root@node0 ~]# grunt -version
grunt-cli v1.2.0
[root@node0 ~]# 
修改head插件源碼:

[master@node0 elasticsearch-head-master]$ vi Gruntfile.js 
connect: {
                        server: {
                                options: {
                                        port: 9100,
                                        base: '.',
                                        keepalive: true,
                                        hostname: '*'
                                }
                        }
                }
修改app.js文件:

[master@node0 elasticsearch-head-master]$ vi _site/app.js 
在文件的末尾位置:
(function( app, i18n ) {


        var ui = app.ns("ui");
        var services = app.ns("services");


        app.App = ui.AbstractWidget.extend({
                defaults: {
                        base_uri: null
                },
                init: function(parent) {
                        this._super();
                        this.prefs = services.Preferences.instance();
                        this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.0.2.10:9200";
                        if( this.base_uri.charAt( this.base_uri.length - 1 ) !== "/" ) {
                                // XHR request fails if the URL is not ending with a "/"
                                this.base_uri += "/";
                        }
                        if( this.config.auth_user ) {
                                var credentials = window.btoa( this.config.auth_user + ":" + this.config.auth_password );
                                $.ajaxSetup({
                                        headers: {
                                                "Authorization": "Basic " + credentials
                                        }
                                });
                        }
                        this.cluster = new services.Cluster({ base_uri: this.base_uri });
                        this._clusterState = new services.ClusterState({
                                cluster: this.cluster
                        });


                        this._header = new ui.Header({ cluster: this.cluster, clusterState: this._clusterState });
                        this.$body = $.joey( this._body_template() );
                        this.el = $.joey(this._main_template());
                        this.attach( parent );
                        this.instances = {};
                        this.el.find(".uiApp-headerMenuItem:first").click();
                        if( this.config.dashboard ) {
                                if( this.config.dashboard === "cluster" ) {
                                        var page = this.instances["ClusterOverview"];
                                        page._refreshButton.set( 5000 );
                                }
                        }
                           

運行head:
[master@node0 elasticsearch-head-master]$ npm install       //如果安裝不上或者速度慢可以用下面的
npm install cnpm --registry=https://registry.npm.taobao.org
然後執行下面的命令:
[master@node0 elasticsearch-head-master]$ grunt server 
然後用瀏覽器鏈接:

圖片在這裏


安裝完畢

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章