Disable unwanted services, like Apache and Avahi

Hi Everyone,

I have a BeagleBone Black. It is running a Debian 8.2 flasher image from December 2015. I want to free resources by pruning the running config a bit, but its not clear to me how to do so.

I was able to locate one question on running web servers at:

And one Stack Overflow question on beaglebone services at (SO is such a dumping ground…):

How do I stop the following services:

  • web related services, like Apache
  • sound related services, like Avahi
  • windows managers, like LXDE

The BBB seems to be different even though its running a Debian image, so I don’t want to risk breaking the configuration. My apologies if I missed a discussion of the topic.

Thanks in advance.

systemd unless you reverted to sysv...

Mike

noloader@gmail.com wrote:

I have a BeagleBone Black. It is running a Debian 8.2 flasher image from
December 2015. I want to free resources by pruning the running config a
bit, but its not clear to me how to do so.

[snip]

How do I stop the following services:

* web related services, like Apache
* sound related services, like Avahi
* windows managers, like LXDE

The (fairly) obvious way to do this is simply to uninstall them:-

    apt-get remove apache2

(you need to be root or prefix with 'sudo').

It's easy enough, if you want them back at some later date, to
re-install them. You may have to work out the full package names to
use with 'apt-get remove'. You can either use 'apt-cache search' or
'dpkg -l | grep <name>'.

A simple script I use is:

Turn off some services

cd /etc/init.d/
mkdir -p hide
mv apache2 hide

This keeps apache from starting a boot time, but it also makes it easy to undo the change by simply moving apache2 out of the hide folder if you want it to start again.

–Mark