# Using the Server

This chapter will familiarise you with how to use the Apache ActiveMQ Artemis server.

We'll show where it is, how to start and stop it, and we'll describe the directory layout and what all the files are and what they do.

For the remainder of this chapter when we talk about the Apache ActiveMQ Artemis server we mean the Apache ActiveMQ Artemis standalone server, in its default configuration with a JMS Service enabled.

This document will refer to the full path of the directory where the ActiveMQ distribution has been extracted to as ${ARTEMIS_HOME} directory. ## Creating a Broker Instance A broker instance is the directory containing all the configuration and runtime data, such as logs and data files, associated with a broker process. It is recommended that you do not create the instance directory under ${ARTEMIS_HOME}. This separation is encouraged so that you can more easily upgrade when the next version of ActiveMQ Artemis is released.

On Unix systems, it is a common convention to store this kind of runtime data under the /var/lib directory. For example, to create an instance at '/var/lib/mybroker', run the following commands in your command line shell:

cd /var/lib

## Bootstrap File

The stand-alone server is basically a set of POJOs which are instantiated by Airline commands.

The bootstrap file is very simple. Let's take a look at an example:

<broker xmlns="http://activemq.org/schema">

<file:core configuration="\${activemq.home}/config/stand-alone/non-clustered/broker.xml"></core>

<basic-security/>

</broker>

• core - Instantiates a core server using the configuration file from the configuration attribute. This is the main broker POJO necessary to do all the real messaging work. In addition all JMS objects such as: Queues, Topics and ConnectionFactory instances are configured here.

## The main configuration file.

The configuration for the Apache ActiveMQ Artemis core server is contained in broker.xml. This is what the FileConfiguration bean uses to configure the messaging server.

There are many attributes which you can configure Apache ActiveMQ Artemis. In most cases the defaults will do fine, in fact every attribute can be defaulted which means a file with a single empty configuration element is a valid configuration file. The different configuration will be explained throughout the manual or you can refer to the configuration reference here.