当前位置: 首页 > 工具软件 > Ninja Web > 使用案例 >

青龙面板2.10安装+Ninja支持cookie上车

盖玉石
2023-12-01

首先我们需要一台云服务器,如果你有nas或者软路由的话亦可

阿里云服务器
腾讯云服务器

请使用CentOS 7系统安装。安装过程中重置系统可以解决百分之80的问题!
防火墙需要开放相应端口。

上车加群:762411773

下面开始操作,一切操作都在finalshell上完成,请自行百度安装
首先是完成Docker的安装,过程非常简单。以下操作均以CentOS为示例系统

1.安装docker

sudo yum check-update
curl -sSL https://get.daocloud.io/docker | sh

这一步需要等待一会儿

sudo systemctl start docker
sudo systemctl status docker
sudo systemctl enable docker

 

2.青龙面板的安装
以下命令包含了青龙和ninja所需要的端口和目录映射
2.1拉取青龙镜像

docker pull whyour/qinglong:2.10

 

如果遇到error pulling image configuration: Get https://production.cloudflare.docker.com问题参考:error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/_这辈子_安静的努力着的博客-CSDN博客

这一步如果无法拉取镜像考虑是网络问题,添加阿里云的镜像加速器即可,自行百度

2.2安装镜像

docker run -dit \
-v $pwd/ql/config:/ql/config \
-v $pwd/ql/log:/ql/log \
-v $pwd/ql/db:/ql/db \
-v $pwd/ql/scripts:/ql/scripts \
-v $pwd/ql/ninja:/ql/ninja \
-v $pwd/ql/repo:/ql/repo \
-v $pwd/ql/jbot:/ql/jbot \
-v $pwd/ql/raw:/ql/raw \
-p 5700:5700 \
-p 5701:5701 \
-e ENABLE_HANGUP=true \
-e ENABLE_WEB_PANEL=true \
--name qinglong \
--hostname qinglong \
--restart always \
whyour/qinglong:2.10

猫盘这类设备只有host没有桥接bridge,docker run 注意: -p 5700:5700 \ 之类改为 --network host \

2.3开放防火墙端口,云服务器需要去防火墙添加规则

firewall-cmd --zone=public --add-port=5700/tcp --permanent
firewall-cmd --zone=public --add-port=5701/tcp --permanent

到这里青龙已经安装完毕,我们打开ip:5700即可访问青龙后台

3.安装ninja

docker exec -it qinglong bash
git clone https://ghproxy.com/https://github.com/fecture/ninja.git /ql/ninja
cd /ql/ninja/backend
pnpm install
cp .env.example .env

接下来finalshell访问/ql/ninja/backend文件夹,找到.env文件。修改需要的参数之后保存

pm2 start
cp sendNotify.js /ql/scripts/sendNotify.js

 4.配置仓库

这里我收集到KR的库,你们找自己喜欢的作者就行

修改青龙 config.sh 文件中的GithubProxyUrl参数为:
GithubProxyUrl=""

Github代理站:
https://toolwa.com/github
https://gh.fakev.cn/
https://hub.fastgit.xyz/
https://hub.0z.gs/
没有代理的可以使用上面镜像站

然后拉库命令填写下方代码:

ql repo https://gh.fakev.cn/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"

或者:
ql repo https://hub.fastgit.xyz/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"

国外鸡直接填写下方代码

ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"

拉库建议定时:*/30 * * * *  或者:30 * * * *

PS:
ql repo <repourl> <path> <blacklist> <dependence> <branch>
对应意思“库地址”“拉哪些”“不拉哪些”“依赖文件”“分支”

出现拉库卡更新的解决方案:进入容器文件夹后点击repo文件夹删除整个库文件后重新拉库即可。

5.安装依赖

这里我用的是faker大佬的一键

docker exec -it qinglong bash
curl -fsSL https://ghproxy.com/https://raw.githubusercontent.com/shufflewzc/QLDependency/main/Shell/QLOneKeyDependency.sh | sh

到这里就安装完毕了

 

 

 

 

 类似资料: