把 makepkg 的下载器从 curl 换成了 aria2c
今天才知道,原来 archlinux 的 makepkg 可以更换下载器啊。
按照 arch 官方文档的说明,修改一下 /etc/makepkg.conf
的 DLAGENTS
变量。
1 | DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u' |
然后以后再用 makepkg 的时候,就能体验到 aria2 优秀的下载体验了。
今天才知道,原来 archlinux 的 makepkg 可以更换下载器啊。
按照 arch 官方文档的说明,修改一下 /etc/makepkg.conf
的 DLAGENTS
变量。
1 | DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u' |
然后以后再用 makepkg 的时候,就能体验到 aria2 优秀的下载体验了。
解决 Bad SMB2 (sign_algo_id=0) signature for message 问题
最近线下培训教育机构都停了,孩子报的班都改为了线上授课,教练和老师会把视频发过来,看着学。
由于手机屏幕太小,所以打算把视频放到家里的服务器上,通过 samba 共享让投影可以读取。
但是却遇到不能连接的问题,看了下服务器的日志,发现有报错:
1 | [2022/03/23 00:57:09.728871, 0] ../../libcli/smb/smb2_signing.c:722(smb2_signing_check_pdu) |
搜索了一下,似乎只有一个方案,就是降级协议,在 /etc/samba/smb.conf
文件的 [global]
中增加下面的配置:
1 | server min protocol = LANMAN2 |
重启服务, systemctl restart smb
。
再次连接,成功!
在 /etc/mdadm/mdadm.conf
中,找到 MAILADDR
配置,修改为你要接收邮件的地址即可。
修改完,可以执行 mdadm --monitor --scan --test -1
来测试一下是否能够收到测试邮件。
不过我发现一个问题,就是在执行 /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
这个重新生成 mdadm 配置文件的命令后,MAILADDR
会被重置为 root
。
于是使用了另外一个方案来配置接收邮箱。
打开 /etc/aliases
文件,增加下面一行
1 | root: [email protected], /root/mailbox |
保存之后,执行 newaliases
使配置生效。这样发送给 root 用户的邮件,会被转发到你指定的邮箱了。
First run
1 | sudo dpkg-reconfigure exim4-config |
and use these config options:
Then run sudo vi /etc/exim4/passwd.client
and add the following lines for your mail host, and any aliases it has (found through nslookup
). Substitute email address
and password
with the account you want to route mail through):
1 | mail.example.com:email address:password |
Once you edit the passwd.client
file, run sudo update-exim4.conf
which will integrate your changes into your Exim4 config.
Run sudo systemctl restart exim4
and make sure that the service stops and starts properly. If the service is unable to restart, something probably went wrong when you edited the passwd.client
file.
Now the configure has been finished.
We can use exim -v [email protected]
to get in send process to send a test email.
这两周一直在折腾新买的这台二手 r730xd。第一次上电的时候,风墙的6个18000转风扇的满速运行的噪音太感人了。让我想起来当年在机房跟同事维护机器的时候,说话完全靠喊的记忆。
既然风扇转速高,就去看看主板bios里有没有设置,结果看了半天,从bios到dell服务器的idrac,就没有找到可以手动设置风扇转速的地方。
我当时也是傻,没有放狗搜索一下,就直接准备干静音风扇了。。。
淘宝和闲鱼搜索了好几圈,都没有服务器用的 606038 风扇的接口。
最后随机在一家店里买了一个5000转的,准备自己动手改一下。
最后用杜邦线的塑料胶头改装成功了,上电测试没有问题。赶紧下单买剩下的5个。
第一周就这么过去了。
等待了五天,另外5个风扇到了,花了3个小时完成改装,改装后的风墙这个样子:
最近我的 Chromebook 无法访问 websocket 资源,这让人很烦恼。
查来查去,最后发现国外一篇文章提到,如果全局代理中勾选了“对所有协议使用同一代理”,就会出现这个问题。这是由于 websocket 会使用 socks 代理作为通讯方法,
我之前都是分着设置,前几天测试个东西,找省劲,勾选了“对所有协议使用同一代理”,而我的 socks 代理端口和 http 代理端口其实不是同一个,才导致现在访问所有 websocket 资源不成功。
This is one line command to install docker on Debian 10/11.
1 | apt-get install -y \ |
This command line has been verified on Debian 10/11.
This will speed up deploying a fresh vps process. That is why I write all command in one line.
ChromeOS 内置 Debian buster 的 Linux 系统
修改国内源, /etc/apt/sources.list
1 | deb http://mirrors.163.com/debian/ buster main non-free contrib |
安装 Docker
1 | sudo apt-get update -y |
修改 Docker 日志量
1 | # /etc/docker/daemon.json |
1 | sudo systemctl restart docker |
/etc/network/interfaces
文件
1 | auto lo |
重启网络 sudo systemctl restart networking
1 | %sudo ALL=(ALL) NOPASSWD: ALL |
This is one line command to install docker on Ubuntu 20.04.
1 | apt update -y && \ |
This command line has been verified on Ubuntu20.04.
This will speed up deploying a fresh vps process. That is why I write all command in one line.
In some cases, we need to pull some docker image through our custom proxy server.
But the HTTPS_PROXY
and HTTP_PROXY
in current login terminal will not be useful for the docker pull
command.
The proxychains-ng
tool is the same situation.
This is because docker is divided into dockerd
and client
. The docker pull
command is executed by dockerd
service. So we need make sure dockerd
use proxy server.
The Docker daemon uses the HTTP_PROXY
, HTTPS_PROXY
, and NO_PROXY
environmental variables in its start-up environment to configure HTTP or HTTPS proxy behavior. You cannot configure these environment variables using the daemon.json
file.
So we can edit the systemd service file.
1.First create a new folder
1 | $ sudo mkdir -p /etc/systemd/system/docker.service.d |
2.Then create a new file named /etc/systemd/system/docker.service.d/http-proxy.conf
1 | [Service] |