分类 linux 下的文章

注意 ,这会直接更改 源文件:请自己谨慎运行:

替换阿里云的源为 ECS 源

sed -i 's/https:\/\/mirrors.aliyun.com/http:\/\/mirrors.cloud.aliyuncs.com/g' /etc/apt/sources.list

反向操作 -> 替换 ECS 源 为 阿里云公共源

sed -i 's/http:\/\/mirrors.cloud.aliyuncs.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list

文件下载地址:
任意一个都可以

您可以按以下步骤注册此带参命令为服务:

  1. 打开 PowerShell,以管理员身份运行。
  2. 运行以下命令来注册服务:

    `New-Service -Name Cloudflared -BinaryPathName "C:\路径\到\Cloudflared.exe proxy-dns --port 5553" -DisplayName "Cloudflared DNS Proxy" -Description "Cloudflare DNS over HTTPS Proxy"` 

    将 "C:路径到Cloudflared.exe" 替换为您的 Cloudflared 可执行文件的路径。

  3. 运行以下命令来启动服务:

    `Start-Service Cloudflared` 

    服务现在正在以带参形式运行,并且将在 Windows 启动时自动启动。

[d] – The file type, which can be ‘d’ for a directory, ‘-’ for a file, or ‘l’ for a link
[rwx] – The first grouping of three that sets permissions for an individual user.
[rwx] – The second grouping of three that sets permissions for a group.
[rwx] – The final grouping of three that sets permissions for other users.

Node Exporter 默认使用端口 9100。如果端口 9100 已被服务器上的另一个程序使用,您可能需要为 Node Exporter 使用另一个端口。在 OVH VPS 上,noderig在端口 9100 中运行,并且 Node Exporter 无法启动。为了解决这个问题,我不得不在不同的端口上运行 Node Exporter。

- 阅读剩余部分 -