LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Distro with easy package updating via the shell? (https://www.linuxquestions.org/questions/linux-distributions-5/distro-with-easy-package-updating-via-the-shell-48130/)

IceNineJon 03-03-2003 08: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!,
Jon

rshaw 03-03-2003 08:44 PM

debian

IceNineJon 03-03-2003 08: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?

Thanks!

rshaw 03-03-2003 09: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:
http://www.debian.org/doc/manuals/ap....html#contents

IceNineJon 03-03-2003 09: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!,
Jon

rshaw 03-03-2003 09: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 http://security.debian.org/ 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 10:06 PM

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

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 10: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-03-2003 11:29 PM

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 ;)

Cool

IceNineJon 03-03-2003 11:55 PM

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 12: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.

Cool

IceNineJon 03-04-2003 12: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 12: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

Cool

cuckoopint 03-04-2003 12:34 AM

Quote:

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)

Code:

      dist-upgrade
              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:

Code:

      --assume-yes
              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 02: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)

IceNineJon 03-04-2003 02:36 AM

Okay, I just finished running "urpmi --auto-select" and it worked flawlessly! Hurray for a Mandrake mirror on Internet2 (I’m on a uni-connection with Internet2)! Now here’s a question...now that I’ve updated all these packages, do I have to reboot or anything?

MasterC 03-04-2003 02:41 AM

Not normally. Anything you've updated should take place immediately. Rebooting in general is for hardware changes, or to test your init script for errors during bootup (you can run them without rebooting, however most people prefer to reboot to watch them).

I really don't want you 'not' to try Debian now, it's a great distro and might have more to offer you than Mandrake does/did. At the very least you could slide it along side your distro(s) and check it out.

Cool

IceNineJon 03-04-2003 02:48 AM

Okay, I SSH into my box...so how exactly would it be able to make immediate changes to let's say an SSH package and still be able to keep me connected? That's amazing!

As for Debian, yes, I'm definitely going to check it out. The Mandrake box I have is being used for something else anyway so I just wanted to check out "urpmi" on it :)

MasterC 03-04-2003 03:15 AM

Good deal. :) As for the ssh thing, well, that might just be pure luck, a second version installed somewhere else, lag, and/or a combo of those :) I don't really have a good answer on that... ;)

I hope you find Debian as good as everyone who uses thinks it is. The installer isn't the best in the world, but you only use that once right? Give it a whirl, I think you'll like it.

Cool

hanzerik 03-04-2003 07:04 AM

I see you have: "Distribution: Red Hat 7.3" as your distro.
I have never had any problems with up2date on RH7.3.

up2date -uv

eggs 03-04-2003 08:06 PM

Quote:

Originally posted by IceNineJon
Okay, I SSH into my box...so how exactly would it be able to make immediate changes to let's say an SSH package and still be able to keep me connected? That's amazing!

As for Debian, yes, I'm definitely going to check it out. The Mandrake box I have is being used for something else anyway so I just wanted to check out "urpmi" on it :)

Probably because the old version was running in memory and the new version won't take affect until you reload it. Like I can run mozilla, and update it in the background and the old version keeps running. When I close it and open it again is the new version... although I'm sure this could cause a problem hehe

IceNineJon 03-04-2003 08:18 PM

So in the case of the SSH server, how would I restart it without getting disconnected? I guess it's not the end of the world if I get disconnected as long as it restarts successfully :).

IceNineJon 03-04-2003 08:21 PM

Quote:

Originally posted by rshaw
there is three different levels of debian, stable, unstable, and testing.
Here's another question for you about Debian. One of the frustrations I had for RedHat is that new RPMs that were not mission critical seemed to take forever to be released. For example, when the new version of KDE was released, it wasn't until RedHat 7.3 came out that you could get it for RedHat (at least officially from RedHat). RedHat's up2date did not list the new version. I understand that they do this because they want to ensure that it's stable, etc. But for the unstable/testing level of Debian, would brand new packages such as a brand new release of KDE be included to automatically install?

cuckoopint 03-04-2003 08:33 PM

Quote:

Originally posted by IceNineJon
But for the unstable/testing level of Debian, would brand new packages such as a brand new release of KDE be included to automatically install?
Not exactly.

http://www.debian.org/devel/testing

Quote:

An important thing to note, both for regular users and the developers of testing, is that security updates for testing are not managed by the security team.
....
The "testing" distribution is an automatically generated distribution. It is generated from the "unstable" distribution by a set of scripts which attempt to move over packages which are reasonably likely to lack important bugs. They do so in a way that ensures that dependencies of other packages in testing are always satisfiable.
and the "unstable" is not 'automatically' available...a package actually has to qualify to be a debian package (ie. unstable). So "not everything goes".

cuckoopint 03-04-2003 08:36 PM

one good example, is that I believe Debian requires a package to be built on all supported architectures...something that may not be done on just-released programs (if ever).

IceNineJon 03-04-2003 08:38 PM

Okay, so this is separate from my web server box obviously but what would be a good distro where I could run bleeding edge stuff and update it automatically (with fairly rapid releases)?

cuckoopint 03-04-2003 08:46 PM

you may have to try some of the less known distros - do a google search.

Quote:

bleeding edge stuff and update it automatically
this may be contradicting...often bleeding edge implies having to do a lot more work (dependencies, etc.) - which goes against automatic. Also, if you really want bleeding edge, maybe you can setup a minimal base (slack or debian) and then you'll have to work out of cvs for most other packages - you can play around with scripting, but there will still be manual labor. ;)

eggs 03-05-2003 03:15 AM

I'd say Gentoo comes the closest to having bleeding edge programs and automatic updateing, but I've had a problem with an update breaking everything (last time I used it emerge no longer worked which made it kinda hard to do things :p), but its still a young distro and I would imagine the problems will start to work themselves out as it matures.


All times are GMT -5. The time now is 05:37 PM.