Wednesday, October 10, 2007

License With Temporary Visitor Expiration

[HOW TO] How to create a local repository using the ISO's Ubuntu

Until recently I had at my disposal repositories
DVD's to install the packages needed GNU Linux distribution I'm using now Ubuntu 7.04 (Feisty). But sometimes it is very inconvenient to switch from one DVD to another when installing a particular package with their respective units. So I decided to copy the DVDs to my hard drive to make more dynamic the maintenance of my system.

The only drawback, perhaps, whether the space they can occupy the DVDs, which become 16 GB for the packages. Deb repository.

this little guide may also serve to those without Internet access (ie relatively slow) and need to install / update certain packages of the system and can also save the time it takes to switch from DVD to DVD when installing a package with many dependencies. 1) Burn the DVDs as ISO images on your hard disk.


is very convenient to copy each of the DVD's the repository for images, because for some reason-perhaps because of lack of disk space in the future, we want to delete the local repository and / or need to create new copies of itself in for DVD's, even to copy them to a friend of yours.


1.1. We enter the DVD into the appropriate drive and run:

$ dd if = / dev / dvd of = / home/usuario/ubuntu7.04/ubuntu_0.iso


This command creates the file "ubuntu_0.iso" (the first DVD) in the folder / home / user / ubuntu7.04 /. Repeat the process for each of the DVDs
Until this point we have the following files: ubuntu_0.iso
ubuntu_1.iso ubuntu_2.iso
ubuntu_3.iso

2) Create mount points.


we need to create folders in which we will mount the file later.


iso $ sudo mkdir-p / mnt/ubuntu7.04/CD0
$ sudo mkdir / $ sudo mnt/ubuntu7.04/CD1
mkdir / mnt/ubuntu7.04/CD2 $ sudo mkdir / mnt/ubuntu7.04/CD3

Done, we already have the folders list.

3) Mount the. Iso mount points enabled.


This step is easy, simply run:

$ sudo mount / home/usuario/ubuntu7.04/ubuntu_0.iso-r-t iso9660-o loop / $ sudo mount mnt/ubuntu7.04/CD0
/ home/usuario/ubuntu7.04/ubuntu_1.iso-r-t iso9660-o loop / mnt/ubuntu7.04/CD1
$ sudo mount / home/usuario/ubuntu7.04/ubuntu_2.iso-r-t iso9660 - o loop / mnt/ubuntu7.04/CD2 $ sudo mount / home/usuario/ubuntu7.04/ubuntu_3.iso-r-t iso9660-o loop / mnt/ubuntu7.04/CD3

Or if you prefer, you could copy the following script that will do all that for us, the proper name of the file could be
montar_repositorio


# / bin / bash set-x

mount / home/usuario/ubuntu7.04 / ubuntu_0.iso-r-t iso9660-o loop / mnt/ubuntu7.04/CD0
mount / home/usuario/ubuntu7.04/ubuntu_1.iso-r-t iso9660-o loop / mnt/ubuntu7.04/CD1
mount / home/usuario/ubuntu7.04/ubuntu_2.iso-r-t iso9660-o loop / mnt/ubuntu7.04/CD2 mount / home/usuario/ubuntu7.04/ubuntu_3.iso-r-t iso9660-o loop / exit
mnt/ubuntu7.04/CD3
then proceed to give you execute permissions:


$ Chmod + x montar_repositorio


Copy the file to the root folder of the executable.
montar_repositorio
$ sudo cp / sbin /

Ok, with that little script, each time you start our system, simply run the following command to get the repository enabled.

$ sudo montar_repositorio


4) Modify the sources.list



Now we have our repository enabled, you need to edit the file / etc / apt / sources.list to update our list of available packages.

$ sudo gedit / etc / apt / sources.list Open the file mentioned and then proceed to discuss with the # all lines are not (preferably) to avoid problems with the repositories enabled by default, you see, refer to a website particular.
Once this is done, include the following at the end of the file: # Repository

local hard disk
deb file: / mnt/ubuntu7.04/CD0 / feisty main restricted universe multiverse deb
file: / mnt/ubuntu7 .04/CD1 / feisty main restricted universe multiverse deb
file: / mnt/ubuntu7.04/CD2 / feisty main restricted universe multiverse deb
file: / mnt/ubuntu7.04/CD3 / feisty main multiverse


restricted universe Save the changes and close the file.

5) Update the list of available packages.


Now that enabled the repository, and also made the necessary changes to our sources.list, is simply to update the list of available packages:

$ sudo apt-get update

And if possible, update the system packages:

$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

see, not so difficult to create our local repository, we just need the files. iso of packages. deb version we need for our distro Ubuntu.

I hope this guide will be useful.

0 comments:

Post a Comment