debian 国内源内源
命令:nano /etc/apt/sources.list
11 bullseye
deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
12 bookworm
deb https://mirrors.aliyun.com/debian/ bookworm main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free contrib
/etc/apt/sources.list.d/firmware.list
deb http://mirrors.163.com/debian/ bookworm main non-free-firmware
deb-src http://mirrors.163.com/debian/ bookworm main non-free-firmware
deb http://mirrors.163.com/debian/ bookworm-updates main non-free-firmware
deb-src http://mirrors.163.com/debian/ bookworm-updates main non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware
更新
apt-get update & apt-get upgrade
安装软件VIM CURL
apt-get install vim -y
apt-get install curl -y
apt-get install hdparm -y
apt-get install avahi-daemon -y
开启root登录
vim /etc/ssh/sshd_config
PermitRootLogin yes
systemctl restart sshd.service
升级内核
apt search linux-image-generic
apt install linux-image-6.2.0-25-generic
apt install linux-headers-6.1.0-16-amd64
update-grub
Intel 更新微码
apt-get install intel-microcode
casaos
wget -qO- https://get.casaos.io | bash
核显监控
apt-get install intel-gpu-tools -y
intel_gpu_abrt intel_gpu_time intel_gpu_top
查看错误 :dmesg -l err
Intel 核显接管
加入i915 固件 linux-firmware(kernel/git/firmware/linux-firmware.git - Repository of firmware blobs for use with the Linux kernel)
/etc/default/grub
update-grub2
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on i915.enable_guc=3 quiet"
docker emby 加入设备/dev/dri
修复电源
apt-get install laptop-mode-tools -y
vim /etc/laptop-mode/laptop-mode.conf
ENABLE_LAPTOP_MODE_ON_AC=1
sudo laptop_mode start force
docker设置代理
/usr/lib/systemd/system/docker.service
[Service] 下面加入
Environment=HTTP_PROXY=http://192.168.31.115:7890/
Environment=HTTPS_PROXY=http://192.168.31.115:7890/
systemctl daemon-reload && systemctl restart docker
终端临时代理
export http_proxy=http://192.168.31.115:7890
export https_proxy=http://192.168.31.115:7890
取消
unset http_proxy
unset https_proxy
验证
echo $http_proxy
Cockpit KVM安装与设置
安装KVM
apt update
apt install -y qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager
systemctl status libvirtd //验证如果不启动就重启
systemctl enable --now libvirtd
lsmod | grep -i kvm
modprobe vhost_net //加入vhost_net
lsmod | grep vhost
创建br网桥
vim /etc/network/interfaces
# Primary network interface
改成自己的网卡通过 ip a获取
auto ens18
iface ens18 inet manual
# Bridge definitions
auto br0
iface br0 inet static
bridge_ports ens18
bridge_stp off
address 192.168.1.2
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 172.20.30.252 172.20.30.251
systemctl restart networking.service //重启网络
安装Cockpit
apt install cockpit cockpit-machines cockpit-podman
systemctl enable cockpit.socket && systemctl start cockpit.socket
去除root屏蔽登录
vim /etc/cockpit/disallowed-users
去除https重定向
vim /etc/cockpit/cockpit.conf
[WebService]
AllowUnencrypted = true
KVM读取U盘或者写入U盘数据无权限
挂载 自定义挂载选项 defaults,umask=000
/etc/libvirt //kvm配置文件
/usr/share/qemu
网友评论