raspberry pi networking to systemd-networkd

raspberry pi networking to systemd-networkd https://raspberrypi.stackexchange.com/questions/78787/howto-migrate-from-networking-to-systemd-networkd-with-dynamic-failover 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 vim /etc/resolvconf.conf # Set to NO to disable resolvconf from running any subscribers. Defaults to YES. resolvconf=NO systemctl disable networking systemctl disable dhcpcd systemctl enable systemd-networkd systemctl enable systemd-resolved ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf vim /etc/systemd/network/eth0.network [Match] Name=eth0 [Network] DHCP=yes apt install deborphan apt --autoremove purge openresolv apt --autoremove purge ifupdown apt --autoremove purge dhcpcd5 apt --autoremove purge isc-dhcp-client isc-dhcp-common apt --autoremove purge $(deborphan) apt --autoremove purge $(deborphan) #two times

VIM 列编辑

VIM 列编辑 VIM的列编辑操作 插入列 插入操作的话知识稍有区别。例如我们在每一行前都插入”() " 光标定位到要操作的地方。 CTRL+v 进入&quo

raspberry pi disable ipv6

raspberry pi disable ipv6 1 2 3 4 5 /etc/modprobe.d/ipv6.conf alias net-pf-10 off alias ipv6 off options ipv6 disable_ipv6=1 blacklist ipv6 Disable IPv6 on Raspberry Pi3+ https://www.cesareriva.com/disable-ipv6-on-raspberry-pi3/embed/#?secret=RVErZNYd3W

/etc/passwd, /etc/shadow

/etc/passwd, /etc/shadow https://blog.csdn.net/u012501054/article/details/71522278 Linux系统中,所有用户 (包括系统管理员) 的账号和密码都可以在/etc/passwd和/etc/shadow这两个文件中找到, (用户

raspberry pi 3B disable ipv6

‘raspberry pi 3B disable ipv6’ Add ipv6.disable=1 to /boot/cmdline.txt cat /etc/modprobe.d/ipv6.conf Don’t load ipv6 by default alias net-pf-10 off uncommented alias ipv6 off added options ipv6 disable_ipv6=1 this is needed for not loading ipv6 driver blacklist ipv6 https://www.raspberrypi.org/forums/viewtopic.php?t=138899

Containerfile

Containerfile, Dockerfile buildkit 默认会查找当前目录的 Containerfile 或者 Dockerfile 1 2 3 4 5 6 7 8 9 10 11 12 13 14 FROM golang:1.22.0 AS build ENV GO111MODULE on ARG APP_NAME=rssx-api WORKDIR /workdir COPY . . RUN CGO_ENABLED=0 GOOS=linux GOPROXY=https://goproxy.io go build -a -o ${APP_NAME} main.go FROM alpine:3.19.1 AS prod ARG APP_NAME=rssx-api COPY --from=build /workdir/${APP_NAME} /data/${APP_NAME} COPY config.toml config.toml COPY config.toml

Vim 查找, 替换

Vim 查找, 搜索, find 查找 在 normal 模式下按下 / 即可进入查找模式 (向下查找, ? 向上查找), 输入要查找的字符串并按下回车。 Vim 会跳转到第一个匹配。 按下 n 查找

xss, AntiSamy

xss, AntiSamy https://blog.csdn.net/zhujq_icode/article/details/79154063 https://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project https://github.com/GDSSecurity/AntiXSS-for-Java AntiSamy 策略文件 antisamy-tinymce.xml,这种策略只允许传送纯文本到后台 (这样做真的好吗?个人觉得这个规则太过严格) ,并

archlinux vim 剪贴板

archlinux vim 剪贴板 1 2 3 4 5 6 7 sudo pacman -S gvim #复制到系统粘贴板 "+y #从系统粘贴板粘贴 "+p https://blog.csdn.net/dadoneo/article/details/6003415 用vim这么久 了,始终也不知道怎么在vim中使用系统粘贴板,通常要

web应用防火墙(WAF)

web应用防火墙(WAF) Web应用防火墙是集web防护、网页保护、负载均衡、应用交付于一体的web整体安全防护设备的一款产品 。 Web防火墙

antisamy

antisamy https://blog.csdn.net/zhujq_icode/article/details/79154063 策略文件 antisamy-slashdot.xml Slashdot (http://www.slashdot.org/)是一个提供技术新闻的网站,它允许用户用有限的HTML是一个提供技术新闻的

nuc

nuc 英特尔 「NUC」 (Next Unit of Computing) nuc5i5ryh CPU: Intel® Core™ i5-5250U Processor (3M Cache, up to 2.70 GHz) 内存: DDR3L-1333/1600 1.35V SO-DIMM nuc7i5bnk Intel® Core™ i5-7260U Processor (4M Cache, up to 3.40 GHz) nuc8i5bek Intel® Cor

archlinux UEFI

archlinux UEFI 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 # boot with iso-usb ls /sys/firmware/efi dmesg |grep sdx lsblk gdisk /dev/sdx o y n EF00 n w y /dev/sdx1 512M EFI /dev/sdx2 xxxxM ext4 mkfs.vfat /dev/sdx1 mkfs.

docker install

docker install ubuntu 1 2 # apt 从仓库里安装, 落后两个小版本, 也算比较新了, 建议从官方源安装 sudo apt install docker.io curl, 配置官方源, 一般会高几个小版本 https://docs.docker.com/engine/install/ubuntu/ 1 2 3 4 5 6 7 8 9 10 11 12

raspberry pi openvpn docker

raspberry pi openvpn docker 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 export OVPN_DATA="ovpn-data" docker volume create --name $OVPN_DATA # volume默认位置: /var/lib/docker/volumes/ovpn-data # gen config docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm mjenz/rpi-openvpn ovpn_genconfig -u udp://xxx.wiloon.com # init pki docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it mjenz/rpi-openvpn ovpn_initpki

zentao

zentao https://github.com/idoop/zentao https://github.com/iboxpay/ldap 下载iboxpay/ldap 扩展, 作为插件安装。此插件会安装三个文件 /opt/zentao/lib/ldap/ldap.class.php # ldap 配置 /opt/zentao/module/user/ext/config/ldap.php /opt/zentao/module/user/ext/model/ldap.php 参照 https://blog.csdn.net/BigBoySunshine/article/details/80502068 修改 /opt/zentao/module/user/ext/config/ldap.php 1 2 3 4 5 6 7 8 9 $config->ldap->ldap_server $config->ldap->ldap_root_dn $config->ldap->ldap_bind_dn $config->ldap->ldap_bind_passwd /opt/zentao/lib/ldap/ldap.class.php 1 2 3 if ( @ldap_bind(