Perform PHP Agent Silent Installation

Use the APM PHP silent install mode when you want to install the PHP Agent from the command line using input variables.
apmdevops106
Use the APM PHP silent install mode when you want to install the PHP Agent from the command line using input variables.
PHP Agent Silent Installation
You require PHP root directory privileges to perform PHP Agent silent installation.
The
IntroscopeAgent.profile
file is located in the
<
PHP_Agent_Home
>/APM_IA/core/config
 directory. The location of the installation script is 
<PHP_Agent_Home>
/apmia/extensions/PhpExtension/PHPAgent
.
Follow these steps:
  1. Run the installation script with the options that are appropriate for your environment:
    ./installer.sh -appname <PHP app name> -iahost <Infrastructure agent host/IP addr> -iaport <Infrastructure agent port> -phproot <php root directory> -ext <php extension directory> -ini <php ini directory> -logdir <probe agent logs directory>
    Optional arguments:
    • -appname
      The name of  your PHP application
    • -iahost
      Host name or IP address of the server on which the Infrastructure Agent resides. The default host is
      localhost
      .
    • -iaport
      Port at which the Infrastructure Agent is listening for monitoring extensions. The default port is
      5005
      .
    • -phproot
      PHP root directory
    • -ext
      PHP extensions directory
    • -ini
      PHP ini directory
If you do not provide the PHP root directory, the PHP Agent installer automatically discovers the PHP installations on the computer. The installer then installs the PHP  agent. The installer also updates the PHP agent configuration
wily_php_agent.ini
file, which is located in the <
PHP_Agent_Home
>/apmia/extensions/PhpExtension/PHPAgent/probe directory.
Silent Installation Examples
Here are three examples to help you understand how to create the installation command for your system.
Example 1: Successful Silent Installation Using No Input Variables
You run this command from the 
<
PHP_Agent_Home
> directory:
./installer.sh
The installer starts and displays these messages during the installation process:
Installing CA PHP Probe Agent...
Looking for PHP Installations on this machine...
Installer found following PHP installations on this machine
1) /usr/bin 
Installing CA PHP Probe Agent at all discovered PHP installation(s)...
Installation Overview:
1) PHP Root : /usr/bin/php
PHP Version : 5.5.38
PHP Extensions directory : /usr/lib64/php/modules
PHP Zend Thread Safety : Disabled
PHP ini directory : /etc/php.d
Installation Status : 
Success
CA PHP Probe Agent is successfully installed on your machine.
1) To modify default CA PHP agent settings modify file 
/etc/php.d/wily_php_agent.ini
2) Restart your web server or your PHP-FPM process to see performance metrics.
Example 2: Successful Silent  Installation Using PHP Directory Input Variable
You run this command from the <
PHP_Agent_Home
> directory:
./installer.sh -phproot <
PHP_Root_Directory
>
The installer starts and displays these messages during the installation process:
Installing CA PHP Probe Agent..
.
Installation Overview:
1) PHP Root : /usr/bin/php
PHP Version : 5.5.38
PHP Extensions directory : /usr/lib64/php/modules
PHP Zend Thread Safety : Disabled
PHP ini directory : /etc/php.d
Installation Status : Success
CA PHP Probe Agent is successfully installed on your machine.
1) To modify default CA PHP agent settings modify file 
/etc/php.d/wily_php_agent.ini
2) Restart your web server or your PHP-FPM process to see performance metrics.
Example 3: Failed Silent Installation Due to Unsupported PHP Version
You run this command from the <
PHP_Agent_Home
> directory:
./installer.sh -phproot <
PHP_Root Directory
> -ext <
PHP Extension Directory
> -ini <
PHP_ini_Directory
>
-iaport <
Infrastructure agent port
>
The installer starts and displays these messages during the installation process:
Installing CA PHP Probe Agent...
1) PHP Root : /opt/php5.2/bin
PHP Version : 5.2.38 
Installation Status : Failed
Reason : Unsupported version 5.2.38 of PHP found at /opt/php5.2/bin.