Anduin Xue
Anduin Xue

Anduin's Tech Blog

apt


应用商店、包管理……每天都会使用的东西有什么开发难度?

现代软件开发中,应用商店和包管理是我们每天都会使用的东西。然而,这背后隐藏着许多开发难题。安装一个包可能涉及到多个依赖关系,而这些依赖关系构成了一个有向无环图。基本需求包括避免重复安装相同的依赖、包与包之间的隔离、升级和降级的允许性、查询包的来源和版本等。全局包管理器如APT、yum和pacman可以解决这些问题,但是无法解决依赖冲突和破坏性的升级降级问题。分治思想将大问题拆分成小问题,例如将应用拆分成微服务,但是会带来包的重复安装和磁盘空间占用的问题。Nix是一个函数式的包管理器,通过不可变性和平坦的包存储解决了依赖冲突和包的隔离问题。Nuget则采用动态链接的方式解决依赖冲突。其他包管理工具如winget、snap和flatpak也有各自的解决方案。然而,包管理实际上没有万能解决方案,目前主流的做法是结合Monolithic的包管理、Docker和虚拟机来解决依赖冲突问题。虽然应用商店给我们带来了便利,但是背后的复杂性是巨大的。当我们开始自己分发软件时,才会意识到这个世界并不是那么简单。--GPT 4

Store nuget apt package manager Application Nix

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

  • 1