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.
Enable execution permissions for the script. For example, given an initialization script named db-agent, enter:
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.
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:
On Ubuntu and Debian Operating Systems, run this command, replacing "appdcontroller" with the name of your file or symbolic link:
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.