Luna 环境部署
1 Luna 组件概述
Luna 是 JumpServer 的前端 UI 项目,主要使用 Angular CLI 完成。
1.1 环境要求
| Name | Luna | Node |
|---|---|---|
| Version | v4.10.17 | 16.5 |
1.2 选择部署方式
源代码部署
cd /opt
mkdir /opt/luna-v4.10.17
wget -O /opt/luna-v4.10.17.tar.gz https://github.com/jumpserver/luna/archive/refs/tags/v4.10.17.tar.gz
tar -xf luna-v4.10.17.tar.gz -C /opt/luna-v4.10.17 --strip-components 1
node -v
v16.5
- 安装依赖。
cd /opt/luna-v4.10.17
yarn install
- 修改配置文件。
sed -i "s@[0-9].[0-9].[0-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-v4.10.17
tar -czf luna-v4.10.17.tar.gz luna-v4.10.17
使用 Release
| OS | Arch | Name |
|---|---|---|
| All | All | luna-v4.10.17.tar.gz |
cd /opt
wget https://github.com/jumpserver/luna/releases/download/v4.10.17/luna-v4.10.17.tar.gz
tar -xf luna-v4.10.17.tar.gz