LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-07-2009, 10:02 AM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Rep: Reputation: 19
First time with Debian - apt-get question?


I have been using CentOS 5.3 so far with linux, this is my first time venturing to another distro.

I was under the impression that apt-get was the same as YUM, but better.

I just typed in:

# apt-get install ssh

It came up with 15 packages that it wanted to install however it then asked me to enter the DVD labeled "blah blah".

Does apt-get not install via repos? If so, how do I setup this functionality?
 
Old 08-07-2009, 10:11 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Did you setup Debian from DVD or CD's? I imagine yes, so if you want to install something it will ask you for the correct CD or DVD.

If you would like to have apt download the necessary packages automatically then you'll have to change the location of the 'repos' in
Code:
/etc/apt/sources.list
If I'm not mistaking you'll only have lines in there that begin with
Code:
deb cdrom:[Debian GNU/Linux 5.0.0 _Lenny_ -
Comment out those lines that indicate deb cdrom and insert the necessary lines like these below for Debian Lenny (I assume you have Lenny installed)
Code:
deb http://ftp.es.debian.org/debian/ lenny main
deb-src http://ftp.es.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
That should get you going if your connected to the internet.

It's also a good idea to first run
Code:
apt-get update
apt-get upgrade
to first update the list of packages in the repository and secondly upgrade any packages that need upgrading.

Kind regards,

Eric
 
Old 08-07-2009, 10:17 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Synaptic is a GUI front end for apt. You may find that much easier to use that apt itself.

Of course if you don't have the repositories configured for apt, they aren't configured for Synaptic either. You may find Synaptic's GUI for configuring the repositories easier than editing the file for that (or maybe not).

But once you get to actually installing software or searching package descriptions to decide what software to install, I think Synaptic is a lot easier.
 
Old 08-07-2009, 10:20 AM   #4
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
I'm using this box as a server so I do not have the GUI installed.

I prefer the CLI anyway... It reminds me of the good ol'days -- DOS
 
Old 08-07-2009, 10:26 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi Jim,

I only have servers installed also, none with a GUI. In my opinion a GUI is not necessary on a server and I too like the flashback to the good old days

Maybe a good option for you if you need to install more servers or want to reinstall, is to use the NETINST from Debian. In using that when connected to the internet at install time, all configurations are set correctly according to your location (hence the reference to 'es' in the lines I provided earlier).

Kind regards,

Eric
 
Old 08-07-2009, 11:56 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I would agree with Eric except that I wouldn't use apt-get. I would urge you to use aptitude instead for a number of reasons that you can find by searching out the relevant threads on LQ. The bunch of packages installed with ssh are its dependencies which (I guess) you hadn't had installed at the time, or else upgrades to earlier packages that have come into effect since the CD iso that you used for installation was created.
Enjoy Debian. You picked a great distro.
jdk
 
Old 08-07-2009, 02:15 PM   #7
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
How do I actually install with Aptitude?
 
Old 08-07-2009, 02:17 PM   #8
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
Eric: I wasn't using NetInst because this is on my local computer and the ISP's in Canada are too cheap and they limit bandwidth, so I was just trying to save bandwidth by downloading once and installing. I'm anticipating a lot of installs as I learn Debian.
 
Old 08-07-2009, 02:24 PM   #9
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
apatitude's install commands are pretty much the same as apt-get

aptitude update
aptitude install
aptitude safe-upgrade
aptitude full-upgrade
 
Old 08-07-2009, 02:27 PM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
I had the same problem with bandwith and download limits in Belgium, now I'm living and working in Spain and here they have a fair use policy. Needless to say that I'm very fair, what I need I get, what I don't need ....

I've never used aptitude so cannot explain how it works or how to use it. But if jdkaye (or someone else of course) could take the time to put some links or a brief 'user manual' then I also will take a look at it to compare it. I'm always game if I can improve myself or my habits.

Kind regards,

Eric
 
Old 08-07-2009, 02:38 PM   #11
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 9
Posts: 1,314

Rep: Reputation: 152Reputation: 152
aptitude's command line commands are very similar to apt-get's command line commands. It also has an ncurses interface that can be used, if that is preferred. For the ncurses interface, use your terminal, and as root, simply enter the command aptitude. The slash key (/) is search, the plus key (+) is to cue the programs you wish to be installed, the minus key (-) is to cue those programs you wish to be deleted, and the g key (g) is to go ahead and do the actions (be it install, or delete, or upgrade, as the case may be). Ctrl-T gets the menu, for other stuff you may wish to do. The command line stuff is "aptitude install ssh" (if you wish to install ssh), or "aptitude remove ssh", etc. "aptitude -h" gives a basic run-down of the commands, while "man aptitude" gives a more thorough explanation. Extra help is available at /usr/share/doc/aptitude (also install aptitude-doc-en).

Note, if you decide to go with aptitude (highly recommended), then it's best to stick exclusively with aptitude, and not mix in usage of apt-get or synaptic (such usage can screw up aptitude's dependency list, which can give erratic results).

Last edited by mark_alfred; 08-07-2009 at 02:45 PM. Reason: clarified some wording
 
Old 08-07-2009, 03:06 PM   #12
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 9
Posts: 1,314

Rep: Reputation: 152Reputation: 152
Quote:
Originally Posted by jim.thornton View Post
# apt-get install ssh

It came up with 15 packages that it wanted to install however it then asked me to enter the DVD labeled "blah blah".

Does apt-get not install via repos? If so, how do I setup this functionality?
Quote:
Originally Posted by jim.thornton
I wasn't using NetInst because this is on my local computer and the ISP's in Canada are too cheap and they limit bandwidth, so I was just trying to save bandwidth by downloading once and installing.
As per the sources.list, it'll find the latest package (unless you've made some special setup in a preferences file), and install that package, regardless of whether the repository is from a cd, dvd, http, or ftp. To see, and be able to edit the sources.list, enter the command, as root, "nano /etc/apt/sources.list". If you want it to exclusively rely upon the http repositories, not the cd or dvd repositories, then simply comment out the "deb cdrom" repositories (by entering "#", without quotes, before these repositories -- however, if you're hoping to save bandwidth, then I'm not sure why you'd wish to do this), and it will then rely on the remaining "deb http" or "deb ftp" repositories (assuming that you have some set up in your sources.list) If you have no "deb http" or "deb ftp" repositories in your sources.list, then go to http://debgen.simplylinux.ch/ to get a list of them generated for yourself.
 
Old 08-07-2009, 03:42 PM   #13
jim.thornton
Member
 
Registered: May 2007
Posts: 404

Original Poster
Rep: Reputation: 19
WOW! I can't believe how different Debian is to CentOS.

Are there any cheatsheets around. After learning CentOS the last 1.5 years it's like I have to re-learn everything.

I can't even start and stop services the way I use to:

Example:

# service sshd start
# service iptables stop

etc
 
Old 08-07-2009, 11:06 PM   #14
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

This site contains all documentation about Debian Debian Docs.

For starters and quick learning it's handy to have the Reference Card at hand. You'll find it very easy. As the page says
Quote:
The 101 most important things when using Debian GNU/Linux
Kind regards,

Eric
 
Old 08-08-2009, 12:42 AM   #15
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
aptitude help - /usr/share/aptitude/help.txt

aptitude user's manual - /usr/share/doc/aptitude/html/en/index.html

APT and Dpkg Quick Reference Sheet - /usr/share/doc/apt-dpkg-ref/apt-dpkg-ref.html

APT User's Guide - /usr/share/doc/apt-doc/guide.html/index.html

All of the above along with the ref card and debian reference can be installed from the normal debian repos.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Debian apt-get install question bluehaze Linux - Newbie 2 09-18-2008 12:38 PM
apt-get question in debian dunkyb Linux - Software 4 02-01-2005 03:10 PM
Debian apt-get question moly82 Debian 17 11-21-2004 05:38 PM
Libranet Debian apt question craigdolson Debian 3 12-17-2003 08:19 PM
Debian apt question? augamecock Linux - Distributions 2 04-07-2002 08:05 AM


All times are GMT -5. The time now is 02:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration