How to set up a local repository?

0

Tips on how to create a repository from applications in the past downloaded right into a listing.

There are a few eventualities wherein it’s in particular attention-grabbing to create a neighborhood repository of device in binary kind deb as:



  • Set up on a computer with out web connection,
  • Set up on a computing device with a sluggish web connection by means of easy 56K modem RTC
  • Set up-a birthday party the place there are many machines to be put in together with a broadband web connection no longer quick sufficient.

In all circumstances, this system can keep away from downloading applications on the net which might be already existing in the neighborhood in as a minimum one computer is correctly put in within the conventional method by means of the online.

There’s some other answer with using apt-cacher that doesn’t require the set up of apache.

 

This process will can help you share that bundle already downloaded. In case you need to create a complete repository in the neighborhood.

The utility dpkg-scanpackages you want on the server computer is on hand within the bundle dpkg-dev .

LAN set up from an area server desktop

This documentation will probably be to be had with Breezy, Dapper and Edgy if packets that have been downloaded to check the model put in in the community on the shopper by way of CD-ROM.

Step 1: Set up a fully native laptop by way of the Web will transform a repository server

  • Arrange your computer so by the use of conventional excessive-velocity Web the use of a file sources.checklist classical and take into account that to position all of the important device.

As soon as achieved, appear on this folder to substantiate that each one applications are there as a file. deb :

/ Var / cache / apt / archives /

 

 

It is going to set up the Apache2 net server to permit connection to native intranet.

 

Step 2: Put together the native laptop to transform neatly centered depot server

In my instance, I create a neighborhood folder that incorporates the applications deb in Apache2 and known as ubuntu_local.

  • Open a terminal (or console) with Purposes / Utilities / terminal and turn into root (= tremendous-administrator) with the command:

    sudo-i <ENTER> (then sort your password)
  • Replica the complete folder archives and programs deb that accommodates the foundation of your Apache2 net server with the command:

    cp-rf / var / cache / apt / archives / var / www / ubuntu_local
  • Then go to that folder with:

    cd / var / www / ubuntu_local /
  • and record all of the applications contained in with the command:

    dpkg-scanpackages /. / dev / null Applications.gz

At this level, your server is nearly prepared, you simply set your laptop to claim that someone can get these programs in Apache2 to try this, run the two following instructions:

chmod 755-R / var / www / ubuntu_local /

adopted with the aid of:

chown-R www-information: www-knowledge / var / www / ubuntu_local /

Your native server is able to check, launch your net browser and enter this deal with:

http://ip_serveur/ubuntu_local/

(Server_ip server shall be changed by way of the ip tackle of your laptop within the LAN)

If a big checklist seems with all of the instrument and the Applications.gz, it's all just right, if now not, repeat above, you forgot one thing …

 

 

It’s totally that you can imagine (and arguably extra fascinating) to create a symbolic hyperlink to the cache listing as an alternative of copying it. Both with the earlier instance:

 

ln-s / var / cache / apt / archives / var / www / ubuntu_local /

It’s now not important to make use of dpkg-scanpackages or (relying on native safety insurance policies) to vary the permissions by the use of chmod / chown. As well as, your native repository will all the time be "up to date".

 

Step three: Put together the native consumer tool looking ahead to set up to hook up with server native repository

On the consumer, you simply do a customary set up with the CD-ROM Ubuntu, the community works, you now simply want to improve a file sources.record that connects to your native server.

To do that, open a terminal (or console) with Functions / Utilities / terminal and develop into root (= tremendous-administrator) with the command:

sudo-i <ENTER> (then sort your password)

then replica the sources.record file to make a backup reproduction with:

cp / and so forth / apt / sources.checklist / and so forth / apt / sources.record.previous

– And edit the sources.checklist file with:

gedit / and so on / apt / sources.checklist

delete the entire rows in and change them with this:

# # Depot native intranet
deb http://192.168.zero.four/ubuntu_local /.

on this instance with the server ip 192.18.zero.four native, you’ll want to shop your file.

– Then run the updating device sources with the command:

apt-get replace

then the replace in the neighborhood with:

apt-get set up package_name

package_name = bundle title to put in.

or

apt-get dist-improve

In your knowledge, you’ll set up the package deal w32codecs proprietary video codecs in four seconds as an alternative of three minutes in most cases required for downloading by way of the Web.

Word that some programs could have of their filenames, "% 3a" which returns an error with apt-get improve or in any other case, on this case, merely rename the bundle, changing "% 3a" with ":".

Instance:

rename 's /% 3A /: /' *. deb

 

 

If you happen to retailer the packets in a partition as FAT32, that you can now not use the persona ':' in filenames, the answer is to create a partition formatted to ext3.

 

Putting in . deb file on CD-ROM, DVD-ROM pressure, USB exterior or detachable laborious power

it’s actually enough so as to add that in his sources.listing

deb  file : / media / doc / ubuntu_local /.

Right here is my deposit on an exterior arduous pressure … however merely adapting to a cdrom or different …

TODO: make a CD / DVD autorun is known straight away by way of synaptic or adept.

 Some other answer: putting in deb by the use of synaptic

(Don’t fail to remember that the dpkg-dev is pre-requisite)

Create directories (p.exe you wish to have to have the debs within the listing monDepot) ~ / monDepot /

cd ~ mkdir-p monDepot /

Reproduction your deb in ~ / monDepot /. It’s higher to avoid wasting the deb wished straight away on this folder when downloading. Which you could additionally put them in subdirectories of ~ / monDepot /.  

Within the listing, you are going to want a file "Applications.gz". This file will likely be created mechanically via a script that you just create. Programs.gz should certainly include knowledge on the debs you simply put within the listing. To facilitate the updating of Programs.gz, create a script (the usage of gedit), as an example miseAjour.sh:

cd gedit monDepot miseAjour.sh

Write in these two traces:

# / Bin / bash cd ~ / monDepot / dpkg-scanpackages. / Dev / null Programs.gz

Give up gedit (saving). We’d like the script or executable, that’s to claim he has the x:

chmod + x miseAjour.sh

Each and every time you click on on this script, the file descriptions will probably be up to date.

At last, we should inform our new synaptic deposit. Within the menu of synaptic you sort "deposits – add" and click on "customise" and set:

deb  file : / dwelling / myName / monDepot /.

When you click on the replay deposits (after the alternate you simply made, synaptic does it robotically) you will have your new deb the whole thing good within the synaptic. For every new deb in monDepot you obtain, run the script and made miseAjour.sh reread its deposits Synaptic (with the aid of clicking on the button with two arrows) orapt-get replace .


use an iso as supply

helpful for putting in packages on a pc with out web subject matter iso file / listing media/cle_usb/xubuntu-eight.04.1-computer-i386.iso mount / media / iso

sudo mkdir-p / media / iso

mount the file:

sudo mount / media/cle_usb/xubuntu-eight.04.1-pc-i386.iso-t iso9660-o loop / media / iso / 

take a look at the meeting:

ls / media / iso / # will have to convey within the different pool and dists directories 
ls / media / iso / dists # must exhibit the listing of alternative hardy (since the iso is eight.04)

observe the directories existing in pool:

ls / media / iso / pool provides major limited #

then add this in its / and so forth / apt / sources.record

deb  file : / media / iso / hardy major constrained

don’t disregard to replace with synaptic

sudo apt-get replace



Enhanced by Zemanta

Follow us on Twitter, subscribe to our Facebook Page, find us on LinkedIn, circle us on Google+