返回介绍

部署运行

发布于 2021-09-25 22:17:14 字数 1965 浏览 1091 评论 0 收藏 0

二进制运行

  1. git clone https://github.com/apache/shardingsphere-ui.git
  2. 运行 mvn clean install -Prelease
  3. 获取安装包 /shardingsphere-ui/shardingsphere-ui-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-ui-bin.tar.gz
  4. 解压缩后运行bin/start.sh
  5. 访问http://localhost:8088/

源码调试模式

ShardingSphere-UI 采用前后端分离的方式。

后端

  1. 后端程序执行入口为 org.apache.shardingsphere.ui.Bootstrap
  2. 访问 http://localhost:8088/

前端

  1. 进入 shardingsphere-ui-frontend/ 目录;
  2. 执行 npm install
  3. 执行 npm run dev
  4. 访问 http://localhost:8080/

配置

ShardingSphere-UI 的配置文件为 conf/application.properties, 它由两部分组成。

  1. 程序监听端口;
  2. 登录身份验证信息。
server.port=8088

user.admin.username=admin
user.admin.password=admin

注意事项

  1. 若使用 maven 构建后,再进行本地运行前端项目时,可能因为 node 版本不一致导致运行失败,可以清空 node_modules/ 目录后重新运行。 错误日志如下:
ERROR  Failed to compile with 17 errors
error  in ./src/views/orchestration/module/instance.vue?vue&type=style&index=0&id=9e59b740&lang=scss&scoped=true&
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Missing binding /shardingsphere/shardingsphere-ui/shardingsphere-ui-frontend/node_modules/node-sass/vendor/darwin-x64-57/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x
Found bindings for the following environments:
  - OS X 64-bit with Node.js 6.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文