duzhuo's-blog

学无止境

当前环境

  • Linux armbian 5.15.139-ophub #1 SMP PREEMPT Mon Nov 20 22:33:18 EST 2023 aarch64 aarch64 aarch64 GNU/Linux
  • 使用的软件源 Ubuntu Ports 23.04 luner

问题详情

root@armbian:/etc/wireguard# sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.0.8.9/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a wg0 -m 0 -x
/usr/bin/wg-quick: line 32: resolvconf: command not found
[#] ip link delete dev wg0

解决步骤

问题是由无法调用 resolvconf命令产生的 我们通过直接安装来解决 不同发行版的软件包可能不同

root@armbian:/etc/wireguard# sudo apt install openresolv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package openresolv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'openresolv' has no installation candidate
root@armbian:/etc/wireguard# resolvconf
Command 'resolvconf' not found, but can be installed with:
apt install systemd-resolved
root@armbian:/etc/wireguard# apt install systemd-resolved

...succeed

root@armbian:/etc/wireguard# systemctl start wg-quick@wg0

问题复现

使用 hostnamectl hostname 命令更改 hostname 之后使用 sudo 后出现报错 sudo: unable to resolve host cloudcone: Name or service not known

解决方案

修改 /etc/hosts 文件 添加 127.0.0.1 cloudcone ::1 cloudcone cloudcone 是我设置的新 hostname

27.0.0.1       localhost
127.0.0.1       cloudcone

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
::1     cloudcone
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Screenshot_20231106_125230.png

问题发现

使用 tabby 官方提供的 Debian repo 时 发现识别系统为 Kylin 导致无法使用脚本添加 repo

查看脚本信息发现检测的文件为 /etc/lsb-release

Screenshot_20231106_094050.png

解决办法

一番检索后找到了这个帖子 https://v2ex.com/t/906470 发现应该是优麒麟版微信在 /etc 里面拉屎 张小龙你吗死了

添加 repo 的脚本内容先检测是否存在 /etc/lsb-release 再查看二进制文件 lsb_release 所以识别到的系统是 Kylin

Screenshot_20231106_104227.png

查看原版 Debian 使用的的是 lsb_release 所以我们可以直接删除 /etc/lsb-release 这个文件 或者手动修改 /etc/lsb-release

DISTRIB_ID=Debian
DISTRIB_RELEASE=n/a
DISTRIB_CODENAME=trixie
DISTRIB_DESCRIPTION="Debian GNU/Linux trixie/sid"
阅读全文 »

查看当前无线网卡并启用

sudo iwconfig 查看得到我当前的无线网卡名称是 wlan0

Screenshot_20231030_170101.png

sudo ifconfig wlan0 up 启用无线网卡

Screenshot_20231030_171338_看图王1.png

扫描可用网络

sudo iwlist wlan0 scan 查找当前可用网络 结果过多的情况下使用 grep 找出 SSID

Screenshot_20231030_171426_看图王.png

使用 wpa_supplicant 连接网络

sudo wpa_passphrase {SSID} {PASSWD} > sudo /etc/wpa_supplicant/{SSID}.conf

阅读全文 »

version: '3'

networks:
  mysql-phpmyadmin:
    name: mysql-phpmyadmin
    driver: bridge

volumes:
  mysqldata:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/home/duzhuo/docker/mysql/data'

services:
  mysql:
    image: mysql
    container_name: mysql
    environment:
      MYSQL_ROOT_PASSWORD: 123456
      MYSQL_DATABASE: database
      MYSQL_USER: duzhuo
      MYSQL_PASSWORD: 123456
    ports:
      - "33060:3306"
    volumes:
      - mysqldata:/var/lib/mysql
    networks:
      # Connect the mysql container to the mysql-phpmyadmin network and set the alias as mysql
      mysql-phpmyadmin:
        aliases:
          - mysql

  phpmyadmin:
    image: phpmyadmin
    container_name: phpmyadmin
    links:
      - mysql
    environment:
      PMA_HOST: mysql
      PMA_PORT: 3306
    ports:
      - 8081:80
    networks:
      # Connect the phpmyadmin container to the mysql-phpmyadmin network and set the alias as phpmyadmin
      mysql-phpmyadmin:
        aliases:
          - phpmyadmin

镜像与电脑型号

安装镜像 : debian-12.1.0-amd64-DVD-1.iso

目前更新为 testing

笔记本 : acer SF314-512-52TY

hw-probe : link

Screenshot_20230812_203700.png

问题

  1. 摄像头不工作
  2. 指纹不工作
  3. 无法查看风扇转速 ( Windows下一样 )

Hello guys,
We would like to inform you that we have decided to shut down our site.
The past 2 years have been very difficult for us - some of the people in our team died due to covid complications,
others still suffer the side effects of it - not being able to work at all.
Some are also fighting the war in Europe - ON BOTH SIDES.
Also, the power price increase in data centers in Europe hit us pretty hard.
Inflation makes our daily expenses impossible to bare.
Therefore we can no longer run this site without massive expenses that we can no longer cover out of pocket.
After an unanimous vote we’ve decided that we can no longer do it.
We are sorry :(
Bye

妈的 我用 AdBlock 把 RARBG 的广告屏蔽了 我真是个畜生 😭

Peace. 🥀

升级 wsl

  • 注意开启 windows update
  • wsl --update
  • wsl --version
    WSL version: 1.1.3.0
    Kernel version: 5.15.90.1
    WSLg version: 1.0.49
    MSRDC version: 1.2.3770
    Direct3D version: 1.608.2-61064218
    DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
    Windows version: 10.0.22621.525

开启 Systemd support

  • sudo nano /etc/wsl.conf

    [boot]
    systemd=true
  • ^O + ^X

  • wsl --shutdown

Enjoy !

环境

  • v2rayn version 5.39
  • wsl2 + Debian

v2rayN 设置局域网 socks5 / http proxy

  • core:基础设置中勾选允许来自局域网的连接和开启 Mux 多路复用 ( 推荐设置认证密码 )
  • 在选择节点窗口下方查看共享给局域网的端口

查看宿主机的 ip 和 wsl 的 ip

  • 获取宿主机 ip cat /etc/resolv.conf

  • 同时添加代理到 /etc/environment ~/.profile

    也可以添加到 ~/.bashrc ~/.zshrc

### http代理

export windows_host=`cat /etc/resolv.conf|grep nameserver|awk '{print $2}'`
export ALL_PROXY=socks5://{username}:{passwd}@$windows_host:{port}
export HTTP_PROXY=$ALL_PROXY
export http_proxy=$ALL_PROXY
export HTTPS_PROXY=$ALL_PROXY
export https_proxy=$ALL_PROXY
export no_proxy=127.0.0.1,.devops.com,localhost,local,.local,172.28.0.0/16

if [ "`git config --global --get proxy.https`" != "socks5://{username}:{passwd}@$windows_host:{port}" ]; then
            git config --global proxy.https socks5://{username}:{passwd}@$windows_host:{port}
fi
  • source /etc/environment&&source ~/.profile

测试连接

  • wget google.com

  • curl google.com

  • 有返回值说明正常

阅读全文 »
0%