Simple Solutions That Work!

Purpose: In this blog post we will learn how to create your own local Debian like package repository so that you can use apt-get install commands to install packages just like the way you install from Debian repositories. Let’s say you have created your own customized Debian packages and you would like them to install just like the Debian main packages – you can achieve this by creating your own local repository.

Basics

Before we begin, I would like to point out that there are two methods to create a local Debian repository - long (and more correct) method and the short (but quick) method. For more information, refer to the Debian Repository HOWTO. In this post, we will see the short method. I suggest that if you yourself are going to use the repository then probably short method is sufficient. But if you plan to upload your packages to a server from where a lot of people are going to download then you should setup your repository using long method.

So let’s get started…

Step 1:Prepare your system – Web-Server & dpkg-dev

Make sure you have a web-server or a FTP server running on your system on which you would like to host your packages. You can refer to the mediawiki post to see how to get a Apache web server running on a Debian system. Once you have installed the web-server, then install the following package:

# apt-get install dpkg-dev

We will require this package later on when we create a script which will scan our local packages.

Other Related Posts:

Kushal Koolwal works as an Operating Systems (OS) R&D Engineer at VersaLogic Corporation, an embedded systems manufacturer located in Eugene, Oregon. In his current position Mr. Koolwal works with different embedded operating systems such as Windows Embedded, Linux, VxWorks, QNX, etc. Kushal completed his bachelor’s degree in Computer Engineering in 2004 in India. He then pursued a Master’s degree in Computer Science, which he received in 2006 followed by an MBA in 2008, both from the University of Oregon. Additionally, Kushal is a database/web developer using .NET technologies and blogs about Linux solutions and businesses in general. His hobbies are traveling, playing sports, dancing, etc.

[…] install commands to install packages just like the way you install from Debian repositories. More here Before we begin, I would like to point out that there are two methods to create a local Debian […]

I tried reprepro and had no luck for what I am doing, but this article worked the first time. Yes, I get warnings when running the script but the end result is that my update manager tells me when I have updated the repo, and it installs the new version correctly. I love having my own repo! Thanks much!!!