HomeDocumentation > Installing and running > Running Geronimo > Running Geronimo as a service > Running Geronimo as a Linux service

This article will show you how to configure Apache Geronimo server to run as a Linux service.

Software Prerequisites

To run Apache Geronimo as a Linux service, you need a Geronimo server installed on Linux. Follow the instructions for installing Apache Geronimo in Quick Start. Throughout the rest of the article the installation directory will be referred to as <geronimo_home>.

Installing a Geronimo service

Make sure that you log on the system as a root user. Then we need a Linux Shell script gserviceReg.sh to run the Geronimo server as a serive. This file is by default located in <geronimo_home>/bin.

You can now run Geronimo as a service from a command line, by running the following command from <geronimo_home>/bin:

./gserviceReg.sh add <service_name>

where <service_name> is the name you specify for a service. You can create multiple service names for the server.

After you install the Geronimo server as a service, the service will be started automatically when the operating system is started next time.

Managing the installed Geronimo service

Starting, stopping or restarting a service

You can start the service by running this comand:

<service_name> start

Similarly, stop the service b running this command:

<service_name> stop

Restart the service b running this command:

<service_name> restart

where <service_name> is the name of the service.

Checking the status of a service

To find the status of a Geronimo service, run the following command:

<service_name> status

where <service_name> is the name of the service.

Finding the mapping directory of a service

If you have installed multiple services on the server, you might want to find the mapping directory for each service. Run the following command to find the mapping directory:

./gserviceReg.sh list <service_name>

where <service_name> is the name of the service.

Removing a Geronimo service

To remove the Apache Geronimo service, run the following command:

./gserviceReg.sh del <service_name>

where <service_name> is the name of the service you want to remove.