Showing posts with label repository. Show all posts
Showing posts with label repository. Show all posts

Monday, May 26, 2014

How to add CD/DVD entry into Debian Linux source.list file

In Debian based linux(deb package management system) Linux "/etc/apt/sources.list" is the file which tells your linux box where the repository.  Regardless of the new packages installation mode (whether via terminal with apt-get command or with synaptic package manager) this file is referenced to fetch the needed .deb files.  For this method you need to have a good internet connection.

If you have installation CD/DVD you can add this to the source.list file and use that as your repository(only to install the packages available in the CD/DVD).  how to do that?

[What apt tool actually needs is a catalog file to use (packages.gz) and the original .deb packages.  As the installation CD/DVD contains it we can use the same as like online repo.]

1. Insert your CD/DVD into the drive and ensure it is mounted properly

2. Go to terminal by
Applications -> Accessories -> Terminal (Steps for BOSS GNU/Linux)

3. Type the following command

$sudo apt-cdrom add

This command will add the cdrom entry into the /etc/apt/sources.list.

4. Now update your apt file with the following command

$sudo apt-get update

5. Install the packages you need by

$sudo apt-get install

Sunday, March 3, 2013

How to create a Linux repository for the intranet/local machines?

1. Copy the whole repository of a particular linux distro(BOSS Gnu/linux, ubunutu) into a harddisk(external/internal), either by debmirror command or request/contact to the repository maintainers.
 1.1 Copy the repository using debmirror
   $debmirror -a -d -s --method= -h --root= --no-source --progress --ignore-release-gpg 
   switch a - architecture, d - distro etc..  Note: For more information read man pages of debmirror

ex: 
$debmirror -a i386 -d savir -s main,main/debian-installer --method=http -h packages.bosslinux.in --root=boss --no-source --progress --ignore-release-gpg /home/test/repository


2. install apache2 web server using
 $sudo apt-get install apache2

3. Either copy the whole content distro copy "/home/test/repository" to "/var//www" directory, or give a link to /home/test/repository in /var/www

4. find the ip address of the machine(where you do all the above procedures. i.e machine in which you keep the local/intranet repository/server) using
 $sudo ifconfig

5. add the following line as first entry in the  /etc/apt/sources.list file of all the linux machines that connected to the intranet as follows
 deb http:///boss savir main contrib non-free

6. Try apt-get update from the client machines if it updates fine, everything is fine.  Your local intranet repository is setup successfully.

Monday, December 19, 2011

How to create a simple local apt repository?

This post is regarding debian based distros which supports .deb, so the procedures are not applicable for distros that uses .rpm like fedora, redhat etc..
Requirements:
build-essential
dpkg-scanpackages
gzip

How to do:
1. Create a directory named "repo" in your home directory.  say $mkdir /home/test/repo
2. Copy all the debs you have into the /home/test/repo
3. Open your terminal as root and do the following & change directory to /home/test/repo
    #mkdir /home/test/repo
     #cd /home/test/repo
     #dpkg-scanpackages . /dev/null | gzip -9c > ./Packages.gz

Here, '.' specifies -> present working directory
/dev/null specifies -> override file, as we not going to use override file we give /dev/null
gzip -9c>./Packages.gz -> Compresses the package details into the file Packages.gz
(Packages.gz will be created within the present working directory)
4. add the following line in your /etc/apt/sources.list file
deb file:/home/test/repo/ /
5. Update your system using apt-get update command
#apt-get update
6. Thats all now your /var/lib/apt/lists will be updated
Note: Remember now whenever you use "apt-cache search" "apt-get install" it only installs from debs inside /home/test/repo.

Tuesday, March 22, 2011

Want to install "codec" for multimedia applications automatically?

In Linux some may face that some of their songs, videos(different formats) are not playing. So one need to install the corresponding plugins, codecs.
So what if when we try to play a song, video of new format the player itself findout the corresponding plugins and install by itself(Assumed you have internet conenction).

For this there is one package application called "gnome-codec-install" [Mostly it preinstalled in your Linux OS(Debian/Debian derived)]. If not installed prior. Just install it using

1. System -> Administration -> synaptic manager then serarch the package name and install.

2.In terminal $sudo apt-get install gnome-codec-install

So after successful installation when you try to play a song, video whose codec not installed yet will automaticall connect to the repository and installs then play.