简体   繁体   English

如何通过linux存储库安装我的程序(例如,使用apt-get)?

[英]How can I make my program installable via the linux repositories (eg, using apt-get)?

I have created a program and I would like it to be installable via commands such as 'apt-get' on linux, but I have no idea where to even begin to achieve this. 我已经创建了一个程序,我希望它可以通过Linux上的'apt-get'等命令进行安装,但我不知道在哪里开始实现这一点。 Could someone help and explain what I need to do to achieve this? 有人可以帮助解释我需要做些什么来实现这一目标吗?

Thanks. 谢谢。

To be able to install your own package via apt-get you need to: 要通过apt-get安装自己的软件包,您需要:

  1. Package your application as a deb. 将您的申请打包为deb。
  2. Add your package to an apt-repository. 将您的包添加到apt-repository。
  3. Configure your distribution to use said apt-repository. 配置您的发行版以使用所述apt-repository。

Creating a package and a repository takes a bit of work. 创建包和存储库需要一些工作。 A step by step will be quite long and depend a lot on the app your packaging. 一步一步将很长,并且很大程度上依赖于您的包装。 There are multiple ways of creating packages, and multiple ways of creating repositories. 有多种创建包的方法,以及多种创建存储库的方法。 In general though, here are some pointers for utilities that can help you: 一般来说,这里有一些可以帮助您的实用程序指针:

Creating packages: 创建包:

Have a look at FPM . 看看FPM It's a nice and easy utility that can create packages for multiple formats, including deb. 这是一个很好的简单实用程序,可以创建多种格式的包,包括deb。 Have a look at this guide for an idea of how to use it. 请查看本指南 ,了解如何使用它。

Creating a repository: 创建存储库:

I've mostly used reprepro for this in the past. 我过去主要使用reprepro。 Check out this guide . 查看本指南 The above guide also includes how to use the repo after it has been published. 上述指南还包括如何在发布后使​​用回购。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果Linux Distro没有从正在运行的Java程序中安装它,我如何告诉Linux Distro apt-get安装LibVLC? - How can I tell a Linux Distro to apt-get install LibVLC if it doesn't have it from a running Java Program? 如何将Git安装到没有apt-get的服务器上? - How can I install Git to my server which does not have apt-get? apt-get存储库是如何托管/管理/架构的? - How are apt-get Repositories Hosted/Managed/Architected? Linux:如何通过apt-get安装某些旧版本的软件 - Linux: How to install certain old version of a software via apt-get 通过 Ubuntu 的 apt-get 在 Dockerfile 中使用 apt-get 安装 python-pip - Install python-pip using apt-get via Ubuntu's apt-get in Dockerfile apt-get返回错误“debconf:Perl可能未配置”/我如何理解linux错误 - apt-get returns error “debconf: Perl may be unconfigured” / how do I actually understand linux errors 如何在Linux Mint Box上的laravel homestead中使用apt-get? - How to use apt-get in laravel homestead on a Linux Mint Box? Ubuntu:如何让apt-get / synaptic为自己的应用程序工作 - Ubuntu: how to make apt-get/synaptic work for own application apt-get不安装任何Linux服务器 - apt-get not installing anything linux server Amazon Linux:“apt-get:找不到命令” - Amazon Linux: "apt-get: command not found"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM