Skip to main content Skip to complementary content

Configure ActiveMQ to run as daemon

Before you begin

For more instructions about the shell script, refer to the documentation available at http://activemq.apache.org/unix-shell-script.html.

Procedure

  1. Go into the directory /opt/talend/activemq.
    cd /opt/talend/activemq
  2. Create a link current to the Apache installation.
    ln -snf apache-activemq-5.14.0 current
  3. Create a global default configuration and edit the configuration.
    sudo cp apache-activemq-5.14.0/bin/env /etc/default/activemq
    sudo sed -i '~s/^ACTIVEMQ_USER=""/ACTIVEMQ_USER="ec2-user"/' /etc/default/activemq
    sudo chmod 644 /etc/default/activemq
  4. Install the init script.
    sudo ln -snf  /opt/talend/activemq/current/bin/activemq /etc/init.d/activemq
  5. Activate the init script at the system startup.
    sudo chkconfig --add activemq
    sudo chkconfig activemq on
    sudo chkconfig –list
  6. Check that your activemq is fully setup and configured to start at boot instance:
    • Reboot your EC2 instance
      • You can do that from AWS console or directly within your ssh session with the command sudo reboot.
      • Note that this will terminate your ssh session.
    • Wait a few minutes for your instance to reboot.
    • Use putty to ssh again into your instance.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!