PDA

View Full Version : SLES 12 SP3 "Strip" an existing SLES 12.3 server into pure SSH version



AAEBHolding
15-Aug-2018, 08:15
We are using an SLES 12.3 VM running on a XenServer 7.5 as a database server. It has been unfortunately installed with all graphical components like GNOME, Firefox and others..

Due to the fact we connect for maintenance only via ssh to this server we would like to remove all unnecessary GUI components which are each time updated even never needed so the server is reachable only via pure SSH.

Is there on an already installed server a simple way or isn't it possible anymore? Running the server in runlevel 3 doesn't really solve my problem because the packages remain on the server and are kept in the update process.

When I try - for example - to remove with yast the package mozilla I receive lot of dependencies issues and I don't continue because I simple don't know what I would do.

smflood
15-Aug-2018, 12:27
On 15/08/18 08:24, AAEBHolding wrote:

> We are using an SLES 12.3 VM running on a XenServer 7.5 as a database
> server. It has been unfortunately installed with all graphical
> components like GNOME, Firefox and others..
>
> Due to the fact we connect for maintenance only via ssh to this server
> we would like to remove all unnecessary GUI components which are each
> time updated even never needed so the server is reachable only via pure
> SSH.
>
> Is there on an already installed server a simple way or isn't it
> possible anymore? Running the server in runlevel 3 doesn't really solve
> my problem because the packages remain on the server and are kept in the
> update process.
>
> When I try - for example - to remove with yast the package mozilla I
> receive lot of dependencies issues and I don't continue because I simple
> don't know what I would do.

Yes some mozilla packages have their fingers in many pies!

If you do "zypper se -i -t pattern" you will get a list of the patterns
available to be installed on your server, those with "i+" are installed
(although you may have some packages from other patterns, just not all
packages to qualify a pattern to be installed). If you're running with a
GUI installed but no longer used the installed patterns will likely
include GNOME (or possibly KDE) and X Window System. These can be
removed via "zypper rm -t pattern <name>".

It sounds like what you're ultimately after is a JeOS (Just enough OS)
system with a few additions but that's easier to do at install than
after, though removing unwanted patterns and packages will get you
closer - as an indication base is the minimum. You can see a list of
packages installed via a pattern using "zypper pattern-info <name>".

HTH.
--
Simon
SUSE Knowledge Partner

------------------------------------------------------------------------
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
------------------------------------------------------------------------

malcolmlewis
15-Aug-2018, 12:29
Hi
You need to remove by 'pattern' rather than package.... So via YaST (ncurses) or probably better by zypper;



zypper se -i -t pattern
zypper if -t pattern gnome_basic
zypper -vvv rm -t pattern gnome_basic


I would suggest remove a pattern one at a time, also consider when updating to use --no-recommends to avoid additional packages. You can also look at adding locks (zypper al) to packages/patterns so they don't get installed.

ab
15-Aug-2018, 15:40
I cannot add much to what the other shave suggested, other than perhaps
the steps I would take to do this:

1. Backup the box, preferably when offline to avoid any open file issues
(I do not know what you have on the box, so those may not matter).
2. Oft-missed: test (restore) the backup somewhere isolated. Be sure it
works since a broken backup is no backup at all.
3. Do the steps others mentioned; you will probably have it uninstalling
a lot of stuff, but that's the point, right? The GUI patterns should not
have software which is relied-upon by lower-level stuff, so the things
removed may be things like LibreOffice, which is not technically part of
the X11 or Gnome pattern, but which depend on it, and also need to go.
Things like 'bash' and 'kernel' and 'glibc' should not show up, and if
they do you s should stop, or be prepared to use that backup.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.