LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-02-2007, 02:51 AM   #1
ashwin_cse
Member
 
Registered: Jul 2004
Distribution: arch, rhel, ubuntu, debian, gentoo
Posts: 134

Rep: Reputation: 22
managing apt-get sources


Hi,

I am new to Ubuntu. I have been using fedora for a while (from fc2 to fc5). I find apt-get is similar to yum in fedora. I modified the /etc/apt/sources.list by adding line in the at line 2, to point apt-get to get the software from a mirror in my city. The desired setup is it should look at mirror at line 2 (1st mirror is CD-ROM), if it fails then switch to other mirrors in the list. But every time i do a apt-get install/update it rotated to different mirror each time. How to set a mirror as the default mirror for apt-get & hence synaptic package manager.

with regards,
ashwin
 
Old 02-02-2007, 03:45 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You have to disable the other ones.
(apt should check all the repos on the list.)
 
Old 02-02-2007, 03:46 AM   #3
enlightenment
LQ Newbie
 
Registered: Feb 2006
Posts: 4

Rep: Reputation: 0
Ashwin, apt or yum would use mirrors which give access to them. every mirror has a limit of number of users it can cater too. So if one mirror is already operating at full capacity, and you tell your apt to fetch a package and ur apt reaches that mirror, that mirror will deny the service to your apt. Then your apt will go to other mirror and will d/l from appropriate mirror.

I however do not understand why you want to download from one mirror only? However by your lines ," first mirror is the cdrom" i reckon you mean to talk about the repositories and not the mirrors. What exactly u want to ask?
Regards
 
Old 02-02-2007, 07:36 AM   #4
ashwin_cse
Member
 
Registered: Jul 2004
Distribution: arch, rhel, ubuntu, debian, gentoo
Posts: 134

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by enlightenment
...<snip />
I however do not understand why you want to download from one mirror only? However by your lines ," first mirror is the cdrom" i reckon you mean to talk about the repositories and not the mirrors. What exactly u want to ask?
Regards
Ys, i am talking of mirrors not just repos here. I think a mirror close to the user would be faster than a mirror thousands of miles away. This mirror http://ftp.iitm.ac.in/linux/ubuntu/ which i would like to use for apt-get is just about 20 - 30 Kilometer from my home. So i think this should be more faster than a mirror in US or taiwan. This mirror is located inside the University campus. I cant go there & get the updates on CD b'cos they have a strict security guidelines for people entering the campus. Its much easier to use apt-get over internet. IIRC, Its one of the official mirror for debian. It also hosts seminars, talks for the local LUG group. Sorry for my mix-up on repos (the CD one) & mirrors.

with regards,
ashwin
 
Old 02-03-2007, 12:10 AM   #5
enlightenment
LQ Newbie
 
Registered: Feb 2006
Posts: 4

Rep: Reputation: 0
Quote:
I cant go there & get the updates on CD b'cos they have a strict security guidelines for people entering the campus.
So how can some one outside the university help you?
I mean if the university people do not want you to use their mirror , then how can we force them to do so?

Ask the university ppl if they will allow you. and if u are not a student there, they will not. If you are a student at iit chenai , you will obviously have access. if you are not.... you must talk to authoroties to use their mirror but chances are almost zero that they will allow u.

If atall you are using BSNL broadband, i would like to tell that somehow mirrors in USA are faster than in taiwan
Regards
 
Old 02-03-2007, 04:19 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by enlightenment
I mean if the university people do not want you to use their mirror , then how can we force them to do so?
ashwin_cse has not said that the university won't let him use their mirror - just the campus.
Quote:
This mirror http://ftp.iitm.ac.in/linux/ubuntu/ which i would like to use for apt-get is just about 20 - 30 Kilometer from my home. So i think this should be more faster than a mirror in US or taiwan.
I think we really need to see your sources.lst

I doubt this is useable from just a single line.
What you have to do is point your entire sources.lst to this as a set of repositories. For eg, the lines
Code:
deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
will read
Code:
deb  http://ftp.iitm.ac.in/linux/ubuntu/ edgy main restricted universe multiverse
deb-src  http://ftp.iitm.ac.in/linux/ubuntu/ edgy main restricted universe multiverse
... do this for each repo supplied in the mirror: that should have the mirror working.

The next trick to to set you up so this mirror is checked first - then, if you are denied access (or somesuch), apt can check another one. Reading the man page I see that this is not really how it is expected to be used... it would amount to frequently changing your sources.list file (see man page).
 
Old 02-03-2007, 07:55 PM   #7
ashwin_cse
Member
 
Registered: Jul 2004
Distribution: arch, rhel, ubuntu, debian, gentoo
Posts: 134

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by Simon Bridge
ashwin_cse has not said that the university won't let him use their mirror - just the campus.I think we really need to see your sources.lst

I doubt this is useable from just a single line.
What you have to do is point your entire sources.lst to this as a set of repositories. For eg, the lines
Code:
deb http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
will read
Code:
deb  http://ftp.iitm.ac.in/linux/ubuntu/ edgy main restricted universe multiverse
deb-src  http://ftp.iitm.ac.in/linux/ubuntu/ edgy main restricted universe multiverse
... do this for each repo supplied in the mirror: that should have the mirror working.

The next trick to to set you up so this mirror is checked first - then, if you are denied access (or somesuch), apt can check another one. Reading the man page I see that this is not really how it is expected to be used... it would amount to frequently changing your sources.list file (see man page).
Simon, you are right. They do allow the use of mirror, but accessing the campus is not so easy. My sources.list is :
Code:
deb cdrom:[Ubuntu 6.10 _Edgy Eft_ - Release i386 (20061025)]/ edgy main restricted
deb http://ftp.iitm.ac.in/linux/ubuntu/ edgy multiverse restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ edgy main restricted #Added by software-properties
deb http://in.archive.ubuntu.com/ubuntu/ edgy main multiverse universe restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ edgy main restricted multiverse universe #Added by software-properties

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ edgy-updates main restricted multiverse universe
deb-src http://in.archive.ubuntu.com/ubuntu/ edgy-updates main restricted multiverse universe #Added by software-properties

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://in.archive.ubuntu.com/ubuntu/ edgy universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ edgy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://in.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu edgy-security main restricted multiverse universe
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted multiverse universe #Added by software-properties
# deb http://security.ubuntu.com/ubuntu edgy-security universe
# deb-src http://security.ubuntu.com/ubuntu edgy-security universe

#Beryl repository for ubuntu edgy
deb http://ubuntu.beryl-project.org/ edgy main
deb-src http://ubuntu.beryl-project.org edgy main
I just found howto on apt at debian site. Will post back the solution as soon i find it.

regards,
ashwin

PS: I am not a native english speaker. So pls bear with my language skills.
 
Old 02-04-2007, 01:09 AM   #8
enlightenment
LQ Newbie
 
Registered: Feb 2006
Posts: 4

Rep: Reputation: 0
Simon_Bridge

Thanks for clearing some doubts!
Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Recommendation for Debian Etch sources.list ( /etc/apt/sources.list ) forgox Debian 6 05-05-2007 01:57 PM
LXer: Setting up and managing an APT repository with reprepro LXer Syndicated Linux News 0 09-01-2006 11:33 AM
Have no apt-get sources...' BuckRogers01 Debian 6 07-28-2005 05:13 PM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 12:28 PM
APT Sources nowens Debian 25 09-28-2004 01:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration