Your cart is currently empty!
Category: VPS
-
在 Debian 系统中开启自动安全更新(Auto Patching)
在 Ubuntu 系统中,很多人习惯使用 Ubuntu Pro 或 Livepatch 来获得自动安全更新。但在 Debian 系统里,并没有完全一样的官方服务。不过,Debian 提供了一个非常成熟的工具 —— unattended-upgrades,可以帮助我们实现类似的功能:自动安装安全补丁,减少手动维护的工作量。
下面就带大家一步一步开启 Debian 的自动安全更新。
一、为什么要启用自动更新?
- 提高安全性:Debian 的安全团队会不断发布安全补丁,修复漏洞。如果不及时更新,系统可能暴露在攻击风险中。
- 降低维护成本:自动下载并安装更新,管理员无需每天手动运行 apt upgrade。
- 稳定性可控:通过配置,可以只允许「安全更新」自动安装,避免大版本升级导致兼容性问题。
二、安装必要的组件
Debian 默认自带 unattended-upgrades 包,如果没有,可以手动安装:
sudo apt update sudo apt install unattended-upgrades apt-listchanges
- unattended-upgrades:负责自动下载和安装更新
- apt-listchanges:在更新前显示 changelog(可选)
三、启用自动更新
运行配置命令:
sudo dpkg-reconfigure unattended-upgrades
选择 Yes 之后,系统会自动在 /etc/apt/apt.conf.d/20auto-upgrades 中写入默认配置,例如:APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "7"; APT::Periodic::Unattended-Upgrade "1";
这里的数字代表天数:
- 1 = 每天
- 7 = 每周一次
-
Keeping FRP Up to Date with a One-Line Script
If you run reverse proxies or tunneling setups on your homelab or servers, chances are you’ve come across FRP (Fast Reverse Proxy). It’s an open-source project that makes it easy to expose services behind NAT/firewalls via a client (frpc
) and a server (frps
).
The project is very active, and new releases roll out often. But keeping your binaries (/usr/local/bin/frps
,/usr/local/bin/frpc
) updated across multiple servers can be a hassle — especially if you’re running them under systemd instances like[email protected]
,[email protected]
, etc.To solve that, here’s a simple script you can drop into
/usr/local/bin/frp-update
. It will:- Check the latest release on GitHub
- Compare against your currently installed version (
frpc
first, thenfrps
) - Download and install the new binaries if needed
- Leave your running services untouched (you can restart them manually when ready)
-
Safely upgrade from Debian 9 to Debian 10
It is jarring when you come across VPS providers in mid-2020 and they only provide up to Debian 9 (or Debian 8) for the OS image. Fortunately, it can be easily upgraded via a few commands, as depicted in this article.
(more…) -
BuyVM/FranTech Ryzen VPS and Storage Slab review
While AMD has made quite a comeback on the desktop front with each successful iteration of their Ryzen CPUs based on the Zen architecture, things on the server side is not as rosy, as the market is still largely dominated by Intel. For the longest time I have always wanted a Ryzen-based VPS, because I know how awesome they will be. The hunt ended when I came across BuyVM aka Frantech.
-
LiteUnit LLC KVM-512 VPS Review
[Update Aug 2020] My VPS has been offline since the end of June and support tickets are no longer answered since.
LiteUnit LLC is a Russia-based hosting company that is currently offering VPS hosted in Novosibirsk, a place where it is often more affectionately known as “New Siberia”. It has nothing to do with the Moscow image featured in this article (in fact, the two cities are more than 3,300km apart), but I figure everybody loves a good cliché at the end of the day.
-
RESUME variable error during system updates
Assuming you had or have been using Linux VPS from second or third-tier vendors, you would have come across the following error message at some point:
W: initramfs-tools configuration sets RESUME=/dev/sda2 W: but no matching swap device is available. I: The initramfs will attempt to resume from /dev/vda2 I: (UUID=03bd7930-a963-4fa7-9db2-8c30eca1ea58) I: Set the RESUME variable to override this.
-
Installing the latest version of Aria2 in Ubuntu 18.04 LTS
Aria2 is a headless (command-line based) multi-protocol downloader. It supports the downloading of HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink resources. Many frontends exist for Aria2, they are available either as standalone apps, or browser extensions.
Technically Aria2 can function by itself, but I don’t consider its command-line functionalities to be usable for most. Thanks to its frontend-backend separation architecture, Aria2 can easily be deployed on headless servers, such as a VPS, where you can remotely push download tasks to the backend server. Since the actual download takes place on on the backend server and not your frontend device, you don’t have to worry about leaving your devices on or preventing it from entering sleep/suspend states.
-
Azure 乞丐版 B1ls 的正确食用姿势 —— 压榨极致性能
最近与几个大佬闲聊之际,发现很多人都在不约而同地吐槽 Azure 的效能。综合的来的意见不外乎是云盘 I/O 过慢(HDD/SDD 一样卡)、主机响应迟钝没反应、运行更新耗时大半天,期间 CPU 效能满载或时处于半宕机状态等等糟心体验,还贵。贵,是毋庸置疑的,毕竟产品品牌定位就是高端货,不可能做到灵车的价格。但我想说的是很多时候产品本身并无问题,只是食用姿势不对。
(more…) -
Adding Swap Space in Linux
Swap in Linux is the equivalent of virtual memory in Windows – a space on a disk that is used when the system runs out of RAM. For some reason unknown, many cloud instances are deployed without any swap.
(more…)