赚钱宝3代&玩客云&网心云 安装armbian docker 宝塔 青龙 openwrt 您所在的位置:网站首页 n1刷armbian安装宝塔 赚钱宝3代&玩客云&网心云 安装armbian docker 宝塔 青龙 openwrt

赚钱宝3代&玩客云&网心云 安装armbian docker 宝塔 青龙 openwrt

2024-07-14 00:13| 来源: 网络整理| 查看: 265

赚钱宝3代&玩客云&网心云 安装armbian docker 宝塔 青龙 openwrt ​

首先感谢 right 的小或,基本是按照这个流程来,但是中途我也遇到了很多问题,都是通过百度来解决的,这个帖子也是为了自己记录自己N多的过程编写。大家看看就好,如果有补充可以评论谢谢。

一、开始制作armbian

一、使用Aml Burn Tool软件烧录首选底包至固件。烧录完成后断开玩客云电源备用。(短路什么的其它教程很多我就不写了) 靠近hdmi的那个USB口 二、使用USBWriter软件将emmc底包或者5.88刷机包固件写入U盘。写入成功后,先将U盘插入玩客云靠近网线接口端的USB口,再接入电源。 玩客云通电后指示灯会先亮绿灯,再亮蓝灯,红蓝闪烁,最后蓝灯常亮。等到确定蓝灯常亮后,再拔掉U盘、电源。重要步骤!!!!!!最好蓝灯常亮后,启动一次玩客云,看看ssh是否正常 三、使用USBWriter写入armbian5.90固件。写入固件成功后,再次插入U盘至靠近网线一端的USB口,U盘插入后连接玩客云电源,及其网线。这时亮蓝灯 没什么反应直接等待十分钟后,(如果U盘读写慢的 建议等久一点),打开局域网查看工具找到玩客云IP。或路由器里面找名称以 aml 开头设备的局域网ip。(注意不要断电不要拔U盘)

使用PuTTY 或命令行,ssh连接至之前获取得局域网ip;(Ps:我刚开始用的FinalShell 老是一连接断开,如果有出现使用PuTTY 连接) 用户:root ;密码: 1234;(提示改密码改一下密码)此固件默认不会刷入 eMMC,如需刷入eMMC请执行命令: cd /boot/install/ sudo ./install.sh

完成后 就装好了 armbian5.9

二、 装docker

1.更换更新源。

nano /etc/apt/sources.list deb https://mirrors.ustc.edu.cn/debian buster main contrib non-free deb https://mirrors.ustc.edu.cn/debian buster-updates main contrib non-free deb https://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security buster/updates main contribnon-free

Ctrl+O保存,Ctrl+X退出。 原始源(备用)

deb http://mirrors.tuna.tsinghua.edu.cn/debian buster main contrib non-free #deb-src http://mirrors.tuna.tsinghua.edu.cn/debian buster main contrib non-free deb http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates main contrib non-free #deb-src http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates main contrib non-free deb http://mirrors.tuna.tsinghua.edu.cn/debian buster-backports main contrib non-free #deb-src http://mirrors.tuna.tsinghua.edu.cn/debian buster-backports main contrib non-free deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free #deb-src http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free

(ps,如果这步操作不好就用FinalShell,登陆后有文件管理功能可以像记事本一样改目录 /etc/apt/sources.list )

2.更新

sudo apt-get update --allow-releaseinfo-change sudo apt-get upgrade

3.使用docker安装脚本

curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh --mirror Aliyun

4.装可视面板

docker run --restart always --name fast -p 8081:8081 -d -v /var/run/docker.sock:/var/run/docker.sock wangbinxingkong/fast

2、安装完成后在浏览器访问 http://服务器IP地址或域名:8081 。 3、首次登录需要注册,注册成功后即可正常使用。

固件链接:https://cloud.189.cn/t/zuyMNn2Ubqa2 (访问码:1c15)

三、装宝塔

1.拉取镜像

docker pull centos:centos7

2.创建容器

docker run -tid --name baota -p 80:80 -p 8888:8888 --restart always centos:centos7

(ps :需要开放的端口自行拉回 -p 80:80 --name=OneCloud 其中OneCloud是容器名称,可以更改成你想要的,容器名称注意不要和其他容器一样,会冲突) 3.进入容器

docker exec -it baota /bin/bash

4.装宝塔

yum install -y wget && wget -O install.sh https://download.bt.cn/install/install.sh && sh install.sh 四、装青龙 (ssh里面执行)

1.拉取镜像

docker pull whyour/qinglong:2.10.13

(青龙2.11.1后面的版本中某BUG影响到了32位arm,这里推荐旧版本2.10.13)

2.创建容器

docker run -tid --name qinglong -p 5700:5700 --restart always whyour/qinglong:2.10.13

然后就可以通过http://ip:5700访问面板了 (如果打不开白屏就百度搜索 青龙面板白屏教程,简单的说就是cdn被墙了 )

docker exec -it qinglong bash cp dist/index.html dist/index.html.bak sed -i "s/cdn.jsdelivr.net/cdn.ravi.cool/g" /ql/dist/index.html sed -i "s/darkreader.min.js/darkreader.js/g" /ql/dist/index.html sed -i "s/codemirror.min.js/codemirror.js/g" /ql/dist/index.html

默认账号:admin 密码:admin

五、装openwrt(ssh里面执行)(未能成功安装)

1.拉取镜像

docker pull virking/openwrt:20.04

2。创建容器

docker run -tid --name openwrt -p 81:81 --restart always virking/openwrt:20.04

启动成功后使用IP访问即可 密码是 password (ps :需要开放的端口自行设置 -p 81:81 --name=OneCloud 其中OneCloud是容器名称,可以更改成你想要的,容器名称注意不要和其他容器一样,会冲突)

六、装openwrt 20.04

docker装openwrt的教程(安装成功) 更新软件(非必要)

apt-get update && apt-get upgrade

打开网卡混杂模式

ip link set eth0 promisc on

创建网络

docker network create -d macvlan --subnet=192.168.2.0/24 --gateway=192.168.2.1 -o parent=eth0 macnet

[↑自己根据 玩客云 所在网段修改,如:玩客云IP:192.168.2.175,则192.168.1.0/24 改成 192.168.2.0/24,192.168.1.1改成主路由地址] 拉取 OpenWRT 镜像

docker pull virking/openwrt:20.04

创建容器

docker run -itd --name=OneCloud --restart=always --network=macnet --privileged=true virking/openwrt:20.04 /sbin/init

–name=OneCloud 其中OneCloud是容器名称,可以更改成你想要的,容器名称注意不要和其他容器一样,会冲突 根据主路由 DHCP 分配里找到一个主机名叫 OpenWRT 的,复制它的IPv4 地址粘贴到浏览器就能进入 OpenWRT 了 密码是 password

七、openwrt huilibing/OneCloud (安装成功)

原地址

固件包含的插件 ┌ Hello World [ 支持多种主流协议和多种自定义视频分流服务,并直观的显示节点信息 ] ├ Openclash [ 根据灵活的规则配置实现策略代理 ] ├ DNSFilter [ 支持 AdGuardHome/Host/DNSMASQ/Domain 规则, 对广告进行过滤 ] ├ KMS Activator [ KMS 激活服务器,可用于激活 Windows 或 Office ] └ NeteaseMusic [ 解锁网易云音乐灰色歌曲 ] 宿主机以及 Docker 相关设置 开启网卡混杂模式 ip link set eth0 promisc on 创建Docker虚拟网络

虚拟网络名称为 macnet,驱动为 macvlan 模式将 subnet 10.10.10.0 修改为你自己主路由的网段将 geteway 10.10.10.1 修改为你自己的主路由网关

docker network create -d macvlan --subnet=10.10.10.0/24 --gateway=10.10.10.1 -o parent=eth0 macnet 拉取镜像配置容器

将–ip 10.10.10.94修改为你自己主路由的网段IP

拉取 OpenWrt 镜像 docker pull w8ves/openwrt:onecloud 启动 OpenWrt 容器 docker run --restart always --name openwrt -d --network macnet --ip 10.10.10.94 --privileged w8ves/openwrt:onecloud /sbin/init 修改容器网络配置 # 查看运行中的容器 docker ps -a # CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES # 0bd53ac6f3e8 w8ves/openwrt "/sbin/init" 9 minutes ago Up 19 minutes openwrt 进入容器命令行 docker exec -it openwrt /bin/bash 修改网络配置 nano /etc/config/network config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' config interface 'lan' option ifname 'eth0' option _orig_ifname 'eth0' option _orig_bridge 'true' option proto 'static' option ipaddr '10.10.10.94' # 填写创建容器时的IP option netmask '255.255.255.0' option gateway '10.10.10.1' # 修改为你自己主路由的IP option dns '10.10.10.1' # DNS 可填主路由IP 也可填公共DNS 重启容器网络服务 /etc/init.d/network restart 下载 Clash内核 wget --no-check-certificate https://github.com/vernesong/OpenClash/releases/download/Clash/clash-linux-armv7.tar.gz

解压到 /etc/openclash/core/文件夹

tar xzf clash-linux-armv7.tar.gz mv clash /etc/openclash/core ll /etc/openclash/core/ 退出容器 exit docker重启后 某些项目无法打开可以根据以下方法重启即可

问题在这: 停掉docker服务的时候 同时也停掉了容器下面的相关软件(php apche nginx mysql等) 所以当然访问不了项目

解决思路: 重启一下这些停掉的软件就可以了

我用的宝塔面板装的docker 又在docker容器里面装的宝塔

所以当我停掉docker的时候连容器的宝塔都停掉了 所以先要重启容器下的宝塔 再到宝塔里面去启动相关的软件

[root@VM-16-15-centos ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b66e4768dd10 centos:7 "/bin/bash" 5 hours ago Up About a minute 0.0.0.0:211->21/tcp, 0.0.0.0:221->22/tcp, 0.0.0.0:801->80/tcp, 0.0.0.0:4431->443/tcp, 0.0.0.0:33061->3306/tcp, 0.0.0.0:8881->8888/tcp docker_test [root@VM-16-15-centos ~]# sudo docker exec b66e4768dd10 /etc/init.d/bt start Starting Bt-Panel.... done Starting Bt-Tasks... done [root@VM-16-15-centos ~]#

sudo docker exec 你的容器ID /etc/init.d/bt start

以上命令就已经重启了容器下面的宝塔 可以去登录宝塔 打开软件了

一个个打开就可以正常访问到项目了

当然你没用宝塔 或者不用想用宝塔 也可以直接在宿主机上直接输入命令重启这些软件是一样的 只要能启动这些服务就行

sudo docker exec 567cb5e101d4 /etc/init.d/bt start && sudo docker exec b66e4768dd10 /etc/init.d/httpd start && sudo docker exec b66e4768dd10 /etc/init.d/php-fpm-74 start && sudo docker exec b66e4768dd10 /etc/init.d/mysqld start

需要重启那些软件就在宿主机上运行相对应的代码就行

[root@VM-16-15-centos ~]# sudo docker exec b66e4768dd10 /etc/init.d/httpd start && sudo docker exec b66e4768dd10 /etc/init.d/php-fpm-74 start && sudo docker exec b66e4768dd10 /etc/init.d/mysqld start start apache... done Starting php-fpm [07-Jul-2022 16:49:55] ERROR: Another FPM instance seems to already listen on /tmp/php-cgi-74.sock [07-Jul-2022 16:49:55] ERROR: FPM initialization failed failed [root@VM-16-15-centos ~]# sudo docker exec b66e4768dd10 /etc/init.d/mysqld startStarting MySQL SUCCESS! [root@VM-16-15-centos ~]#


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有