跳转至

了解飞致云旗下开源产品

Luna 环境部署⚓︎

1 Luna 组件简述⚓︎

Luna 是 JumpServer 的前端 UI 项目,主要使用 Angular CLI 完成。

1.1 环境要求⚓︎

Name Luna Node
Version v3.10.9 16.5

1.2 选择部署方式⚓︎

  • 下载源代码。
  • 可以从 Github 网站上获取最新的 Release 副本。这些版本是最新代码的稳定快照,从项目网站下载 Source code.tar.gz 源代码,通过命令行中提取该存档:
cd /opt
mkdir /opt/luna-v3.10.9
wget -O /opt/luna-v3.10.9.tar.gz https://github.com/jumpserver/luna/archive/refs/tags/v3.10.9.tar.gz
tar -xf luna-v3.10.9.tar.gz -C /opt/luna-v3.10.9 --strip-components 1
  • 安装 Node。
  • Node 官方网站参考文档部署 Node.js,请根据 环境要求,通过命令行中判断是否安装完成:

node -v
v16.5

  • 安装依赖。
cd /opt/luna-v3.10.9
yarn install
  • 修改配置文件。

sed -i "s@[0-9].[0-9].[0-9]@v3.10.9@g" src/environments/environment.prod.ts
vi proxy.conf.json
{
  "/koko": {
    "target": "http://localhost:5000",  # KoKo 地址
    "secure": false,
    "ws": true
  },
  "/media/": {
    "target": "http://localhost:8080",  # Core 地址
    "secure": false,
    "changeOrigin": true
  },
  "/api/": {
    "target": "http://localhost:8080",  # Core 地址
    "secure": false,                    # https ssl 需要开启
    "changeOrigin": true
  },
  "/core": {
    "target": "http://localhost:8080",  # Core 地址
    "secure": false,
    "changeOrigin": true
  },
  "/static": {
    "target": "http://localhost:8080",  # Core 地址
    "secure": false,
    "changeOrigin": true
  },
  "/lion": {
    "target": "http://localhost:9529",  # Lion 地址
    "secure": false,
    "pathRewrite": {
      "^/lion/monitor": "/monitor"
    },
    "ws": true,
    "changeOrigin": true
  },
  "/omnidb": {
    "target": "http://localhost:8082",
    "secure": false,
    "ws": true,
    "changeOrigin": true
  }
}

  • 运行 Luna。
./node_modules/.bin/ng serve
  • 构建 Luna。
yarn build
cp -R src/assets/i18n luna/
cp -rf luna luna-v3.10.9
tar -czf luna-v3.10.9.tar.gz luna-v3.10.9

构建完成后, 生成在 luna 目录下

  • 下载 Release 文件,从 Github 网站上获取最新的 Release 副本。
  • 这些版本是最新代码的稳定快照。
OS Arch Name
All All luna-v3.10.9.tar.gz
cd /opt
wget https://github.com/jumpserver/luna/releases/download/v3.10.9/luna-v3.10.9.tar.gz
tar -xf luna-v3.10.9.tar.gz