甲骨文ARM DD Debian10 开IPv6 升内核 安装宝塔 配置WARP

佚名 2021-6-3 1,552 6/3

[v_blue]以下操作皆在Root权限下进行,并且实例为 ubuntu 20.4,非 mini 版;
普通用户可以通过”sudo -i“命令切换为Root。[/v_blue]

安装 Debian 10

来自:https://github.com/bohanyang/debi

安装依赖

apt-get update -y && apt-get install -y xz-utils openssl gawk file wget screen && screen -S os
下载脚本
curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh && chmod a+rx debi.sh
运行脚本(以下命令选项开启了 BBR;设置了网卡名称形式是 eth0 而不是 ens3 这种;如果不是 ARM 架构,还可以添加 --cloud-kernel 使用轻量版内核;mjj@123为默认密码可以修改
./debi.sh --cdn --network-console --ethx --bbr --user root --password mjj@123
没有报错重启等待10分钟以后再连接(如果提示密码不对就是没有DD完,等就行。)
shutdown -r now

自动获取 IPv6

新建 interfaces 配置文件

vi /etc/systemd/network/10-eth0.network
[Match]
Name = eth0

[Network]
DHCP = ipv4
LinkLocalAddressing = ipv6
NTP = 169.254.169.254

注意要把 eth0 改成实际的网卡名称

接下来禁用默认的 ifupdown 并启用 systemd-networkd。注意下面的命令需要一次过执行,不然网络停掉之后 SSH 也会断线。eth0 要改成实际的网卡名称。

systemctl stop networking && systemctl stop ifup@eth0 && systemctl start systemd-networkd
如果命令执行完后 SSH 正常连线,说明新的网络配置成功了。卸载 ifupdown 并设置 systemd-networkd 开机启动就好了。
systemctl enable systemd-networkd
apt purge -y --auto-remove ifupdown isc-dhcp-client
其实 Ubuntu 18.04/20.04 默认使用的网络配置系统 netplan 的后端就是 systemd-networkd,其实是参考了 Ubuntu 系统模板的配置。

更新内核至5.10

安装依赖
apt-get update && apt-get install -y lsb-release && apt-get clean all && apt update

安装内核

apt -t $(lsb_release -sc)-backports install linux-image-$(dpkg --print-architecture) linux-headers-$(dpkg --print-architecture) -y

重启系统

reboot

检查内核

uname -r

没问题的话可以卸载老内核(洁癖可选项)

dpkg -l|grep linux-image | awk '{print $2}'

apt remove --purge linux-image-4.19.0-16-arm64

update-grub2
reboot

安装宝塔

#首先运行官方脚本安装最新版Debian宝塔:

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

#等待大概5-10分钟安装后运行命令清除手机号绑定框:

sed -i "s|if (bind_user == 'True') {|if (bind_user == 'REMOVED') {|g" /www/server/panel/BTPanel/static/js/index.js

部署WARP(升级完内核再操作!)

apt update && apt install curl lsb-release -y && echo "deb http://deb.debian.org/debian $(lsb_release -sc)-backports main" | tee /etc/apt/sources.list.d/backports.list && apt update && apt install net-tools iproute2 openresolv dnsutils -y && apt install wireguard-tools --no-install-recommends && curl -fsSL git.io/wgcf.sh | bash && wgcf register && wgcf generate && sed -i '/0.0.0.0/d' ./wgcf-profile.conf  && sed -i 's/engage.cloudflareclient.com/162.159.192.1/g' ./wgcf-profile.conf && sed -i 's/1.1.1.1/168.126.63.2,8.8.8.8,208.67.222.222/g' ./wgcf-profile.conf && cp wgcf-profile.conf /etc/wireguard/wgcf.conf && systemctl start wg-quick@wgcf && systemctl enable wg-quick@wgcf && grep -qE '^[ ]*label[ ]*2002::/16[ ]*2' /etc/gai.conf || echo 'label 2002::/16   2' | tee -a /etc/gai.conf

检测IPv6解锁

apt install -y curl jq && bash <(curl -sSL https://raw.githubusercontent.com/Netflixxp/NF/main/nf.sh)
- THE END -

佚名

7月11日16:53

最后修改:2021年7月11日
0

共有 0 条评论