This page applies to an earlier version of the AppDynamics App IQ Platform.
For documentation on the latest version, see the 4.4 Documentation.


Skip to end of metadata
Go to start of metadata

The RPM package lets you automate the installation of the PHP Agent.

RPM is supported on RHEL and CentOS. You must run the package as root.

RPM installs one agent at a time. Installation of multiple agents is not supported.

Procedure for Installing the PHP Agent Using RPM

1. Download the RPM package from the AppDynamics Download Center.

2. Set the environment variables. RPM gets its installation information from the environment, not from the command-line. See RPM Environment Variables.

3. Run the RPM package. See Run the RPM Package.

4. If there are errors, examine the log file. See RPM Log File.
See also Resolve Installation Issues for PHP

5. Restart Apache, unless you are installing an agent to monitor PHP CLI only.

RPM Environment Variables

The RPM installer attempts to determine the location of your PHP installation based on the PATH environment variable. It uses the first PHP installation that it encounters in the PATH to configure the installer. If you have installed PHP in a non-standard location, you must provide the directory of your PHP binary in APPD_PHP_PATH.

You can route data to the controller through a proxy server, but proxy servers that require a username and password are not supported.

The installer uses the default values for the other variables if you do not set them.

Set the APPD environment variables at the operating system level. You may want to use a script to set the environment variables.

Environment Variable

Description

Default

Required?

APPD_PHP_PATH

Directory containing the PHP binary

None

if your PHP binary is not in a standard location. By default the installer uses the PHP CLI binary to determine where to install the app agent.
APPD_PHP_CONFIGURATION_DIRINI directory in which to install the appdynamics_agent.ini file. Takes precedence over the APPD_PHP_PATH setting.
Directory containing your php.ini file. See information on files added to your installation in Install the PHP Agent.if your PHP binary is not in the standard location or if no PHP CLI binary is available.
APPD_PHP_EXTENSION_DIRExtensions directory in which to install the appdynamics_agent.so file. Takes precedence over the APPD_PHP_PATH setting.
Your PHP extensions directory. See information on files added to your installation in Install the PHP Agent. if your PHP binary is not in the standard location or if no PHP CLI binary is available.
APPD_PHP_VERSIONVersion of PHP that you are instrumenting. Valid formats are version numbers to one or two decimal positions; e.g. "5.4" and "5.4.21" are both valid. Takes precedence over the APPD_PHP_PATH setting.Version used by your PHP CLI binaryif no PHP CLI binary is available, along with the  APPD_PHP_CONFIGURATION_DIR and APPD_PHP_EXTENSION_DIR variables.

APPD_CONF_CONTROLLER_HOST

Controller host name

"localhost"

 

APPD_CONF_CONTROLLER_PORT

Controller port

8080

 

APPD_CONF_APP

Application name

"MyApp"

 

APPD_CONF_TIER

Tier name

Hostname of the machine running the script (same as the node name)

 

APPD_CONF_NODE

Node name

Hostname of the machine running the script

 

APPD_CONF_ACCOUNT_NAME

Account name

None

if you have an on-premise AppDynamics controller running in multi-tenant mode or if you are using the AppDynamics SaaS Controller.

APPD_CONF_ACCESS_KEY

Account key

None

if you have an on-premise AppDynamics controller running in multi-tenant mode or if you are using the AppDynamics SaaS Controller.

APPD_CONF_SSL_ENABLED

true to enable SSL communication with the controller, false otherwise

false

 

APPD_CONF_HTTP_PROXY_HOST

Hostname or IP address of the http proxy server

None

if you want to route data to the controller through a proxy server.

APPD_CONF_HTTP_PROXY_PORT

HTTP or HTTPS port of the http proxy server; must be set if APPD_CONF_HTTP_PROXY_HOST is set

None

if you want to route data to the controller through a proxy server.
APPD_CONF_HTTP_PROXY_USERusername on the http proxy serverNoneif you want to route data to the controller through a proxy server that requires a username.
APPD_CONF_HTTP_PROXY_PASSWORD_FILEpassword on the http proxy serverNoneyou want to route data to the controller through a proxy server that requires a password.
APPD_PROXY_CTRL_DIRinitial control communication directory between the agent and the Java proxyNoneif you need to start the proxy manually.
APPD_CONF_CLI_LONG_RUNNING_ENABLEDDefends PHP in long-running CLI applicationsFalseAdvisable if instrumenting long-running CLI applications. See Long-Running CLI Applications with the Suhosin Patch in Special Procedures for PHP CLI.

Run the RPM Package

To run the installer package:

rpm -i <package-name>

If you have multiple installations of PHP on one machine, run the package once for each PHP installation, each time with the appropriate APPD_PHP_PATH and APPD_CONF_NODE settings.

Using sudo to install

If you are using sudo to pass the environment variables to the installation script you can use:

sudo APPD_PHP_PATH=/opt/php rpm -i <package-name>

or

APPD_PHP_PATH=/opt/php sudo -E rpm -i <package-name>

Updating the Installation

Any changes that you made to the configuration files are preserved when you re-run the installer. RPM saves your original settings and appdynamics_agent_log4cxx.xml files with the settings from the previous installation.

RPM Log File

If the installation succeeds, no log file is generated.

If there were errors, a message displays the location of the log file generated in the /tmp directory. Examine this log file to identify the cause of the problem.

Uninstall the Agent for PHP using RPM

If you installed the agent using RPM, use RPM to uninstall it.
To uninstall:

rpm -e appdynamics-php-agent-<version>

To find the version of the package that you installed you can use:

rpm -qa | grep appdynamics-php-agent

The existing configurations are saved in a tarball in /tmp, the location of which will be displayed after the uninstall completes.

  • No labels