Hello Everyone:
I inherited a CentOS 4.x box that appears to have been installed with the everything installation option. I would like to strip the box down of all the unnecessary apps and streamline/secure it. Unfortunately, it is a production box and it would be quite inconvenient to burn down and rebuild. Does anyone have any suggestions on how to do this conveniently with yum and still leave the box in a production condition i.e. leave it's needed services up and running?
Thanks, Ed
Ed Morrison wrote:
Hello Everyone:
I inherited a CentOS 4.x box that appears to have been installed with the everything installation option. I would like to strip the box down of all the unnecessary apps and streamline/secure it. Unfortunately, it is a production box and it would be quite inconvenient to burn down and rebuild. Does anyone have any suggestions on how to do this conveniently with yum and still leave the box in a production condition i.e. leave it's needed services up and running?
Thanks, Ed
Hi -
I've seen this in the past, and I was fortunate enough for the person to have used the 'yum group*' commands.
You might be able to get rid of software groups which might contain these pieces of software. Looking for the group* commands associated with Yum, and you might get lucky, in the same manner that I did.
Thanks! -dant
<snip>
Hi -
I've seen this in the past, and I was fortunate enough for the person to have used the 'yum group*' commands.
You might be able to get rid of software groups which might contain these pieces of software. Looking for the group* commands associated with Yum, and you might get lucky, in the same manner that I did.
Thanks! -dant
</snip>
Thanks Dan:
I thought the group commands were what I was looking for but unfortunately even though yum list the various groups:
[root@xxxxx~]# yum grouplist Setting up Group Process Setting up repositories Installed Groups: Administration Tools Compatibility Arch Support DNS Name Server Editors Engineering and Scientific GNOME Desktop Environment Games and Entertainment Graphical Internet KDE (K Desktop Environment) Legacy Network Server Mail Server MySQL Database Network Servers News Server PostgreSQL Database Printing Support Server Configuration Tools Sound and Video System Tools Text-based Internet Web Server Windows File Server X Software Development X Window System Available Groups: Authoring and Publishing Compatibility Arch Development Support Development Tools FTP Server GNOME Software Development Graphics Horde-Apps KDE Software Development Legacy Software Development Office/Productivity XFCE-4.2 drbd-heartbeat Done
It doesn't allow for the removal of those groups:
[root@xxxxx ~]# yum groupremove Engineering Scientific Setting up Group Process Setting up repositories Warning: Group Engineering does not exist. Warning: Group Scientific does not exist. No packages to remove from groups
Thoughts?
I thought the group commands were what I was looking for but unfortunately even though yum list the various groups:
You have to escape spaces in the command, or else your shell will interfere
yum groupfoo "Engineering and Scientific" or yum groupfoo Engineering\ and\ Scientific
Jim Perrin wrote:
I thought the group commands were what I was looking for but unfortunately even though yum list the various groups:
You have to escape spaces in the command, or else your shell will interfere
yum groupfoo "Engineering and Scientific" or yum groupfoo Engineering\ and\ Scientific
Thanks Jim.
Ed Morrison wrote:
Hello Everyone:
I inherited a CentOS 4.x box that appears to have been installed with the everything installation option. I would like to strip the box down of all the unnecessary apps and streamline/secure it. Unfortunately, it is a production box and it would be quite inconvenient to burn down and rebuild. Does anyone have any suggestions on how to do this conveniently with yum and still leave the box in a production condition i.e. leave it's needed services up and running?
Thanks, Ed
Ed,
I'd venture to guess, the first thing would be to identify what you don't need, stop the processes that you don't need to run, then use yum to remove the stuff, or just stop the processes and don't worry about the software being on the disk unless you really need the space. Determining what you don't really need or have to have would be the hardest task, I'm sure, but there might be some dependencies that bite you along the way as well.
Sam
On Tuesday 06 June 2006 13:23, Sam Drinkard wrote:
Ed Morrison wrote:
Hello Everyone:
I inherited a CentOS 4.x box that appears to have been installed with the everything installation option. I would like to strip the box down of all the unnecessary apps and streamline/secure it. Unfortunately, it is a production box and it would be quite inconvenient to burn down and rebuild. Does anyone have any suggestions on how to do this conveniently with yum and still leave the box in a production condition i.e. leave it's needed services up and running?
Thanks, Ed
Ed,
I'd venture to guess, the first thing would be to identify what you
don't need, stop the processes that you don't need to run, then use yum to remove the stuff, or just stop the processes and don't worry about the software being on the disk unless you really need the space. Determining what you don't really need or have to have would be the hardest task, I'm sure, but there might be some dependencies that bite you along the way as well.
Sam
Yeah try shutting down things before uninstalling. It can be risky depending on what's running on this production server.
My best advice would be to reinstall it on another machine than migrate to what you are comfortable with. Cleaning up a messy installation can be a pain. You can break things and have a hard time getting it back as specially if he customized some of the rpms used by centos.
Later, Charles
On Tue, 2006-06-06 at 13:23 -0400, Sam Drinkard wrote:
Ed Morrison wrote:
Hello Everyone:
I inherited a CentOS 4.x box that appears to have been installed with the everything installation option. I would like to strip the box down of all the unnecessary apps and streamline/secure it. Unfortunately, it is a production box and it would be quite inconvenient to burn down and rebuild. Does anyone have any suggestions on how to do this conveniently with yum and still leave the box in a production condition i.e. leave it's needed services up and running?
Thanks, Ed
Ed,
I'd venture to guess, the first thing would be to identify what you
don't need, stop the processes that you don't need to run, then use yum to remove the stuff, or just stop the processes and don't worry about the software being on the disk unless you really need the space. Determining what you don't really need or have to have would be the hardest task, I'm sure, but there might be some dependencies that bite you along the way as well.
"Strange Days Have Found Us" - Jim Morrison. Why, just recently I was involved in a thread that asked if it would be reasonable to ask yum to tell us what depends on package X. Is that what we need here?
I was thinking of posting a request for that enhancement to Yum. It should be simple to implement, based on the following, which might be useful to the OP here. The only reply was negative, sort of.
If you pick a package to remove, yum will produce a list of all the things that will be removed with it due to dependencies. When it's done, you may reply "Yes" remove that stuff or "No", don't do so.
This is exactly what we need from Yum in a new feature that protects us from the accidental erroneous entry of "Yes". Same code, cut off at the knees so that removal can never actually occur.
Regardless, the OP might make use of this. All OP has to do is remember to ... "JUST SAY NO!" *every* time. I was doing this and almost hit enter after typing "Y". It would have been a catastrophe.
Sam
HTH
William L. Maltby wrote:
On Tue, 2006-06-06 at 13:23 -0400, Sam Drinkard wrote:
Regardless, the OP might make use of this. All OP has to do is remember to ... "JUST SAY NO!" *every* time. I was doing this and almost hit enter after typing "Y". It would have been a catastrophe.
Perhaps this?
echo N | yum erase *package_name* or
echo N | yum grouperase xxxxxx
On Tue, 2006-06-06 at 14:35 -0400, Barry L. Kline wrote:
William L. Maltby wrote:
On Tue, 2006-06-06 at 13:23 -0400, Sam Drinkard wrote:
Regardless, the OP might make use of this. All OP has to do is remember to ... "JUST SAY NO!" *every* time. I was doing this and almost hit enter after typing "Y". It would have been a catastrophe.
Perhaps this?
echo N | yum erase *package_name* or
Good reminder. S/b
yes 'N' | yum remove <pkg_name> # '*' dangerous if one copies & pastes
echo N | yum grouperase xxxxxx
^^^^^^^^^^ # Try groupremove, per yum --help
<snip sig stuff>
From rom what I see, the is no "erase" fro group in yum?
HTH
On Tue, 2006-06-06 at 16:45 -0400, Barry L. Kline wrote:
William L. Maltby wrote:
On Tue, 2006-06-06 at 14:35 -0400, Barry L. Kline wrote:
From rom what I see, the is no "erase" fro group in yum?
^^^^^^^^
Speaking of brain damage, this is an artifact of Evolution not handling a body line beginning with "From". Thunderbird has an even more damaged one, involving and equal sign and number.
That's what I get for multitasking! My old brain is prone to stack overflows... You are correct, It's
yum groupremove
You have an empathetic listener here. My two remaining brain cells cause this sort of problem all the time (as you could see from the typing in my previous post). I think it's because they're trying to back each other up, knowing the other is so forgetful.
You know they say your *memory* is the 2nd thing to go... I can't remember the first! :-)
<snip>
The yum group commands (with the escapes :-)) worked their magic for me. Thank you to all helped. I do appreciate it.
Ed
On 6/6/06, Ed Morrison ed@morrisonnetworks.com wrote:
The yum group commands (with the escapes :-)) worked their magic for me. Thank you to all helped. I do appreciate it.
That's the shotgun blast to get you started. If you want to fine tune things a bit, you can do something like: 'rpm -qa | sort > starting_rpmlist'
and then go through that list removing what you don't need. If you're not sure what a package is, 'rpm -qi packagename' will give you a brief description of it. If you don't need it, use yum to remove it. Caution against a -y with yum when doing this, as occasionally a seemingly innocent package or something you don't know about might and up removing large chunks of things. Yum lets you know what it's taking, so a quick glance over the remove deps is a good idea.