How to create a local APT repository?

1

There are 4 steps to setting up a simple repository for yourself

1.Install dpkg-dev
2.Put the packages in a directory
3.Create a script that will scan the packages and create a file apt-get update can read
4. Add a line to your sources.list pointing at your repository

Install dpkg-dev

Type in a terminal

sudo apt-get install dpkg-dev

The Directory

Create a directory where you will keep your packages. For this example, we'll use /usr/local/mydebs.

sudo mkdir -p /usr/local/mydebs

Now move your packages into the directory you've just created.

Previously downloaded Packages are generally stored on your system in the /var/cache/apt/archives directory. If you have installed apt-cacher you will have additional packages stored in its /packages directory.

The Script update-mydebs

It's a simple three liner:

#! /bin/bash cd /usr/local/mydebs dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz ...
0 0
2

I would like to build my own local repository on my LAN, so that machines on the LAN can update and upgrade from it. I want to download the packages and store them on my local server so that I can update, upgrade, install, etc, from it without using the internet.

From the Ubuntu Help wiki:

There are 4 steps to setting up a simple repository for yourself

1.Install dpkg-dev
2.Put the packages in a directory
3.Create a script that will scan the packages and create a file apt-get update can read
4. Add a line to your sources.list pointing at your repository

Install dpkg-dev

Type in a terminal

sudo apt-get install dpkg-dev

The Directory

Create a directory where you will keep your packages. For this example, we'll use /usr/local/mydebs.

sudo mkdir -p /usr/local/mydebs

Now move your packages into the directory you've just created.

Previously downloaded Packages are generally stored on your system...

0 0
3

UPDATE: This post has been updated to include a section on accessing downloaded packages through a local intranet.Some obsolete info has also been deleted. The techniques detailed here have been tested on all versions of Ubuntu and will probably work on other debian-based linux distributions.

I was going through my /var/cache/apt/archives folder the other day and I thought to myself, “So will I have to re-download all these packages if I do a clean install? Internet access is not cheap here in Ghana and the speed is nothing to write home about… I’m talking about you, Vodafone!! It’d be cool to build my own APT repository with the 3000+ packages in my local cache.” The only snag was I didn’t know how to do it. So I went hunting on google and it turned out a lot has been published on this topic. I found it all rather confusing, mostly geeks talking to other geeks in geekish, so I decided to write my own how-to for my much simpler mind.

If your roaring to go and know...

0 0
4

This should be distinguished from the situation where you're trying to replicate a full package tree from an official repository and fine tuning sources priority. Random packages mean virtual packages, packages which are compiled locally or copied in a piecemeal fashion for testing purposes. Here's a simple setup based on now obsolete documentation.

First, make a directory to host the packages:

mkdir

Then move your .deb package files there. Execute this command from the directory above the one we just created (make sure permissions allow this!):

dpkg-scanpackages packagedir | gzip > packagedir/Packages.gz

Now create a file with extension .list in /etc/apt/sources.list.d/ with the contents:

deb file:///path_to_dir_above_packagedir packagedir/

and update the apt database:

apt-get update

At this point the packages in our local repository can be installed like any other package using apt-get install . When new packages are added to the local...

0 0
5

How can a company or organization minimize bandwidth costs when maintaining multiple Ubuntu installations? With bandwidth becoming the currency of the new millennium, being responsible with the bandwidth you have can be a real concern. In this article by Christer Edwards, we will learn how to create, maintain and make available a local Ubuntu repository mirror, allowing you to save bandwidth and improve network efficiency with each machine you add to your network.

(For more resources on Ubuntu, see here.)

Before I begin, let me give you some background into what prompted me to initially come up with these solutions.

I used to volunteer at local university user groups whenever they held "installfests". I always enjoyed offering my support and expertise with new Linux users. I have to say, the distribution that we helped deploy the most was Ubuntu. The fact that Ubuntu's parent company, Canonical, provided us with pressed CDs didn't hurt! Despite having more CDs...

0 0
6

Today we will show you how to setup a local repository in your Ubuntu PC or Ubuntu Server straight from the official Ubuntu repository. There are a lot benefit of creating a local repository in your computer if you have a lot of computers to install software, security updates and fixes often in all systems, then having a local Ubuntu repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces the annual cost of Internet..

You can setup a local repository of Ubuntu in your local PC or server using many tools, but we'll featuring about APT-Mirror in this tutorial. Here, we'll be mirroring packages from the default mirror to our Local Server or PC and we'll need at least 120 GB or more free space in your local or external hard drive. It can be configured through a HTTP or FTP server to share its software packages with local system clients.

We'll...

0 0
7

Fortunately, creating a local mirror of the APT packages is very easy. There is even a tool that helps to create it, called apt-mirror. So, the first step is to install it:

aptitude install apt-mirror

The next step is to customize its configuration file, /etc/apt/mirror.list. It should look like this:

set base_path /data/apt-mirror set defaultarch amd64 set nthreads 5 deb http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise-backports main restricted...
0 0
8

There are times when you download a .deb file that simply must be installed. Once on your machine, you run the dpkg command on the file only to find yourself in a quagmire of dependencies. Unfortunately, that necessary piece of software cannot be found in a standard repository. Instead of trying to wade through the dependency hell that dpkg can put you through, why not let apt take care of the heavy lifting?

“But how?” you may ask. Believe it or not, the solution lies in creating your very own localized repository that apt can recognize. Because apt will now see your local repository, it can install any .deb file placed in the local repo directory and then resolve the associated dependencies when you issue the command to install the package.

That’s handy. It’s also really easy. Let me walk you through the process.

Necessary addition

The first thing you must do is install the dpkg-dev package. Do this by issuing the command sudo apt-get install dpkg-dev....

0 0
9

If you want to create a repo with the full structure that you need for tools like debootstrap, the simplest way I've found is:

Create a repository directory.

# mkdir -p /opt/debian

Create a conf subdirectory.

# mkdir /opt/debian/conf

Create an /opt/debian/conf/distributions file with contents like this (adjust as appropriate for the distribution you're using):

Label: Local APT repository Codename: jessie Architectures: amd64 Components: main Description: Local APT repository for debootstrap

Import your package with reprepro.

# reprepro -b /opt/debian includedeb jessie /path/to/package.db

Import a bunch of packages with a shell for-loop, e.g. everything from your APT cache:

# cd /var/cache/apt/archives # for DEB in *.deb; do reprepro -b /opt/debian includedeb jessie $DEB; done

This will create an unsigned archive. It can be used with debootstrap with the --no-check-gpg...

0 0
10

Following are the steps to create a local repository for Ubuntu:

The whole process is composed by the following two stages :

I) Setting up the local repository server- ‘reposerver’.

II) Setting up other machines/clients to use our server as the repository source.

STAGE I:

I) Setting up the local repository server: reposerver.

We have to keep a machine dedicated for the local repository , lets call this machine as ‘reposerver‘ The main requirement for reposerver is the ‘disk space’, 100GB is recommended.

Here, I have created a separate partition for /var (and mounted it under /media) with 100 GB in size and assigned this space for storing the repo packages. You can also use an external storage device for this purpose. Once the disk space is ready, we need to install two packages on reposerver

apt-mirror , apache2

apt-mirror:

‘apt-mirror’ can easily create a mirror of repository from the Ubuntu server on our local...

0 0
11

I believe that it would be possible, but it not very practical. Git and GitHub are designed for storing source code, while an apt repository is setup to serve built packages. As far as git would be concerned, even a Debian source package would not be source code. But, since GitHub pages allow serving of largely arbitrary content via http, it should be possible to serve an apt repository in that way.

The page to which you referred doesn't seem at all complex to me, it's just a list of tools which can be used to manage an apt repository. The part listing Archive Generation Tools should be especially helpful. In the past I've used mini-dinstall to manage my own package archive, you'd probably want use either that or reprepro; the other tools are probably either trying to do too much (providing the capability to manage an entire distribution repository) or too...

0 0
12

Have you ever wanted to save bandwidth when updating your Ubuntu computers? It’s very possible by creating a local APT repository server for your local LAN using Apache and some standard tools. This method allows for the ability to host any Debian package file you desire locally to make it easier to distribute.

There are multiple reasons to have a local repository. The main reason would be to capture large updates downstream and re-distribute them via a local repository to save on Internet usage. Other reasons someone might want to do this would be to more easily distribute software that isn’t found on the default Ubuntu servers.

So, how do you get it installed? Let’s find out!

For the local repository to work, an Apache server will need to be set up on the host system. Open up a terminal and enter the following command:

sudo apt-get install apache2

This will set up a website on Ubuntu and the folder structure that it needs to function. It can be tested...

0 0
13

There are many reasons you may want a local Red Hat Enterprise Linux repository. Bandwidth is a major factor as downloading updates from the Internet can be time and bandwidth consuming. Another reason may be that your servers are not connected to the Internet and thus need to get their updates from a local source. You may have a development environment that you would prefer to not spend money on licenses for but still need to update. Whatever your reason, this tutorial will walk you through the process of getting your local repository setup.

Note: The server that serves as your repository should only serve as a repository.

Install packages needed for the repositories

yum install yum-utils createrepo httpd

Create the directories for your repositories

mkdir /var/www/html/rhel6
mkdir /var/www/html/rhel6/server
mkdir /var/www/html/rhel6/dts
mkdir /var/www/html/rhel6/dts2
mkdir /var/www/html/rhel6/rhsc

Helpful...

0 0
14

Posted by Steve on Sat 5 Nov 2005 at 16:04

We've previously covered setting up your own repository for the Debian's apt-get system, but we didn't cover managing automatic uploads. Thankfully this is a simple task with the reprepro, and dupload tools and a small amount of scripting.

The reprepro package is tool for creating an APT repository with a pool structure, the same type of structure the official Debian mirrors use.

The repository may:

Contain packages for multiple distributions: Stable, Unstable, Testing, etc. Contain packages for multiple architectures: Be managed quickly and easily. Creating Your Repository

Installing the package is straightforward if you're using unstable, or etch, simply install it as you would install any other package:

apt-get install reprepro

Unfortunately the package contained within Debian's stable release, sarge, is a little outdated. For that reason I'd recommend that you install a back ported version....

0 0
15
What You See Is What You Get Element

by Jared Greenwald and Avi Miller

Table of Contents

Published June 2012, Updated September 2014

This document explains how to create a local mirror of the Unbreakable Linux Network repositories and configure yum to install and update packages from these repositories.

Prerequisites

Ensure you have the following prerequisites:

A server running Oracle Linux 6 (x86_64 only) or Oracle Linux 7. An active Internet connection, either direct or via a proxy server, that can access linux.oracle.com and linux-update.oracle.com via HTTP (port 80) and HTTPS (port 443). A valid Oracle Linux customer support identifier (CSI). To purchase Oracle Linux support, go to the online Oracle Linux Store or contact your sales representative. A valid Oracle Single Sign-On account and an activated Unbreakable Linux Network account. Sufficient memory to create the yum metadata. At least 6GB of RAM is recommended to create...
0 0
16

If you want to distribute RPMs to multiple machines that use yum (e.g. Red Hat / CentOS, Fedora) it is easier to create your own yum repository and populate it with packages. You can include any rpm you want provided that the package license allows distribution (I initially wanted to include jre in this guide, but I wasn’t sure whether Oracle allowed its (re)distribution so I chose LibreOffice instead).

This guide shows how to create a custom yum repo on CentOS 6, but it should work fairly similar on other yum based Linux distros. As said above I only included the LibreOffice suite which consists of 51 packages, I’ll call this repo office and its root folder will be /opt/office. Most operations will be performed as linuxsysconfig which is a user account defined with sudo privileges.

Create the repo path

sudo mkdir -p -m 775 /opt/office sudo chown -R linuxsysconfig /opt/office

Add packages

Assuming you downloaded the LibreOffice tarball in...

0 0
17

Branch

A branch is a named pointer to a commit. Selecting a branch in Git terminology is called to checkout a branch. If you are working in a certain branch, the creation of a new commit advances this pointer to the newly created commit.

Each commit knows their parents (predecessors). Successors are retrieved by traversing the commit graph starting from branches or other refs, symbolic references (for example: HEAD) or explicit commit objects. This way a branch defines its own line of descendants in the overall version graph formed by all commits in the repository.

You can create a new branch from an existing one and change the code independently from other branches. One of the branches is the default (typically named _master ). The default branch is the one for which a local branch is automatically created when cloning the repository.

Commit

When you commit your changes into a repository this creates a new commit object in the Git repository....

0 0
18
Restore a Backup

in

Quick Start

performed default recovery, which is to play all the way to the end of the WAL stream. In the case of a hardware failure this is usually the best choice but for data corruption scenarios (whether machine or human in origin) Point-in-Time Recovery (PITR) is often more appropriate.

Point-in-Time Recovery (PITR) allows the WAL to be played from the last backup to a specified time, transaction id, or recovery point. For common recovery scenarios time-based recovery is arguably the most useful. A typical recovery scenario is to restore a table that was accidentally dropped or data that was accidentally deleted. Recovering a dropped table is more dramatic so that's the example given here but deleted data would be recovered in exactly the same way.

sudo -u postgres pgbackrest --stanza=demo --type=diff backupsudo -u postgres psql -c "begin; \ create table important_table (message text); \ insert into important_table values ('Important...
0 0
19
...
0 0