Anduin Xue

let today = new Beginning();

bash


MySQL allow remote connection (For root and other users)

For all Ensure firewall allows 3306 port: sudo ufw allow 3306 Allow MySQL to bind to all ports: sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf Then set bind-address to 0.0.0.0. bind-address = 0.0.0.0 For root user Log in root locally first: mysql -u root -p Replace the host value. mysql GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'password'; mysql UPDATE mysql.user SET host='%'  …

bash Database Linux Ubuntu Remote Management MySQL

Aiursoft Nextcloud 事故调查、分析与总结

在2022年10月4日早晨10:00 - 12:00,Aiursoft Nextcloud发生了一次重大事故。我们的服务中断了两个小时,并且损失了一些数据。当天的可用性也严重降级。 incident 我们大约花费了两个小时来恢复这些业务和数据。下面是详细流程。 背景 Aiursoft Nextcloud是由Aiursoft运营的一个Nas存储;基于会员邀请制,受邀请的会员可以获得200GB存储空间,并享受To do、Deck、Talk、Notes、Passwords等功能。 Aiursoft Nextcloud运行在Ubuntu系统中。其系统是一个VMware虚拟机,运行于一台VMware ESXI主机上。 Aiursoft Nextcloud本身由Apache承载。并又加了一层Caddy进行反代。Caddy在另一台虚拟机上。 为了能够向公网暴露服务,Aiursoft Nextcloud还 …

bash Linux Backup Nextcloud Disk Incident

If a Ubuntu server should run apt upgrade automatically?

Backgrounds Recently, I have a lot of Linux servers created. Those servers are really a lot that I'm tired upgrading those every day. file And I just keep doing the same thing: Login Run sudo apt update Run sudo apt upgrade -y Run reboot Why upgrade those automatically? Save time. Get security updates as soon as possible. Packages are always very clean and new, so less painful to upgrade in one  …

bash Linux Ubuntu Upgrade Crontab Update

Install Cockpit on Ubuntu 22.04

It's simple. Install First: sudo apt install cockpit -y Authentication Ensure you have a user instead of root is in the sudo group. Please follow the instructions from: Best practice for authentication Fix network issue You may see the following error after installation: packagekit cannot refresh cache whilst offline First go to here: cd /etc/netplan/ Create a new profile: sudo touch /etc/netplan/ …

bash Linux Ubuntu Remote Management Cockpit NetworkManager

Mount Windows SMB folder to Ubuntu

First, install tools: sudo apt install cifs-utils Create a new folder: sudo mkdir /mnt/share To mount: sudo mount -t cifs -o username=your-name //your-server/your-path /mnt/share your-name is your Windows user name. your-server is the server IP address or domain name. your-path is the folder name of that SMB share. After executing, you might need to input the password. <div style="display:inline- …

bash Linux Ubuntu Windows Server SMB Share

Run WeChat in Ubuntu

Install and configure Wine. First, install Wine. sudo apt install wine64 After installing, open winecfg. winecfg Ajust the dpi to a higher value. I'm using 192 for 4K display. file Download and configure fonts Download and configure fonts. Run the following commands: sudo apt install cabextract sudo apt install winetricks winetricks corefonts gdiplus riched20 riched30 Download and install WeChat  …

bash Linux Ubuntu China WeChat Wine

Play with Windows Subsystem for Android with Google Play

What will this article talk about? A lot of my friends are trying to run Android apps on Windows 11. Looks like Microsoft's demo is pretty cool. But soon we found out that Microsoft only promised to run apps from the Amazon app store. And the apps in the Amazon app store are very scarce. We are very much looking forward to being able to run custom Apks. Or even go a step further, install apps  …

bash Windows 11 Android Windows Subsystem For Android WSA Magisk MagiskOnWSA Google Google Play adb

Use you local server to replace the cloud with FRP.

Why am I doing this? I've been complaining: the public cloud is too expensive. A typical server costs about 150USD a month. And because I use a lot of Azure PaaS services, my current business needs to cause me to spend more than 500USD per month. In addition, the database and App Service are both costly. This practice proves: that using Azure is very expensive. So I've been thinking: I have a lot  …

IP bash Linux Windows Server Cloud FRP Network Port Firewall

Auto backup for Minecraft on Linux

Recently, I was addicted to Minecraft. And I hosted a server. In order to backup the server automatically, I have tried many solutions. Git solution Git solution requires a lot of CPU when compressing the objects. And may impact the game performance since Java itself requires a lot of CPU. So I finally gave up Git.   Copy solution Copy the world folder to anther place is super simple. Before try  …

bash Linux Minecraft Backup

Programmatically connect to the remote server via SSH and execute remote command.

Recently I was trying to build a server management tool. That I need to connect to my server (Ubuntu) programmatically. I usually access my server via SSH, as a normal human. So I wanna do it with the same approach. First, create a new .NET Core project with: dotnet new console After creating the new project, install the latest SSH.NET library. Reference: NuGet Gallery | SSH.NET 2020.0.1 And  …

C# .NET Core bash Linux SSH

FFmpeg 用法概览

背景 最近买了个4K,144Hz的 HDR 显示器。新的显示器很不错,于是我想先进行测试一下。 于是我下载了非常多 4K 视频,准备观赏观赏。但是很快发现,怎么得到最优质的播放体验还是一个深坑。而衡量视频质量,除了看分辨率,还要看编码格式,码率,色彩,HDR等信息。 显然,现在折腾视频,最方便的工具就是 ffmpeg 了。FFmpeg 是一个开放源代码的自由软件,可以执行音频和视频多种格式的录影、转换、串流功能,非常适合快速、批量的修改视频。 开始之前 安装ffmpeg ffmpeg 的最新版下载地址始终都是: https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z 直接将其下载,解压,放到一个地方,将 exe 文件所在路径加入环境变量 PATH 即可。 了解视频的编码格式 开始之前,需要先了解平时经常使用的编码格式和平台支持情况,以及什 …

bash FFmpeg

Best-practice for authentication after creating a new Linux server

This article helps you change the following items if your cloud provider didn't do that for you. Create your own account instead of root. Disable password login and force to use SSH key to log in. Disable root account. Enable sudo without password. Before starting the process, make sure you have a valid SSH key-pair locally. Fist, connect to the server. (With root password). you@local  …

bash Linux Ubuntu SSH