PDFs

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fix typo in initialization script attachment
Appd tocbox

Related pages:

  1. Create an initialization script that starts the agent, as in the sample initialization script that is an attachment to this page.

    In your script, set the JAVA and AGENT_HOME values to the paths for your system. Also configure agent options, as needed.

  2. Enable execution permissions for the script. For example, given an initialization script named db-agent, enter:

    No Format
    sudo chmod 775 db-agent
  3. Place the script in the initialization directory on your system, typically /etc/init.d. Alternatively, create a symbolic link to the script from the init.d directory to the script if you want to keep it in another location. 

  4. Add the script as a service as follows:

    • On Red Hat and most Linux Operating Systems, run these commands, replacing "db-agent" with the name of your file or symbolic link:

      No Format
      chkconfig --add db-agent 
      chkconfig --level 2345 db-agent on

       

    • On Ubuntu and Debian Operating Systems, run this command, replacing "appdcontroller" with the name of your file or symbolic link:

      No Format
      update-rc.d -f db-agent start 99 2 3 4 5 . 

      In the command: 

      • start is the argument given to the script (start, stop).
      • 99 is the start order of the script (1 = first one, 99 = last one)
      • 2 3 4 5 are the runlevels to start
      • Be sure to include the dot (.) at the end of the command.

The Database Agent now starts automatically upon machine startup.