✨ [2025-01-07] 添加 Linkwarden、集简云对接、Yearning部署指南
Some checks failed
Publish to Confluence / confluence (push) Failing after 39s
Some checks failed
Publish to Confluence / confluence (push) Failing after 39s
This commit is contained in:
parent
ca283596b1
commit
b6b7f1f0c5
3
任务/周报.md
3
任务/周报.md
@ -1,5 +1,6 @@
|
|||||||
## 20250106 - 20250110
|
## 20250106 - 20250110
|
||||||
- [ ] 集简云对接
|
- [ ] Yearning SSO接入
|
||||||
|
- [ ] 集简云对接(需要付费后才能介入)
|
||||||
- 基础架子搭建
|
- 基础架子搭建
|
||||||
- 接口对接
|
- 接口对接
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
- [Self-Host安装](https://docs.linkwarden.app/self-hosting/installation)
|
- [Self-Host安装](https://docs.linkwarden.app/self-hosting/installation)
|
||||||
- [SSO配置](https://docs.linkwarden.app/self-hosting/sso-oauth#keycloak)
|
- [SSO配置](https://docs.linkwarden.app/self-hosting/sso-oauth#keycloak)
|
||||||
|
|
||||||
|
|
||||||
## 参考
|
## 参考
|
||||||
|
|
||||||
- [Linkwarden](https://docs.linkwarden.app/)
|
- [Linkwarden](https://docs.linkwarden.app/)
|
||||||
|
@ -23,107 +23,116 @@
|
|||||||
# Yearning 安装及 SSO 接入指南
|
# Yearning 安装及 SSO 接入指南
|
||||||
|
|
||||||
## Yearning 安装启动
|
## Yearning 安装启动
|
||||||
可以参考:https://next.yearning.io/zh/usage/ixah25xr/
|
|
||||||
|
- 可以参考:https://next.yearning.io/zh/usage/ixah25xr/
|
||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
|
|
||||||
#### `docker-compose.yml` 文件
|
#### `docker-compose.yml` 文件
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
yearning:
|
yearning:
|
||||||
image: yeelabs/yearning:v3.1.5
|
image: yeelabs/yearning:v3.1.5
|
||||||
environment:
|
environment:
|
||||||
MYSQL_USER: yearning
|
MYSQL_USER: yearning
|
||||||
MYSQL_PASSWORD: ukC2ZkcG_ZTeb
|
MYSQL_PASSWORD: ukC2ZkcG_ZTeb
|
||||||
MYSQL_ADDR: mysql
|
MYSQL_ADDR: mysql
|
||||||
MYSQL_DB: yearning
|
MYSQL_DB: yearning
|
||||||
SECRET_KEY: dbcjqheupqjsuwsm
|
SECRET_KEY: dbcjqheupqjsuwsm
|
||||||
IS_DOCKER: is_docker
|
IS_DOCKER: is_docker
|
||||||
ports:
|
ports:
|
||||||
- 8000:8000
|
- 8000:8000
|
||||||
volumes:
|
volumes:
|
||||||
- ./opt/conf.toml:/opt/conf.toml
|
- ./opt/conf.toml:/opt/conf.toml
|
||||||
# 首次使用请先初始化
|
#- 首次使用请先初始化
|
||||||
# command: /bin/bash -c "./Yearning install && ./Yearning run"
|
#- command: /bin/bash -c "./Yearning install && ./Yearning run"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ukC2ZkcG_ZTeb
|
MYSQL_ROOT_PASSWORD: ukC2ZkcG_ZTeb
|
||||||
MYSQL_DATABASE: yearning
|
MYSQL_DATABASE: yearning
|
||||||
MYSQL_USER: yearning
|
MYSQL_USER: yearning
|
||||||
MYSQL_PASSWORD: ukC2ZkcG_ZTeb
|
MYSQL_PASSWORD: ukC2ZkcG_ZTeb
|
||||||
command:
|
command:
|
||||||
- --character-set-server=utf8mb4
|
- --character-set-server=utf8mb4
|
||||||
- --collation-server=utf8mb4_general_ci
|
- --collation-server=utf8mb4_general_ci
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/mysql:/var/lib/mysql
|
- ./data/mysql:/var/lib/mysql
|
||||||
|
|
||||||
# 默认账号:admin,默认密码:Yearning_admin
|
#- 默认账号:admin,默认密码:Yearning_admin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `conf.toml` 文件
|
#### `conf.toml` 文件
|
||||||
|
|
||||||
```java
|
```java
|
||||||
[Mysql]
|
[Mysql]
|
||||||
Db = "Yearning"
|
Db ="Yearning"
|
||||||
Host = "127.0.0.1"
|
Host ="127.0.0.1"
|
||||||
Port = "3306"
|
Port ="3306"
|
||||||
Password = ""
|
Password =""
|
||||||
User = "root"
|
User ="root"
|
||||||
|
|
||||||
[General]
|
[General]
|
||||||
SecretKey = "dbcjqheupqjsuwsm"
|
SecretKey ="dbcjqheupqjsuwsm"
|
||||||
Hours = 4
|
Hours =4
|
||||||
Lang="zh_CN"
|
Lang="zh_CN"
|
||||||
|
|
||||||
[Oidc]
|
[Oidc]
|
||||||
Enable = false
|
Enable =false
|
||||||
ClientId = "${keycloak的客户端ID}"
|
ClientId ="${keycloak的客户端ID}"
|
||||||
ClientSecret = "${keycloak的客户端Secret}"
|
ClientSecret ="${keycloak的客户端Secret}"
|
||||||
Scope = "openid profile"
|
Scope ="openid profile"
|
||||||
AuthUrl = "${issuer链接}/protocol/openid-connect/auth"
|
AuthUrl ="${issuer链接}/protocol/openid-connect/auth"
|
||||||
TokenUrl = "${issuer链接}/protocol/openid-connect/token"
|
TokenUrl ="${issuer链接}/protocol/openid-connect/token"
|
||||||
UserUrl = "${issuer链接}/protocol/openid-connect/userinfo"
|
UserUrl ="${issuer链接}/protocol/openid-connect/userinfo"
|
||||||
RedirectUrL = "${yearning的地址}/oidc/_token-login"
|
RedirectUrL ="${yearning的地址}/oidc/_token-login"
|
||||||
UserNameKey = "preferred_username"
|
UserNameKey ="preferred_username"
|
||||||
RealNameKey = "name"
|
RealNameKey ="name"
|
||||||
EmailKey = "email"
|
EmailKey ="email"
|
||||||
SessionKey = "session_state"
|
SessionKey ="session_state"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Yearning OIDC 配置
|
### Yearning OIDC 配置
|
||||||
可以参考:https://next.yearning.io/zh/usage/boccobus/
|
|
||||||
|
- 可以参考:https://next.yearning.io/zh/usage/boccobus/
|
||||||
|
|
||||||
#### 修改 `conf.toml`(Keycloak示例)
|
#### 修改 `conf.toml`(Keycloak示例)
|
||||||
|
|
||||||
```java
|
```java
|
||||||
[Oidc]
|
[Oidc]
|
||||||
Enable = true
|
Enable =true
|
||||||
ClientId = "${keycloak的客户端ID}"
|
ClientId ="${keycloak的客户端ID}"
|
||||||
ClientSecret = "${keycloak的客户端Secret}"
|
ClientSecret ="${keycloak的客户端Secret}"
|
||||||
Scope = "openid profile"
|
Scope ="openid profile"
|
||||||
AuthUrl = "${issuer链接}/protocol/openid-connect/auth"
|
AuthUrl ="${issuer链接}/protocol/openid-connect/auth"
|
||||||
TokenUrl = "${issuer链接}/protocol/openid-connect/token"
|
TokenUrl ="${issuer链接}/protocol/openid-connect/token"
|
||||||
UserUrl = "${issuer链接}/protocol/openid-connect/userinfo"
|
UserUrl ="${issuer链接}/protocol/openid-connect/userinfo"
|
||||||
RedirectUrL = "${yearning的地址}/oidc/_token-login"
|
RedirectUrL ="${yearning的地址}/oidc/_token-login"
|
||||||
UserNameKey = "preferred_username"
|
UserNameKey ="preferred_username"
|
||||||
RealNameKey = "name"
|
RealNameKey ="name"
|
||||||
EmailKey = "email"
|
EmailKey ="email"
|
||||||
SessionKey = "session_state"
|
SessionKey ="session_state"
|
||||||
```
|
```
|
||||||
|
|
||||||
- ${keycloak的客户端ID}:例如 `yearning`
|
- ${keycloak的客户端ID}:例如 `yearning`
|
||||||
- ${keycloak的客户端Secret}: Keycloak中获取
|
- ${keycloak的客户端Secret}: Keycloak中获取
|
||||||
- ${issuer链接}: Keycloak 中获取
|
- ${issuer链接}: Keycloak 中获取
|
||||||
- ${yearning的地址}:yearning 请求地址
|
- ${yearning的地址}:yearning 请求地址
|
||||||
|
|
||||||
### 异常处理
|
### 异常处理
|
||||||
|
|
||||||
- 如果出现异常,可以排查 `Yearning` 服务和 `Keycloak` 服务是否可以访问通畅。
|
- 如果出现异常,可以排查 `Yearning` 服务和 `Keycloak` 服务是否可以访问通畅。
|
||||||
- 或者说 `Yearning` SSO 配置中的链接在 `Yearning` 所在服务中是否可以正常访问
|
- 或者说 `Yearning` SSO 配置中的链接在 `Yearning` 所在服务中是否可以正常访问
|
||||||
|
|
||||||
|
|
||||||
## 本地构建启动(参考)
|
## 本地构建启动(参考)
|
||||||
|
|
||||||
- Yearning `3.1.9.1`
|
- Yearning `3.1.9.1`
|
||||||
- 系统 `Ubuntu24.04`
|
- 系统 `Ubuntu24.04`
|
||||||
- nodejs `v18.20.5`
|
- nodejs `v18.20.5`
|
||||||
@ -131,31 +140,36 @@ SessionKey = "session_state"
|
|||||||
- go `go version go1.22.10 linux/amd64`
|
- go `go version go1.22.10 linux/amd64`
|
||||||
|
|
||||||
### 安装 GO
|
### 安装 GO
|
||||||
|
|
||||||
#### 下载安装
|
#### 下载安装
|
||||||
|
|
||||||
- 下载 go:https://go.dev/dl/
|
- 下载 go:https://go.dev/dl/
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 解压
|
#- 解压
|
||||||
tar -zxf go1.22.10.linux-amd64.tar.gz
|
tar -zxf go1.22.10.linux-amd64.tar.gz
|
||||||
|
|
||||||
# 移动
|
#- 移动
|
||||||
mv go /usr/local/go
|
mv go /usr/local/go
|
||||||
|
|
||||||
# 配置环境变量
|
#- 配置环境变量
|
||||||
vi /etc/profile
|
vi /etc/profile
|
||||||
####-/etc/profile start
|
####- /etc/profile start
|
||||||
export GOROOT=/usr/local/go
|
export GOROOT=/usr/local/go
|
||||||
export PATH=$PATH:$GOROOT/bin
|
export PATH=$PATH:$GOROOT/bin
|
||||||
####-/etc/profile end
|
####- /etc/profile end
|
||||||
|
|
||||||
# 使配置生效
|
#- 使配置生效
|
||||||
source /etc/profile
|
source /etc/profile
|
||||||
|
|
||||||
# 查看是否成功
|
#- 查看是否成功
|
||||||
go version
|
go version
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 配置 go proxy
|
#### 配置 go proxy
|
||||||
参考:https://goproxy.cn/
|
|
||||||
|
- 参考:https://goproxy.cn/
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
go env -w GO111MODULE=on
|
go env -w GO111MODULE=on
|
||||||
|
|
||||||
@ -163,17 +177,20 @@ go env -w GOPROXY=https://goproxy.cn,direct
|
|||||||
```
|
```
|
||||||
|
|
||||||
### 安装 Node
|
### 安装 Node
|
||||||
|
|
||||||
#### 下载安装
|
#### 下载安装
|
||||||
|
|
||||||
- 下载 nodejs:https://nodejs.org/en/download/
|
- 下载 nodejs:https://nodejs.org/en/download/
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 解压
|
#- 解压
|
||||||
xz -d node-v18.20.5-linux-x64.tar.xz
|
xz -d node-v18.20.5-linux-x64.tar.xz
|
||||||
tar tar -xf node-v18.20.5-linux-x64.tar
|
tar tar -xf node-v18.20.5-linux-x64.tar
|
||||||
|
|
||||||
# 移动
|
#- 移动
|
||||||
mv node-v18.20.5-linux-x64 /usr/local/nodejs
|
mv node-v18.20.5-linux-x64 /usr/local/nodejs
|
||||||
|
|
||||||
# 配置环境变量
|
#- 配置环境变量
|
||||||
vi /etc/profile
|
vi /etc/profile
|
||||||
####-/etc/profile start
|
####-/etc/profile start
|
||||||
export GOROOT=/usr/local/go
|
export GOROOT=/usr/local/go
|
||||||
@ -181,29 +198,36 @@ export NODE_HOME=/usr/local/nodejs
|
|||||||
export PATH=$PATH:$GOROOT/bin:$NODE_HOME/bin
|
export PATH=$PATH:$GOROOT/bin:$NODE_HOME/bin
|
||||||
####-/etc/profile end
|
####-/etc/profile end
|
||||||
|
|
||||||
# 验证安装
|
#- 验证安装
|
||||||
node -v
|
node -v
|
||||||
|
|
||||||
npm -v
|
npm -v
|
||||||
```
|
```
|
||||||
|
|
||||||
### Yearning 源码安装
|
### Yearning 源码安装
|
||||||
|
|
||||||
- 工作目录: `/usr/local/workspace`
|
- 工作目录: `/usr/local/workspace`
|
||||||
|
|
||||||
#### 获取 Yearning
|
#### 获取 Yearning
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/cookieY/Yearning.git
|
git clone https://github.com/cookieY/Yearning.git
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 获取 Yearning 前端
|
#### 获取 Yearning 前端
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/cookieY/gemini-next.git
|
git clone https://github.com/cookieY/gemini-next.git
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 编译前端代码
|
#### 编译前端代码
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 进入目录
|
#- 进入目录
|
||||||
cd /usr/local/workspace/gemini-next
|
cd /usr/local/workspace/gemini-next
|
||||||
#-安装
|
#- 安装
|
||||||
npm install --registry https://registry.npmmirror.com
|
npm install --registry https://registry.npmmirror.com
|
||||||
#-构建
|
#- 构建
|
||||||
npm run build --registry https://registry.npmmirror.com
|
npm run build --registry https://registry.npmmirror.com
|
||||||
|
|
||||||
#- 将目标文件移动到源文件目录
|
#- 将目标文件移动到源文件目录
|
||||||
@ -211,6 +235,7 @@ mv dist /usr/local/workspace/Yearning/src/service/
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 编译后端代码
|
#### 编译后端代码
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd /usr/local/workspace/Yearning
|
cd /usr/local/workspace/Yearning
|
||||||
|
|
||||||
@ -227,9 +252,10 @@ vi conf.toml
|
|||||||
# 启动
|
# 启动
|
||||||
go run main.go run
|
go run main.go run
|
||||||
```
|
```
|
||||||
|
|
||||||
- 启动报错,chat/* xxx
|
- 启动报错,chat/* xxx
|
||||||
- `vi src/service/yearning.go`
|
- `vi src/service/yearning.go`
|
||||||
- 删除报错提示的行相关的代码
|
- 删除报错提示的行相关的代码
|
||||||
|
|
||||||
## 参考
|
## 参考
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user