温馨提示:建议获取root权限后执行

更换软件源

bash <(curl -sSL https://linuxmirrors.cn/main.sh)

更新软件包并安装软件包

apt update && apt upgrade -y

安装nodejs

1.下载并导入 Nodesource GPG 密钥

sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

2.创建 deb 存储库

NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

3.NODE_MAJOR为版本,自行修改

NODE_MAJOR=16
NODE_MAJOR=18
NODE_MAJOR=20
NODE_MAJOR=21

4.更新并安装nodejs

sudo apt-get update
sudo apt-get install nodejs -y

安装redis

apt-get install redis -y

安装chromium浏览器(x86架构,ARM架构自行找软件源)

apt install chromium-browser -y

安装git

apt-get install git -y

克隆喵版Miao-Yunzai

git clone --depth=1 https://github.com/yoimiya-kokomi/Miao-Yunzai.git

进入Miao-Yunzai

cd Miao-Yunzai && git clone --depth=1 https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/

安装pnpm

//更新国内npm源
npm --registry=https://registry.npmmirror.com install pnpm -g

安装依赖

//更新国内pnpm源
pnpm config set registry https://registry.npmmirror.com && pnpm install -P

运行程序

node app

Yunzai-Bot插件库(点击跳转)