AppDynamics Application Intelligence Platform
3.9.x Documentation
1. Untar the tarball containing the agent into a directory. The directory should be owned by the same user that runs Apache or php-fpm. AppDynamics recommends /opt/appdynamics/php-agent.
This documentation refers to this directory as the php_agent_install directory or $<php_agent_install>.
cd $<php_agent_install> tar -xvjf appdynamics-php-agent-x64-linux.tar.bz2
2. Set the following permissions on these subdirectories of your php_agent_install directory.
logs - Make the logs directory readable/writable/executable by all.
chmod 777 <php_agent_install>/logs
php - Make every directory that leads to the PHP agent logs directory readable and executable by all and writable by the directory owner.
chmod -R 755 <path_to_php_agent_install_logs>
3. Run the installation script using the following syntax. Each PHP instance is a single node.
$<php_agent_install>/install.sh [-s] [-a=<account_name>@<account_key>] [--http-proxy-host=<proxy_host>] [--http-proxy-port=<proxy_port>] [-e <php_ext_dir>] [-i <php_ini_dir>] [-p <php_binary_dir>] [-v <php_version>] <controller-host> <controller-port> <app_name> <tier_name> <node_name>
Set the http-proxy-host and http-proxy-port to route data to the controller through a proxy server. The http-proxy-host is the host name or IP address of the proxy server. The http-proxy-port is the proxy server's HTTP or HTTPS port, whichever you are using. If you set the http-proxy-host you must set the http-proxy-port as well.
Use the http-proxy-user and http-proxy-port if the proxy server requires credentials.
By default the installer uses the PHP CLI binary to determine where to install the PHP Agent. This works for most PHP environments.
If you are instrumenting a different PHP, use the -e option to indicate the correct extensions directory for the appdynamics_agent.so file and the -i option for the correct ini directory for the appdynamics_agent.ini file. If you are installing in an environment where there is no PHP CLI binary available, you must use the -v option as well as the -e, and -i options.
If all options are used, the -e, -i and -v options have precedence over the -p option.
Installing as root
On some systems, such as Ubuntu, it is necessary to perform the installation as root. Verify whether you need to install as root in your environment.
You can use sudo to do this. See http://linux.about.com/od/commands/l/blcmdl8_sudo.htm.
4. Restart the web server, unless you are installing an agent to monitor PHP-CLI only.
If you are running multiple installations of Apache on the same machine, run install.sh once for each Apache, each time with the appropriate node, php_ini dir and php_ext dir options. In this case see also Run the PHP Proxy Daemon Manually.
See Files Added to Your Installation for information about the default installation directories.
If your installation failed, see Resolve Installation Issues for PHP.
Here is a sample command to install the agent on a single-tenant controller:
install.sh controller 8090 myApp myTier myNode
Here is a sample command to install the agent using SSL on a multi-tenant on-premise controller:
install.sh -s -a=PHPCust1000@9456d222-66e2-54d2-f8aabbc66c4e controller1.appdynamics.com 8818 myApp myTier myNode
Here is a sample command to route traffic to the controller through a proxy server.
install.sh --http-proxy-host=myproxyhost --http-proxy-port=8099 controller 8090 myApp myTier myNode
Tip: The installer overwrites your existing settings in the AppDynamics PHP Agent ini fragment, found in appdynamics-php-agent/php/conf/appdyanmics_agent.ini. If you configured properties in that file, you need to update them every time you run the installer. It does not overwrite the php.ini file.
If the startup does not succeed, file a support ticket.
If you installed the agent using install.sh, use install.sh to uninstall it.
To uninstall:
1. Shut down the web server.
2. From the PHP agent install directory, run the PHP installer with the -u option:
install.sh -u
3. Delete the <php_agent_install> directory.
2 Comments
Unknown User (steve@devopsguys.com)
PHP agent installation has a dependency on php-cli being installed.
yum install php-cli resolves the issue!
Unknown User (ldavidson@appdynamics.com)
That will work.
Also "apt-get install php5-cli" on Ubuntu.