Nicolas Kovacs
2016-May-06 06:50 UTC
[CentOS] Reduce existing CentOS 7 installation to "Minimal install" - services?
Hi, When I install a CentOS server/desktop/workstation, I usually start from scratch with a barebone minimal installation, then add packages as needed. Some machines (like dedicated servers in a datacenter) come preconfigured by the hosting company, so I thought it wouldn't be a bad idea to start stripping that stuff first. Here's a little script I wrote, which essentially strips down any CentOS-7 installation to a minimal core system: https://github.com/kikinovak/centos/blob/master/7.x/scripts/00-elaguer-paquets.sh The script parses the 'minimal' package list and then just removes everything that's not on the list. Now I tried running that on an existing CentOS-7 "Web Server" installation. I ran it, rebooted... and I got dropped to a console that suggested to run journalctl. Uh oh. I'm currently catching up with systemd and its specificities, working through a bunch of online tutorials. But here's what I figured out so far. Before stripping down my system, I have to reduce services to a minimum. (On a Slackware system, which is what I'm using most of the time, that's where I would disable pretty much all services besides rc.syslog and rc.sshd.) Now what would be the simple systemd equivalent of doing that? E. g. on any CentOS installation (be it graphical, "Web Server", "File Server", whatever), strip down services to the status that they're at just after installing a "Minimal Install"? Cheers from the sunny South of France, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
Nicolas Kovacs
2016-May-06 07:33 UTC
[CentOS] Reduce existing CentOS 7 installation to "Minimal install" - services?
Le 06/05/2016 08:50, Nicolas Kovacs a ?crit :> Now what would be the simple systemd equivalent of doing that? E. g. on > any CentOS installation (be it graphical, "Web Server", "File Server", > whatever), strip down services to the status that they're at just after > installing a "Minimal Install"?PS: I gave this a spin on two sandbox machines here. One with a full GNOME GUI installation, one with a "Web Server" profile. On both, I defined "systemctl set-default multi-user.target", then I stripped the system with my script. Upon reboot, startup hangs, and in my journal, I get a lot of "Failed to parse ACL" errors. I don't know if it's related to this: https://bugzilla.redhat.com/show_bug.cgi?id=1268628>From here on, I'm clueless.Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
Nicolas Thierry-Mieg
2016-May-06 09:13 UTC
[CentOS] Reduce existing CentOS 7 installation to "Minimal install" - services?
On 05/06/2016 09:33 AM, Nicolas Kovacs wrote:> Le 06/05/2016 08:50, Nicolas Kovacs a ?crit : >> Now what would be the simple systemd equivalent of doing that? E. g. on >> any CentOS installation (be it graphical, "Web Server", "File Server", >> whatever), strip down services to the status that they're at just after >> installing a "Minimal Install"? > > PS: I gave this a spin on two sandbox machines here. One with a full > GNOME GUI installation, one with a "Web Server" profile. On both, I > defined "systemctl set-default multi-user.target", then I stripped the > system with my script. Upon reboot, startup hangs, and in my journal, I > get a lot of "Failed to parse ACL" errors. > > I don't know if it's related to this: > > https://bugzilla.redhat.com/show_bug.cgi?id=1268628 > > From here on, I'm clueless.you're probably removing too many packages, eg some key package is a dep of MINIMAL but not in MINIMAL, and "yum remove" removes it and all its dependants. Maybe add "yum install $MINIMAL" after your yum remove command. Or replace yum remove with "rpm -e" to see if and who in $SUPPRIMER has deps in MINIMAL.
Apparently Analagous Threads
- Reduce existing CentOS 7 installation to "Minimal install" - services?
- Reduce existing CentOS 7 installation to "Minimal install" - services?
- Reduce existing CentOS 7 installation to "Minimal install" - services?
- Reduce existing CentOS 7 installation to "Minimal install" - services?
- Going back to a minimal system : strange problem