码迷,mamicode.com
首页 > 其他好文 > 详细

kibana 5.5 源码编译踩坑记录

时间:2017-09-28 14:08:55      阅读:237      评论:0      收藏:0      [点我收藏+]

标签:解压   shel   for   依赖   生成   pen   补充   localhost   dev   

由于项目需要定制开发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"
  },

 

kibana 5.5 源码编译踩坑记录

标签:解压   shel   for   依赖   生成   pen   补充   localhost   dev   

原文地址:http://www.cnblogs.com/bonelee/p/7606107.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!