Anduin Xue

let today = new Beginning();

Service engineering Skills and IT capabilities for operating and maintaining online services.


Web 应用开发检查单

这篇博客提供了一个 Web 应用开发检查单,旨在确保你的业务系统是安全、稳定、快速、可扩展、自动化的。检查单包括了网络配置、权限配置、运维策略、DevOps、容器化、应用开发、应用体验和合规性等方面。它可以帮助你确保服务器的网络安全和性能,减小权限,快速恢复业务,自动化部署和容器化,代码是否存在各种攻击的风险,以及是否符合各种合规性。该检查单详细介绍了每个方面的最佳实践,并提供了一些有趣的问题来启发读者思考,如:你的应用是否支持黑色主题和大字体?你的代码是否可能产生违反 GDPR 或 CCPA 的行为?该检查单可以帮助你确保你的业务系统是符合最佳实践的,从而提高你的业务系统的质量和可靠性。--GPT 4

Web Linux Cloud Server Container Service Development

Ubuntu 22.04 Network Diagnostic Handbook

This article provides a comprehensive guide on how to diagnose network interfaces in Ubuntu 22.04. It covers various methods, such as using the `ip` command, checking the routing table, and testing HTTP connections. The article also introduces the `networkctl` command, which supports various operations like renewing DHCP leases and bringing interfaces up or down. The author provides step-by-step instructions and examples to help readers follow along. Overall, this article is a useful resource for Ubuntu users who need to troubleshoot network issues.--GPT 4

Linux Ubuntu Network NetworkManager Networkd Netplan

Mirror YouTube channel to watch videos with best experience

This article explains how to mirror YouTube channels to watch videos without ads and interruptions, using the command-line tool youtube-dl. The author provides a script that downloads videos from a list of YouTube channels and saves them to a local folder, which can be added to the media library of a media server like Jellyfin. The article also explains how to expose the video folder to the internet via a web server and play the videos using other players like VLC. The step-by-step instructions are detailed and easy to follow, making it a great guide for anyone who wants to watch YouTube videos without ads.--GPT 4

Web Linux Ubuntu Python Youtube Jellyfin VLC

Setup a Ubuntu apt mirror server

This blog post provides a comprehensive guide on how to set up an Ubuntu apt mirror server. The process begins with installing the `apt-mirror` package and configuring the `mirror.list` file to specify the source you want to mirror. The author then explains how to start mirroring and where the downloaded files will be stored. The next step involves configuring a web server using Aiursoft.Static, including modifying permissions for accessibility and creating a systemd service for automatic startup. The guide continues with instructions on how to configure a reverse proxy using Caddy and finally, how to configure your client to use your mirror source. The author concludes by stating the benefits of setting up an Ubuntu mirror, such as bandwidth saving and faster software package downloads. Would it be possible to further optimize this process? How secure is this setup?--GPT 4

Web Linux Ubuntu Cache Server apt Mirror

基于 Docker Swarm Mode 建设你家里的数据中心!

在这篇博客中,我们将深入探讨如何使用 Docker Swarm Mode 建设家庭数据中心。文章首先介绍了 Docker Swarm Mode 的基本概念,包括其特性、优势以及与其他技术如 Kubernetes 的对比。接下来,我们详细阐述了如何在家庭环境中配置和使用 Docker Swarm Mode,包括网络设置、数据存储、服务管理等关键步骤。 在文章中,我们还讨论了使用 Docker Swarm Mode 建设数据中心的一些潜在问题和挑战,例如网络安全、数据备份、系统稳定性等。同时,我们也提供了一些实用的解决方案和建议,帮助读者在实际操作中避开这些问题。 文章最后,我们展望了 Docker Swarm Mode 在家庭数据中心建设中的未来发展,包括可能的新特性、技术趋势以及对现有架构的影响。我们相信,随着 Docker Swarm Mode 的不断发展和完善,它将成为家庭数据中心建设的理想选择。 这篇文章能否启发你思考如何利用现有的技术和资源,打造你自己的家庭数据中心?Docker Swarm Mode 又有哪些潜力和可能性等待你去探索和发掘?希望你在阅读本文后,能找到你自己的答案。--GPT 4

bash Linux Server Docker Container Docker Swarm Cluster Swarmpit

为笔记本安装 Chrome OS

本篇博客详细介绍了如何将 Chrome OS 安装到老设备上,以使其获得新生。文章通过详细的步骤和清晰的图解,向读者展示了如何从选择合适的设备,下载恢复映像,到最后的系统部署和设备测试等一系列过程。Chrome OS 是一个深度魔改的 Linux,它能够运行 Android 和 Linux 应用,而且体验超好,动画美丽,比较安全,几乎很难用坏。文章还介绍了如何在 Chrome OS 上安装 Linux 子系统,以便运行其他应用程序。如果你有一台旧设备,想要尝试新的操作系统,那么这篇博客就是你的绝佳指南。你是否有想过让你的旧设备重获新生?你是否对 Chrome OS 感到好奇?如果是的话,那么为什么不尝试一下呢?--GPT 4


Aiursoft 事故调查、分析与总结

本篇博客详细记录了对Aiursoft发生的一次事故的调查、分析和总结过程。在NFS服务器的两块NVME固态都在线,机械硬盘也在线的情况下,发现了两次运行`zfs list -t snapshot`的结果不一致的问题,这引发了作者对数据安全的担忧。通过一系列的探究和实验,作者发现了两个zfs dataset的MOUNTPOINT竟然是同一个目录,这是ZFS不允许的。尽管遇到了无法卸载`/mnt/nvme`的问题,但作者通过重启NFS服务,成功地将两个dataset的MOUNTPOINT改为不同的目录,解决了NFS服务器的问题。 然而,这只是问题的一部分。作者还发现在事故发生时,由于数据中心的HA系统认为系统已经损坏,不停尝试将VM迁移,甚至对ESXI进行了关机,这导致了恢复数据中心时遇到了非常多的问题。经过大约3个小时的修复工作,数据中心最终恢复了正常。 而对于出现这一系列问题的原因,作者通过仔细阅读备份脚本和在试验室运行上述脚本得到了答案。这次事故的调查、分析和总结,不仅解决了问题,也为我们提供了一次深入理解和应对系统故障的机会。那么,你是否已经理解并掌握了这次事故的处理过程和原因呢?--GPT 4


在服务器中部署单独的Docker应用

本文针对在虚拟机(VM)中部署Docker应用的场景进行了详细的讨论。这种场景可能出现在数据中心仍基于VM部署,而某些业务只提供Docker映像的情况下。文章首先讨论了这种混合部署的挑战,包括管理复杂性的提升,以及未来发展方向的确定。然后,文章详细介绍了在VM中安装Docker、确定容器需要穿透的卷、确定端口映射、管理容器和VM、确保容器会随着主机开启、对容器升级以及直接操作容器的方法。文章指出,虽然容器的升级相对容易,但在实际部署中,我们还需要采用一些“笨办法”以确保新版本的容器能正确加载和使用持久化卷,并与之前的版本兼容。最后,文章强调在混合部署中,需要对容器和VM进行分别管理,并需要对容器的持久化卷和端口映射进行规划和管理,以确保系统的稳定性和可靠性。同时,也需要考虑未来的发展方向,逐步向基于容器的部署模式转变。那么,你是否已经准备好在VM中部署Docker应用了呢?--GPT 4

bash Linux Ubuntu Docker VM Container

Use your own cert to sign your package to identify your code identity.

This blog post offers a comprehensive guide on using a digital certificate to sign code and establish identity in the digital world. It first explains the concept of digital certificates, which are split into public and private keys. The public key is made available online for others to trust, while the private key is used to sign content. The post further elaborates on the subject and friendly name fields in a digital certificate. The subject field contains identity verification information, while the friendly name is an optional field used for easier identification and management of the certificate. For HTTPS certificates, the subject field typically includes the domain name or hostname of the certificate holder, which is crucial for ensuring secure communication. The blog then provides a step-by-step guide on generating a self-signed certificate and obtaining the private key. It also explains how to make the public key trusted by others. By generating a self-signed certificate and...--GPT 4

C# Certificate .NET Windows Sign Digicert Code Sign Signature nuget

Using ZFS is easy

ZFS is a modern file system with features such as copy-on-write, redirect-on-write, deduplication, and snapshots, making it suitable for large-scale storage and data management scenarios. It operates on the concept of storage pools, where a pool manages disks and provides storage space. Datasets can be created on top of these pools, which don't require allocated space and can utilize the entire storage capacity of the pool. Each dataset is mapped as a directory for file storage and organization. The blog post provides a detailed guide on how to install ZFS, locate your disk, list sets and pools, and manage pools and sets. It also explains how to use the deduplication property to remove redundant data from your ZFS file systems, resulting in only unique data being stored and common components being shared between files. Additionally, the blog post discusses the use of snapshots, which record the state of the file system at a specific point in time. This feature allows for easy resto...--GPT 4

bash Linux Disk ZFS File Sysytem Raid Dedup

Common SMTP settings to Office 365 to send Emails

本篇博客主要讲述了如何使用Office 365的SMTP设置为不同的开源软件配置电子邮件发送功能。文章分别介绍了如何为Gitea、GitLab、Mastodon、Nextcloud和Azure DevOps配置SMTP设置。 在Gitea部分,作者提供了一个配置文件示例,展示了如何在`/etc/gitea/app.ini`文件中设置SMTP相关参数。配置包括启用邮件发送功能、设置SMTP服务器地址、端口、用户名、密码等信息。 对于GitLab,作者给出了一个Ruby配置代码片段,展示了如何在`/etc/gitlab/gitlab.rb`文件中配置SMTP。配置内容与Gitea类似,包括服务器地址、端口、用户名、密码等信息,同时还包括了启用TLS等设置。 在Mastodon部分,作者展示了如何在`/home/mastodon/live/.env.production`文件中设置SMTP。配置内容与前两者类似,包括服务器地址、端口、用户名、密码等信息。 对于Nextcloud,作者首先提醒读者打开管理员设置页面,然后展示了如何在网页界面上配置SMTP。配置内容与前述软件类似,包括服务器地址、端口、用户名、密码等信息,并给出了禁用TLS的建议。 最后,作者为Azure DevOps提供了一张配置SMTP的截图,展示了如何在Azure DevOps的网页界面上配置SMTP。配置内容与前述软件类似,包括服务器地址、端口、用户名、密码等信息。 通过本篇博客,读者可以了解如何为不同的开源软件配置Office 365的SMTP设置,从而使这些软件具备发送电子邮件的功能。在实际操作中,读者可能需要根据自己的需求调整配置参数。同时,如果在配置过程中遇到问题,尝试更改TLS设置可能会有所帮助。在实际应用中,你是否遇到过类似的配置需求?在解决问题时,你是否有其他的经验和建议?--GPT 4

Microsoft 365 Mastodon GitLab Gitea SMTP Office365 Exchange

Install GitLab behind a reverse proxy on a Ubuntu 20.04\22.04 server

本篇博客详细介绍了如何在Ubuntu 20.04/22.04服务器上安装GitLab,并将其部署在反向代理之后。首先,博客讲述了如何安装和配置GitLab,接着演示了如何配置Nginx作为反向代理。为了解决SSH端口冲突的问题,文章还讨论了如何在GitLab服务器上使用2202端口作为克隆端口,并在代理服务器上进行端口转发。此外,博客还介绍了如何为GitLab实例添加运行器,并提供了一个示例项目,用于测试运行器的功能。最后,博客提供了一个完整的`.gitlab-ci.yml`配置文件示例,用于实现项目的构建、代码分析、测试和发布等任务。 在阅读本篇博客后,您将了解如何在Ubuntu服务器上部署GitLab,并配置反向代理以实现安全的访问。同时,您还可以借助本文提供的示例项目和`.gitlab-ci.yml`配置文件,快速实现项目的自动化构建和测试。在实践中,您可能需要根据自己的需求对配置进行调整,以满足不同的项目类型和技术栈。 那么,在配置GitLab和反向代理的过程中,可能会遇到哪些问题?如何确保GitLab运行器能够正确地执行任务?如何根据项目需求定制`.gitlab-ci.yml`配置文件?阅读全文,自己找到答案吧!--GPT 4

bash git Linux Ubuntu Proxy SSH Caddy GitLab nginx