被子外面很危险!

在 AlmaLinux 8 安装 Yunzai-Bot

踩坑日记 T^T


准备

切换 root 权限

sudo -i

更新系统

yum update -y  && yum upgrade -y && dnf -y update

环境

安装 nodejs

选择发行版本

Node.js LTS (18.x)

curl -fsSL https://rpm.nodesource.com/setup_lts.x | bash -
可选

Node.js v19.x

curl -fsSL https://rpm.nodesource.com/setup_19.x | bash -

Node.js v18.x

curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -

Node.js v16.x

curl -fsSL https://rpm.nodesource.com/setup_16.x | bash -

Node.js v14.x

curl -fsSL https://rpm.nodesource.com/setup_14.x | bash -

Node.js Current (19.x)

curl -fsSL https://rpm.nodesource.com/setup_current.x | bash -

上述版本选择一个即可

安装Node.js

yum install -y nodejs

安装 chrome 依赖库

yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 -y && yum install libdrm libgbm libxshmfence -y && yum install nss -y && yum update nss -y

安装中文字体

yum groupinstall fonts -y

安装 git

yum install -y git

安装并运行 redis

yum install -y redis && redis-server --daemonize yes

安装 FFmpeg

启用 EPEL

dnf -y install https://download.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

安装 RPM Fusion 存储库

dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm -y
dnf install --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm -y

启用 powertools 存储库

dnf config-manager --set-enabled powertools
yum config-manager --enable powertools

安装FFmpeg

dnf install -y ffmpeg

初始化项目

克隆项目

git clone --depth=1 -b main https://gitee.com/yoimiya-kokomi/Yunzai-Bot.git

进入目录

cd Yunzai-Bot

安装 pnpm

npm install pnpm -g

安装依赖

pnpm install -P

安装插件

Guoba-Plugin

Guoba-PluginYunzai-Bot的扩展插件,主要提供后台管理界面。

git clone --depth=1 https://gitee.com/guoba-yunzai/guoba-plugin.git ./plugins/Guoba-Plugin/
pnpm install --filter=guoba-plugin

Miao-Plugin

miao-plugin是一个Yunzai-Bot的升级插件,提供包括角色面板、角色查询等角色相关功能。

具体功能可在安装插件后 通过 #喵喵帮助 进行查看。如需进行设置则可通过 #喵喵设置 命令进行管理。

git clone --depth=1 https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/

windoge-plugin

自用Yunzai-bot(V2/V3)插件,多为修改适配其他大佬的插件功能

git clone https://ghproxy.com/https://github.com/gxy12345/windoge-plugin.git ./plugins/windoge-plugin/
pnpm install --filter=windoge-plugin

xiaoyao-cvs-plugin

由逍遥自行制作的原神图鉴,按业务分类整理。图片更新时替换对应路径的文件,保持图片url不变~ 其余功能支持:stoken相关功能支持、云原神签到支持、扫码登录

git clone https://gitee.com/Ctrlcvs/xiaoyao-cvs-plugin.git ./plugins/xiaoyao-cvs-plugin/

xiaofei

自用的Yunzai机器人插件(仅支持v3)

git clone https://gitee.com/xfdown/xiaofei-plugin.git ./plugins/xiaofei-plugin/

Expand-Plugin

Expand-Plugin是一个Yunzai-Bot的拓展插件,主要基于云崽提供部分拓展功能,如刻晴攻略5、具体可见#拓展帮助

git clone --depth=1 https://gitee.com/SmallK111407/expand-plugin.git ./plugins/expand-plugin/

榴莲插件

v2v3通用的云崽插件包

git clone https://gitee.com/huifeidemangguomao/liulian-plugin.git ./plugins/liulian-plugin/

其他插件

Yunzai-Bot插件索引

注意事项

插件安装后需在Yunzai根目录执行:

pnpm install -P

启动

运行

node app

后台运行

npm start / pnpm start

后台停止

npm stop / pnpm stop

查看后台运行时的日志

npm run log / pnpm run log

其他

BBR

打开配置文件/etc/sysctl.conf以启用 TCP BBR。

vi /etc/sysctl.conf

在配置文件的末尾,添加以下行。

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

保存文件,并使用此命令刷新您的配置,

sysctl -p

输出:

[root@vps ~]# sysctl -p
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

现在,验证您的系统是否启用了 BBR,

sysctl net.ipv4.tcp_congestion_control

输出:

[root@vps ~]# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr

完毕!


参考资料

https://docs.yunzai.org/deploy/linux/local.html

https://access.redhat.com/discussions/5480461

https://forums.rockylinux.org/t/install-ffmpeg-problem/4506

https://wiki.crowncloud.net/?How_to_enable_BBR_on_AlmaLinux_8

https://gitee.com/yhArcadia/Yunzai-Bot-plugins-index

添加新评论