Anduin Xue

let today = new Beginning();

Linux


Interface selection when Linux has multiple network interface at the same time

Problem background I recently built multiple subnets for my data center. And I connected two interfaces of a Linux device to two subnets at the same time. file When I run ifconfig, below networks are shown: file Only the Green network has Internet access. The blue network is pure internal network. However, when I try to access the Internet, it may fail with message: destination host unreachable. …

IP Linux Network Routing Interface

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

Ubuntu resize an ext4 partition without LVM

This post will tell you how to make the partition extend to full disk after resizing the disk. First, check current usage: sudo df -Th We will resize sdb1. sudo fdisk /dev/sdb n – Create partition p – print partition table g - reset as GPT partition table d – delete a partition q – exit without saving the changes w – write the changes and exit. Run: d This will delete the partiton. Select 1. Run:  …

Linux Ubuntu Disk ext4 fdisk Partition

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

Install your own NFS ESXI storage server

Why Recently I was building a VMware ESXI cluster, aka Vsphere. We all know that Vsphere clusters require separate storage so that ESXI hosts can migrate virtual machines between multiple hosts. There are professional solutions like Dell PowerStore. However, those machines are really really expensive. I guess about 20,000 USD. So how can we get a similar solution as an ESXI storage server with  …

Linux Storage NFS VMware ESXI Vsphere Dell IPMI Debian Server

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

CaddyV2 tips and examples (How to correctly get user's IP address after a reverse proxy)

Here are some tips when I am using CaddyV2 as a reverse proxy. Directly render HTML somedomain.aiursoft.com { respond / h1Welcome/h1 200 } Reverse proxy on certain address somedomain.aiursoft.com { reverse_proxy /admin http://v2ray:10000 { } } Permenant redirect git.aiursoft.com { redir https://git.aiursoft.cn{uri} permanent } Reversey proxy and add custom header  …

Reverse Proxy Linux Ubuntu Proxy FRP Caddy CaddyV2 IP Address Proxy Protocol

Build a new NFS server with WinServer or Ubuntu and mount it

Windows Server On Windows Server, creating a new NFS server is simple. First install this: file And then click the folder properties. file And enable that. file Ubuntu Run: sudo apt update sudo apt install nfs-kernel-server -y sudo mkdir -p /mnt/nfs_share sudo chown -R nobody:nogroup /mnt/nfs_share/ sudo chmod 777 /mnt/nfs_share/ And edit the configuration: sudo vim /etc/exports Add this: /mnt/  …

Linux Ubuntu File Windows Server Share NFS VMware ESXI Vsphere NAS

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

Install Nextcloud on a Ubuntu 20.04\22.04 server

Step 1 - Buy a server and basic configuration You can buy a pure server at Vultr. After you installing a pure Ubuntu, or buying a new cloud Ubuntu server, you need to first finish the basic authentication configuration. Follow instructions here to: Delete other accounts. Create your own account instead of root. Disable password login and force to use SSH key to log in. Disable root account.  …

Web Linux Ubuntu IT Apache2 PHP MySQL Certbot Nextcloud Storage