ea9a5c3b3f
- 00.收件箱 - 01.待办 - 10.项目 - 20.领域 - 30.资源 - 40.归档 - 50.模板
385 lines
11 KiB
Markdown
385 lines
11 KiB
Markdown
# Ubuntu 24
|
||
用云服务器直接安装
|
||
# OpenClaw
|
||
用一键安装脚本
|
||
```curl -fsSL https://openclaw.ai/install.sh | bash```
|
||
|
||
# 后台启动
|
||
如果提示systemctl。如下执行:
|
||
```
|
||
# 更新systemd
|
||
sudo apt update
|
||
sudo apt install dbus-user-session
|
||
sudo apt install --reinstall libpam-systemd
|
||
#启用Root用户的lingering
|
||
sudo loginctl enable-linger root
|
||
#验证
|
||
loginctl show-user root | grep Linger
|
||
#启动dbus服务
|
||
systemctl --user start dbus.service
|
||
#验证服务状态
|
||
systemctl --user status
|
||
#安装gateway
|
||
openclaw gateway install
|
||
#启动
|
||
openclaw gateway start
|
||
#成功
|
||
```
|
||
# 搞模型
|
||
## Minimax CodingPlan
|
||
sk-cp-8PugyKE2xsG0S4x4KzDuuIV6Z9bT1NFwkpfrOSG05djFVExAgYEPpp7iUaTcugT6_P4uBYIN9S75l3ij-Yd2Ct8f6CxdKWdgFahESfn_jla-SlU6oGUCBjk
|
||
自定义的时候,不要用minimax的provider,用mm替代。
|
||
## Kimi CodingPlan
|
||
sk-kimi-4ogncmlAcNCJaPQWaGDvRpHO7rTGokMfddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40
|
||
## 智谱GLM CodingPlan
|
||
80ec82f2b14047d9a0399682a042378b.E8rv2nPSyuIsGoDr
|
||
|
||
## 阿里百炼通义千问CodingPlan(不通)
|
||
安装插件
|
||
sk-sp-9b5f973d23f84526b99132d0edf3b411
|
||
```
|
||
"auth": {
|
||
"profiles": {
|
||
"alibaba-cloud:default": {
|
||
"provider": "alibaba-cloud",
|
||
"mode": "api_key"
|
||
}
|
||
}
|
||
},
|
||
"models": {
|
||
"mode": "merge",
|
||
"providers": {
|
||
"alibaba-cloud": {
|
||
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
||
"api": "openai-completions",
|
||
"models": [
|
||
{
|
||
"id": "qwen3-max-2026-01-23",
|
||
"name": "qwen3-max-thinking",
|
||
"reasoning": false,
|
||
"input": [
|
||
"text"
|
||
],
|
||
"cost": {
|
||
"input": 0,
|
||
"output": 0,
|
||
"cacheRead": 0,
|
||
"cacheWrite": 0
|
||
},
|
||
"contextWindow": 262144,
|
||
"maxTokens": 65536
|
||
}
|
||
]
|
||
},
|
||
"mm": {
|
||
"baseUrl": "https://api.minimaxi.com/anthropic",
|
||
"apiKey": "sk-cp-8PugyKE2xsG0S4x4KzDuuIV6Z9bT1NFwkpfrOSG05djFVExAgYEPpp7iUaTcugT6_P4uBYIN9S75l3ij-Yd2Ct8f6CxdKWdgFahESfn_jla-SlU6oGUCBjk",
|
||
"api": "anthropic-messages",
|
||
"authHeader": true,
|
||
"models": [
|
||
{
|
||
"id": "MiniMax-M2.1",
|
||
"name": "MiniMax M2.1",
|
||
"reasoning": false,
|
||
"input": [
|
||
"text"
|
||
],
|
||
"cost": {
|
||
"input": 15,
|
||
"output": 60,
|
||
"cacheRead": 2,
|
||
"cacheWrite": 10
|
||
},
|
||
"contextWindow": 200000,
|
||
"maxTokens": 8192
|
||
}
|
||
]
|
||
},
|
||
"zhipu": {
|
||
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
|
||
"apiKey": "80ec82f2b14047d9a0399682a042378b.E8rv2nPSyuIsGoDr",
|
||
"api": "openai-completions",
|
||
"models": [
|
||
{
|
||
"id": "glm-4.7",
|
||
"name": "glm 4.7",
|
||
"reasoning": false,
|
||
"input": [
|
||
"text"
|
||
],
|
||
"cost": {
|
||
"input": 0,
|
||
"output": 0,
|
||
"cacheRead": 0,
|
||
"cacheWrite": 0
|
||
},
|
||
"contextWindow": 200000,
|
||
"maxTokens": 8192
|
||
},
|
||
{
|
||
"id": "glm-4.7-FlashX",
|
||
"name": "glm 4.7 FlashX",
|
||
"reasoning": false,
|
||
"input": [
|
||
"text"
|
||
],
|
||
"cost": {
|
||
"input": 0,
|
||
"output": 0,
|
||
"cacheRead": 0,
|
||
"cacheWrite": 0
|
||
},
|
||
"contextWindow": 200000,
|
||
"maxTokens": 8192
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"agents": {
|
||
"defaults": {
|
||
"model": {
|
||
"primary": "m21",
|
||
"fallbacks": [
|
||
"g47f",
|
||
"g47",
|
||
"qmax",
|
||
"k2p5"
|
||
]
|
||
},
|
||
"models": {
|
||
"zhipu/glm-4.7": {"alias":"g47"},
|
||
"zhipu/glm-4.7-FlashX": {"alias":"g47f"},
|
||
"mm/MiniMax-M2.1":{"alias":"m21"},
|
||
"alibaba-cloud/qwen3-max-2026-01-23": {"alias":"qmax"},
|
||
"kimi-coding/k2p5": {
|
||
"alias": "k2p5"
|
||
}
|
||
},
|
||
|
||
"plugins": {
|
||
"entries": {
|
||
"alibaba-cloud-auth": {
|
||
"enabled": true
|
||
}
|
||
}
|
||
},
|
||
```
|
||
```
|
||
//通用模型设置方法
|
||
openclaw config set 'models.providers.zhipu' --json '{
|
||
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
|
||
"apiKey": "80ec82f2b14047d9a0399682a042378b.E8rv2nPSyuIsGoDr",
|
||
"api": "openai-completions",
|
||
"models": [
|
||
{ "id": "glm-4.7", "name": "glm 4.7" }
|
||
]
|
||
}'
|
||
openclaw config set models.mode merge
|
||
openclaw models set zhipu/glm-4.7
|
||
```
|
||
# 搞外网访问和网络搜索api
|
||
```
|
||
"gateway": {
|
||
"port": 18789,
|
||
"mode": "local",
|
||
"bind": "lan",
|
||
"controlUi": {
|
||
"allowInsecureAuth": true
|
||
},
|
||
"auth": {
|
||
"mode": "token",
|
||
"token": "xinlongcheng1903"
|
||
},
|
||
"tailscale": {
|
||
"mode": "off",
|
||
"resetOnExit": false
|
||
},
|
||
"http": {
|
||
"endpoints": {
|
||
"responses": {
|
||
"enabled": true
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"plugins": {
|
||
"entries": {
|
||
"alibaba-cloud-auth": {
|
||
"enabled": true
|
||
},
|
||
"alibaba-cloud-international-auth": {
|
||
"enabled": true
|
||
},
|
||
"alibaba-cloud-us-auth": {
|
||
"enabled": true
|
||
}
|
||
}
|
||
},
|
||
"tools": {
|
||
"web": {
|
||
"search": {
|
||
"enabled": true,
|
||
"provider": "brave",
|
||
"apiKey": "BSAjOnKoRQhsGaUEWY57A3GZiXEgzzQ"
|
||
}
|
||
}
|
||
}
|
||
```
|
||
## 宝塔面板
|
||
```
|
||
阿里云
|
||
https://47.82.1.197:12180/2ccc33f3
|
||
t6ql9ypx
|
||
004f8467
|
||
站点:
|
||
micecola.cn
|
||
ftp:
|
||
micecola_cn
|
||
JHZFcX8bdzpAa94c
|
||
数据库:
|
||
micecola_cn
|
||
QMxWCbrhnMztDwiZ
|
||
|
||
http://47.82.1.197:18789/?token=eeaf68e4545727133f94bca0523cd0b3c72049c6d80aad59
|
||
```
|
||
# 搞聊天窗口
|
||
## 飞书
|
||
**遗留问题:群聊没调通。**
|
||
**飞书机器人有每月10000次的限制**
|
||
https://open.feishu.cn/
|
||
创建应用和机器人
|
||
cli_a9f74dc9a3f8dbce
|
||
QtnvzRUhhFoNTTorxJuAwgSJ3ocPv0p1
|
||
添加权限
|
||
设置事件与回调方式
|
||
OpenClaw安装环境并配置
|
||
```
|
||
openclaw plugins install @m1heng-clawd/feishu
|
||
openclaw channels add
|
||
openclaw config set channels.feishu.appId "cli_a9f74dc9a3f8dbce"
|
||
openclaw config set channels.feishu.appSecret "QtnvzRUhhFoNTTorxJuAwgSJ3ocPv0p1"
|
||
openclaw config set channels.feishu.enabled true
|
||
# 推荐使用 websocket
|
||
openclaw config set channels.feishu.connectionMode websocket
|
||
openclaw config set channels.feishu.dmPolicy pairing
|
||
openclaw config set channels.feishu.groupPolicy allowlist
|
||
openclaw config set channels.feishu.requireMention true
|
||
```
|
||
```
|
||
"feishu": {
|
||
"appId": "cli_a9f74dc9a3f8dbce",
|
||
"appSecret": "QtnvzRUhhFoNTTorxJuAwgSJ3ocPv0p1",
|
||
"enabled": true,
|
||
"connectionMode": "websocket",
|
||
"dmPolicy": "pairing",
|
||
"groupPolicy": "allowlist",
|
||
"requireMention": true
|
||
},
|
||
```
|
||
## whatsapp
|
||
**需要科学上网**
|
||
**如果不给openclaw单独备一个号码,自己跟自己聊天收不到通知**
|
||
```
|
||
"whatsapp": {
|
||
"dmPolicy": "allowlist",
|
||
"selfChatMode": true,
|
||
"allowFrom": [
|
||
"+8617611420192"
|
||
],
|
||
"groupPolicy": "allowlist",
|
||
"mediaMaxMb": 50,
|
||
"debounceMs": 0
|
||
},
|
||
```
|
||
通过openclaw configure配置,扫码配对,输入自己的手机号码,以后自己跟自己聊天即可。自己跟自己聊天没有提示。
|
||
也可以另外准备一个手机号码,绑定给openclaw,然后用自己的whatsapp加这个备用号码,跟备用号码聊天,这样有提示。
|
||
## IMessage
|
||
需要Mac本地部署,待研究
|
||
## 企业微信
|
||
**企业微信要用应用不要用机器人,:**
|
||
```
|
||
机器人有下面的问题:
|
||
- **每次先回1,再刷内容,收不到通知**
|
||
应用还有好处:
|
||
- 可以自建应用菜单,整合一些命令的快捷操作进去。
|
||
```
|
||
### 网上流传的机器人搞法
|
||
https://work.weixin.qq.com/
|
||
企业微信后台管理工具,创建智能机器人,选择API模式,输入回调URL,生成token和key
|
||
然后回openclaw安装
|
||
```
|
||
openclaw plugins install https://github.com/xl370869-art/wecom.git
|
||
```
|
||
|
||
配置
|
||
```
|
||
"wecom": {
|
||
"enabled": true,
|
||
"bot": {
|
||
"token": "X8ySyqpZ",
|
||
"encodingAESKey": "SjHvepG9uF38EDPyNmHjv22n2Ric8BVCA31imJidYxY",
|
||
"receiveId": "",
|
||
"dm": {
|
||
"policy": "pairing"
|
||
}
|
||
}
|
||
}
|
||
```
|
||
http://47.82.1.197:18789/wecom/bot
|
||
X8ySyqpZ
|
||
SjHvepG9uF38EDPyNmHjv22n2Ric8BVCA31imJidYxY
|
||
### 企业微信应用搞法
|
||
- 后台->我的企业->企业信息->企业ID
|
||
- 后台->应用管理->应用->创建应用->查看应用ID
|
||
- 查看应用Secret
|
||
- 设置企业可信IP中添加服务器IP
|
||
- 设置接收消息
|
||
- URL是http://47.82.1.197:18789/wecom/agent
|
||
- 随机一个Token
|
||
- 随机一个EncodingAESKey
|
||
- openclaw配置
|
||
```
|
||
"channels": {
|
||
"wecom": {
|
||
"enabled": true,
|
||
"agent": {
|
||
"corpId":"wwe98fa68a53dbf51d",
|
||
"corpSecret":"C5rwbH55fKEB8mwVgyMcwzMs-4KgR9DcIXsyMGbxfwg",
|
||
"agentId":"1000002",
|
||
"token": "vjgcDzgRcqeFOG5X8lpdAk87gsw7i",
|
||
"encodingAESKey": "bAx5QMjhHIZqnd33VgVcs4exD5JRLNn9zc1gmICiIS2",
|
||
"dm": {
|
||
"policy": "open",
|
||
"allowFrom": []
|
||
}
|
||
}
|
||
}
|
||
},
|
||
|
||
```
|
||
- 后台自定义菜单可以新建菜单,使用发送消息方式快捷发送/new等各种预定义命令。发布后菜单会出现在会话窗口工具栏。
|
||
|
||
|
||
|
||
|
||
# 技能
|
||
## 内置技能
|
||
/home/admin/.npm-global/lib/node_modules/openclaw/skills/
|
||
- github 管理github的issue,pr,ci等。不往github提代码就用不到。(需要brew)
|
||
- helthcheck 安全巡检,可以要求启动一个定时任务做安全巡检。
|
||
- clawhub:openclaw的在线技能仓库。安装好之后就可以用clawhub安装热门的技能,clawhub install 即可。但是谨慎筛选(有一些技能带毒)
|
||
- skill-creator 创建技能
|
||
- mcporter 调用mcp工具
|
||
- coding-agent 调用claudecode,codex,opencode等工具。需要安装这些工具
|
||
- blogwatcher RSS订阅,任何有RSS/Atom输出的网站都能监控
|
||
- sessionlogger 所有会话日志
|
||
- video-frames 将视频截帧生成图片。ffmpeg
|
||
- 语音TTS
|
||
- nano pdf 简单编辑pdf文字
|
||
- himalaya 邮件处理
|
||
## 其他技能
|
||
- bilibili-analyzer https://skills.sh/aidotnet/moyucode/bilibili-analyzer 分析bilibili视频,截帧获取内容。
|
||
-
|
||
|