Search This Blog

Saturday, October 13, 2012

Disable unnecessary services in Ubuntu - Boot-Up Manager

The startup scripts located in /etc/init.d are part of the bootup sequence of every Debian-like distro. Very often Ubuntu's documentation and guides have suggested - in order to deactivate init scripts - to change the permissions of the scripts in /etc/init.d, making them non-executable. This will have the following consequences:

    * You'll get an error message at boot time (to avoid it you need to patch all the scripts);
    * You are breaking the logical chain stated in debian-policy concerning runlevel configuration.

If the logic of a debian-like system boot up sequence is not very clear and familiar to you, you should not play with symlinks, permissions, etc. In order to avoid messing up your system, Boot-Up Manager will automate all of your configuration in a nice and clean graphical interface.

Boot-Up Manager is a Perl-Gtk2 application to handle runlevels configuration of any debian derivative system. With this program the user will easily start and stop boot-up scripts, without the necessity to handle thru complex links and permissions.



Boot-Up Manager has been developed and tested on Ubuntu, but as it only relies on Perl-Gtk2 libraries, it can be run on any Debian-like system.

Installation:
BUM is currently in Debian unstable/testing and in all Ubuntu's repositories. These users can just apt-get it.

apt-get install bum

Other users of debian-derivative distro's can just download the .deb package and type, from a terminal:

sudo dpkg -i bum_2.1.8-1_all.deb

Your Boot-Up Manager is placed into System->Administration menu.

Tarball
Unpack your tarball and build the program:
tar -xvzf bum-2.2.0.tar.gz
cd bum-2.2.0
./configure --prefix=/usr
make
make install

Last command must be run with root privileges. Please read the INSTALL file, for configuration options.

Disable services on boot – Ubuntu 12.04

 You can install Boot-Up Manager from Ubuntu software center to enable or disable services on start up.

sudo apt-get install bum


or
 
To keep my desktop (notebook) machine light and responsive I don’t want unnecessary services starting on boot-time. Turns out Ubuntu is surprisingly cumbersome to configure in this area (compared to RedHat / Fedora).
Two services I need on my notebook, but don’t want them to start unless I require them running are MySQL and Apache. But it looks like some services are started using upstart init daemon and it appears there is no management tool for this. Services can pe prevented from auto-starting either by renaming the config file or commenting out the start line in the config file
sudo cp /etc/init/mysql.conf /etc/init/mysql.conf.modified
sudo rm /etc/init/mysql.conf

Or comment out the following line in the config file
sudo vim /etc/init/mysql.conf
#start on runlevel [2345]

Reference: http://upstart.ubuntu.com/cookbook/#disabling-a-job-from-automatically-starting
Other services are still started using rc.d such as Apache. They can be disabled using
sudo update-rc.d -f apache2 disable
Now these services should not start up when the machine boots and can be started manually
sudo service apache2 start
sudo service mysql start