kibana 5.5 源码编译踩坑记录

  1. 云栖社区>
  2. 博客>
  3. 正文

kibana 5.5 源码编译踩坑记录

桃子红了呐 2017-11-09 20:34:00 浏览1469
展开阅读全文
由于项目需要定制开发kibana,因此需要编译kibana,在开发环境下运行。
 
注意:必须下载kibana 5.5的源码才能正常编译,下载release或者snapshot版本是不行的,运行npm start会因为无scripts目录报错。
 
 

Setting Up kibana Development Environment

Fork, then clone the kibana repo and change directory into it

下载kibana5.5源码解压后
cd kibana
记得还要 git 初始化下,因为build时候依赖.git目录。

Install the version of node.js listed in the .node-version file (this can be easily automated with tools such as nvm and avn)

nvm install "$(cat .node-version)"
注:没有的话就自己生成一个
.node-version,写入6.11.1

Install npm dependencies

npm install
注意:npm --registry https://registry.npm.taobao.org install 用国内源加速

Start elasticsearch. 启动es,然后

npm start
当改动src目录后, 它会主动监测改动,重新启动web服务。然后访问localhost:5601就可以看到效果了。
 
 
补充:
 
 npm run build就可以编译打包,发布的话,貌似是npm run release。具体可以看package.json里的scripts:
复制代码
  "scripts": {
    "test": "grunt test",
    "test:dev": "grunt test:dev",
    "test:quick": "grunt test:quick",
    "test:browser": "grunt test:browser",
    "test:ui": "grunt test:ui",
    "test:ui:server": "grunt test:ui:server",
    "test:ui:runner": "echo 'use `node scripts/functional_test_runner`' && false",
    "test:server": "grunt test:server",
    "test:coverage": "grunt test:coverage",
    "test:visualRegression": "grunt test:visualRegression:buildGallery",
    "checkLicenses": "grunt licenses",
    "build": "grunt build",
    "release": "grunt release",
    "start": "sh ./bin/kibana --dev",
    "precommit": "grunt precommit",
    "karma": "karma start",
    "elasticsearch": "grunt esvm:dev:keepalive",
    "lint": "grunt eslint:source",
    "lintroller": "grunt eslint:fixSource",
    "makelogs": "echo 'use `node scripts/makelogs`' && false",
    "mocha": "echo 'use `node scripts/mocha`' && false",
    "sterilize": "grunt sterilize",
    "uiFramework:start": "grunt uiFramework:start",
    "uiFramework:build": "grunt uiFramework:build"
  },
复制代码

 















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/7606107.html,如需转载请自行联系原作者



网友评论

登录后评论
0/500
评论