Configuring services

We now have a number of applications installed on our Pi, including Apache, Tomcat, MySQL and CouchDB and their default install has them configured to start when the system boots, but we don’t need them all at startup, so we need a way to control their startup options.

For this we use a tool called rcconf, and a good description of its use, along with basic Debian service management can be found at Debian Admin

First we need to install rcconf

sudo apt-get install rcconf

Once installed you can start the application by typing

sudo rcconf

And the following screen will be displayed

You can then select which services to not start at start up, including mysql, tomcat6 and couch. However you can start them at any time with by using /etc/init.d

sudo /etc/init.d mysql start
sudo /etc/init.d tomcat6 start
sudo /etc/init.d couchdb start

To stop them at any time there is a similar command

sudo /etc/init.d mysql stop
sudo /etc/init.d tomcat6 stop
sudo /etc/init.d couchdb stop

To stop and the immediately restart, use the restart option

sudo /etc/init.d mysql restart
sudo /etc/init.d tomcat6 restart
sudo /etc/init.d couchdb restart

And to just get an update on the status, use the status option

sudo /etc/init.d mysql status
sudo /etc/init.d tomcat6 status
sudo /etc/init.d couchdb status

Your email address will not be published. Required fields are marked *