-   Linux - Distributions (
-   -   Distro with easy package updating via the shell? (

IceNineJon 03-03-2003 09:25 PM

Distro with easy package updating via the shell?
Hello all,
First of all, please forgive me...I'm still very much a newbie to Linux. Here's what I want to do. I need to set up a Linux box for the sole purpose of running mySQL, Apache, and PHP. The box will be used for nothing else than serving a website so I donít want to put KDE or anything like that on it (shell only).
On top of that, Iíd like the distro to be very easy to upgrade via packages. I know that most distros such as RedHat, Mandrake, etc. have graphical update programs where you can just click next and it downloads the packages that are new and installs them. Is there such a thing without the graphical interface (that I could run from the shell)? If so, what distro has the best one? Iím willing to compile mySQL, Apache, and PHP from source and update it from source but I donít want to spend all my time updating all the packages in the OS every time a package is updated for security reasons (I want to spend most of my time on the actual website!).
Any suggestions?

Thanks everyone!,

rshaw 03-03-2003 09:44 PM


IceNineJon 03-03-2003 09:49 PM

rshaw, thanks for your quick reply!

Can anyone elaborate on Debian's system when it comes to upgrading? For example, can I just run a command and it goes and finds updated packages, downloads them and their dependencies, and installs them? Also, something I've found on a lot of distros is that people don't update the packages as quickly as they update the source (it sometimes takes several weeks for new packages)...I assume that since Debian is so widely used, this shouldn't be an issue?


rshaw 03-03-2003 10:25 PM

there is three different levels of debian, stable, unstable, and testing. stable evolves very slowly, the deb's prize rock solid stability over latest releases. which is a good thing(tm) for servers. to install a package it's -> apt-get install <packagename> it will retrieve the package plus any other packages need for <packagename> to run properly. updates and upgrades work basically the same way. your etc/apt/sources.list dictates which servers and directories on the servers to pull the packages from. if your running the stable release, you can modifiy the sources list to avoid updates from the unstable branch etc. there is a good apt howto here:

IceNineJon 03-03-2003 10:36 PM

Okay, sorry if I'm being redundent but I want to make sure I understand before I commit my time. Let's say that a vulnerability with openssh was just discovered. I can run apt-get and it will automatically download and install the new version of openssh which has the security fix? About how long after security flaws are discovered are new packages released?

I'm almost sold!,

rshaw 03-03-2003 10:54 PM

security flaws in the stable branch are handled quickly, they claim most fixed within 48 hours. you'll need to add the line -> deb woody/updates main contrib non-free <- to your etc/apt/sources.list to stay current with security updates via apt-get

cuckoopint 03-03-2003 11:06 PM

to elaborate, once you edit your sources.list (as rshaw explained),
you run:

apt-get update    syncs your local db, with the "newest one"
apt-get dist-upgrade    or apt-get upgrade  - both install any new upgrades. dist-upgrade is most likely preffered - see man page

keeping stuff up-to-date is nice and tidy with Debian.

IceNineJon 03-03-2003 11:17 PM

So I could theoretically put that command in a cron job and it would automatically update every week or something without me having to mess around with it? That would be great!

Thanks for all your help!

MasterC 03-04-2003 12:29 AM

Not to change the subject, but...

Mandrake's urpmi can be run from the command line. No tools needed, you update a mirror list, and fire off:
urpmi packagename
It goes, gets it, and installs it for you. Very similar to apt-get only it's Mandrake and doesn't throw a fit about new packages ;)


IceNineJon 03-04-2003 12:55 AM

I have a Mandrake box which I haven't really touched (I installed it and haven't had time to mess with it) so I give this a whirl and it looks good (although upon issuing "urpmi --auto-select" it reported that I have >450 megs to download of updates which seems excessive?).

Does anyone know if Mandrake updates their packages more often than Debian or vice-versa?

Thanks for the suggestion!

MasterC 03-04-2003 01:07 AM

Where does everyone get this --auto-select thing from? I issue:
urpmi packagename
And it downloads and installs package for me. I've never used an --auto-select switch, but seen 2 posts with it lately, how odd...

Anyway, they update their packages quite often. I get the emails when they do it, and I probably get about 10 a day. I don't update them all, but it at least give you an idea of how often. They fix bugs, add features, plug security holes, you know, the usual.

450megs though, isn't that much. Depends on what you are updating really, if it's everything, that rather small actually.


IceNineJon 03-04-2003 01:10 AM

I read the --auto-select command off of a website. I believe what it does it connects to the FTP/HTTP update server and determines what packages are out of date on your machine and downloads the new ones from that server. This is what I'd ideally want since I don't want to have to sit there and update individual packages (I just want everything on the machine to be current).

I guess you could compare it to Windoze Update (dare I say it!) which detects when updates for Windoze are available and downloads them for you.

MasterC 03-04-2003 01:17 AM

Oh wow, that's pretty sweet if that's what it does! I'll look into it a bit more..

Thanks for the info


cuckoopint 03-04-2003 01:34 AM


Originally posted by IceNineJon
I believe what it does it connects to the FTP/HTTP update server and determines what packages are out of date on your machine and downloads the new ones from that server. This is what I'd ideally want since I don't want to have to sit there and update individual packages (I just want everything on the machine to be current).

yep, that's what apt-get update; apt-get dist-upgrade does.

here's the dist-upgrade vs. upgrade difference (apt-get man page)


              dist-upgrade, in addition to performing the function of upgrade, also  intelligently  handles changing
dependencies with new versions of packages; apt-get has  a  "smart"  conflict  resolution system,  and it will
attempt to upgrade the most important packages at the expense of less important ones  if  necessary.

and if you're thinking of a cron job, this might be useful:


              Automatic  yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an
undesirable situation, such  as changing  a held package or removing an essential package occurs then
 apt-get will abort.  Configuration Item: APT::Get::Assume-Yes.

eggs 03-04-2003 03:04 AM

I have found Debian to be much more stable than Mandrake (good for a server). Not to mention much smaller. After only a base install its 98 MB I believe... so you could get away with having a lot of space left for more important things, especially if you leave out the development stuff (which probably shouldn't be on a server anyway, specific situations ignored)

All times are GMT -5. The time now is 12:22 AM.