欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Kylin编译部署及汉化

程序员文章站 2022-05-29 12:11:43
...

一、下载

git clone https://github.com/apache/kylin.git

二、编译

1、编译

mvn clean install -DskipTests

2、复制文件

cp -r server/src/main/webapp/WEB-INF webapp/app/WEB-INF

3、安装bower

cd webapp
npm install -g bower
bower --allow-root install

4、打包

a) windows64位下wget安装

下载 http://www.alexlomas.com/wGET64.zip ,解压后,将WGET64.EXE改名为wget.exe; 并配置环境变量PATH,使得在window命令行下可以直接执行wget

b) 命令打包

build/script/package.sh

打包完成之后,在kylin\dist\目录下生成apache-kylin-2.2.0-SNAPSHOT-bin.tar.gz安装包

三、Kylin安装

1、解压

tar xvf apache-kylin-2.2.0-SNAPSHOT-bin.tar.gz

 2、检查环境

注意:Kylin依赖hadoop环境,需要有hdfs的读写权限,所以在hdfs用户下安装的

bin/check-env.sh
  
注意:可能会报错bad interpreter;原因是在Windows环境下编译的,导致shell脚本在linux下报错
解决办法:对文件进行修改
sed -i 's/\r//' conf/setenv.sh
sed -i 's/\r//' bin/check-env.sh
sed -i 's/\r//' bin/check-migration-acl.sh
sed -i 's/\r//' bin/diag.sh
sed -i 's/\r//' bin/find-hadoop-conf-dir.sh
sed -i 's/\r//' bin/find-hbase-dependency.sh
sed -i 's/\r//' bin/find-hive-dependency.sh
sed -i 's/\r//' bin/find-kafka-dependency.sh
sed -i 's/\r//' bin/find-spark-dependency.sh
sed -i 's/\r//' bin/get-properties.sh
sed -i 's/\r//' bin/header.sh
sed -i 's/\r//' bin/health-check.sh
sed -i 's/\r//' bin/kylin-port-replace-util.sh
sed -i 's/\r//' bin/kylin.sh
sed -i 's/\r//' bin/load-hive-conf.sh
sed -i 's/\r//' bin/metastore.sh
sed -i 's/\r//' bin/sample.sh

3、启动

bin/kylin.sh start

4、访问地址

http://hostname:7070/kylin
默认用户名密码:ADMIN/KYLIN

四、开发环境

 

1、idea

mvn idea:idea

2、eclipse

mvn eclipse:eclipse

五、汉化

1、修改位置

kylin\webapp\app\js   js文件
kylin\webapp\app\partials   html页面

注意:汉化后需要重新打包,然后用apache-kylin-2.2.0-SNAPSHOT-bin\tomcat\webapps\kylin.war 包中的kylin\js 目录下的js文件替换已经启动的kylin对应目录下的文件即可,注意文件名要改成要替换的文件名,不需要重启。

汉化后编译后的js文件(html和js都打包在一个js中):scripts.min.20170901165054.js

汉化后的源文件js和html :app.rar

2、修改文件

1、js文件

webapp\app\js\controllers\access.js
webapp\app\js\controllers\admin.js
webapp\app\js\controllers\auth.js
webapp\app\js\controllers\badQuery.js
webapp\app\js\controllers\cube.js
webapp\app\js\controllers\cubeAdvanceSetting.js
webapp\app\js\controllers\cubeDimensions.js
webapp\app\js\controllers\cubeEdit.js
webapp\app\js\controllers\cubeMeasures.js
webapp\app\js\controllers\cubes.js
webapp\app\js\controllers\cubeSchema.js
webapp\app\js\controllers\index.js
webapp\app\js\controllers\job.js
webapp\app\js\controllers\modelDataModel.js
webapp\app\js\controllers\modelEdit.js
webapp\app\js\controllers\models.js
webapp\app\js\controllers\modelSchema.js
webapp\app\js\controllers\page.js
webapp\app\js\controllers\projects.js
webapp\app\js\controllers\query.js
webapp\app\js\controllers\sourceMeta.js
webapp\app\js\controllers\streamingConfig.js
webapp\app\js\directives\directives.js
webapp\app\js\model\cubeListModel.js
webapp\app\js\model\cubesManager.js
webapp\app\js\model\jobListModel.js
webapp\app\js\model\modelsManager.js
webapp\app\js\model\streamingListModel.js
webapp\app\js\model\tableModel.js
webapp\app\js\listeners.js
webapp\app\js\model\projectConfig.js

2、html页面

webapp\app\partials\home.html
webapp\app\partials\header.html
webapp\app\partials\footer.html
webapp\app\partials\tables\loadStreamingTable.html
webapp\app\partials\tables\source_table_tree.html
webapp\app\partials\tables\table_detail.html
webapp\app\partials\tables\table_load.html
webapp\app\partials\query\query.html
webapp\app\partials\query\query_detail.html
webapp\app\partials\projects\projects.html
webapp\app\partials\projects\project_create.html
webapp\app\partials\models\model_schema.html
webapp\app\partials\models\model_json_edit.html
webapp\app\partials\models\model_clone.html
webapp\app\partials\modelDesigner\data_model.html
webapp\app\partials\modelDesigner\model_dimensions.html
webapp\app\partials\modelDesigner\model_measures.html
webapp\app\partials\modelDesigner\model_info.html
webapp\app\partials\cubeDesigner\info.html
webapp\app\partials\cubeDesigner\dimensions.html
webapp\app\partials\cubeDesigner\measures.html
webapp\app\partials\cubeDesigner\refresh_settings.html
webapp\app\partials\cubeDesigner\advanced_settings.html
webapp\app\partials\cubeDesigner\cubeOverwriteProp.html
webapp\app\partials\tables\loadStreamingTable.html
webapp\app\partials\jobs\job_refresh.html
webapp\app\partials\jobs\job_merge.html
webapp\app\partials\jobs\job_steps.html
webapp\app\partials\jobs\job_submit.html
webapp\app\partials\directives\pagination.html