Amazon Linux
-
Register the WhaTap repository.
$ sudo rpm --import http://repo.whatap.io/centos/release.gpg
$ echo "[whatap]" | sudo tee /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "name=whatap packages for enterprise linux" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "baseurl=http://repo.whatap.io/centos/latest/\$basearch" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "enabled=1" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "gpgcheck=0" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null -
Install the package with the following command.
$ sudo yum install whatap-php
-
Run 'install.sh` that is the configuration script. By running this script, the PHP extension module configuration and whatap-php service daemon are registered. For more information, see the following.
Registering the PHP extension module and whatap-php service
To automatically install the PHP extension module and whatap-php service, apply the following.
$ sudo /usr/whatap/php/install.sh
Input license key
xxxxxxxxxxxxxxxx # Enter the generated access key
Input whatap.server.host
192.x.x.x # Enter the generated server IP
If the PHP extension module and whatap-php service are not recognized automatically, proceed with optional installation as the following.
If Apache commands (apachectl
, httpd
, apache2
) and PHP commands (CLI) have not been set in the default path ($PATH), or multiple PHPs have been installed and there are multiple PHP commands (php5, php70, php-zts, zts-php…), select an applied version for processing.
$ sudo /usr/whatap/php/install.sh manual
Input license key
xxxxxxxxxxxxxxxx # Enter the granted access key
Input whatap.server.host
192.x.x.x # Enter the granted server IP
Input : which apache or php-fpm ex)/usr/sbin/httpd, /usr/sbin/apache2, /usr/sbin/php-fpm ...
/usr/sbin/httpd # Enter the locations for apache and php-fpm commands
Input : which php ex) /usr/bin/php, /usr/bin/php5, /usr/bin/php70 ...
/usr/bin/php5 # Enter the location of the php command
Configuration script (install.sh)
Usage: install.sh [ commands manual|remove ]
install.sh -l <license> -s <server> -v <php version> -i <php config file> -p <process_name> [-z ]
install.sh -l <license> -s <server> -e <php command> -p <process_name> [-z ]
Commands
auto(default) Auto scan web server and php environment
manual User input web server and php environment
remove Remove php extension and service(whatap-php)
Options
-v <php version> PHP version ex) 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 -v 5.3
--php-version 5.3
-i <php config file> PHP config file
-i /etc/php.ini
--php-ini /etc/php.ini
-e <php cli> PHP CLI(command line interface)
-e /usr/bin/php
--php-exe: /usr/bin/php-fpm
-p <process name> Web server or PHP-FPM process name. for get used memory
-p httpd
-p httpd.worker, -process-name: php-fpm
-l <license> License key
-l xxxxxxxxxxxxxxx,
--license: xxxxxxxxxxxxx
-s <server> WhaTap Server Host
-s xx.xx.xx.xx/yy.yy.yy.yy,
--server xxx.xxx.xxx.xxx
-z PHP thread safe
-z ,
--php-zts
-
license
Granted access key.
-
server
Granted server IP.
-
php version
Server-installed PHP version(5.2. 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0).
-
php config file
Set the full path of php.ini installed on the server (/etc/php.ini). Proceed with the configuration of the PHP extension.
-
php cli
Using the executable command on the command line in the PHP command's full path (/usr/bin/php), you can check the basic PHP environment.
-
process name
Apache running process name (
httpd
,apache2
,httpd.worker
…) or PHP-FPM running process name (php-fpm
,php5-fpm
). It collects the memory data running. -
zts
It sets whether or not to support Zend Thread Safe.
- Install PHP version
- Install PHP cli command
$ /usr/whatap/php/install.sh -l [granted access key] -s [granted server IP] -v [PHP version x.x] -i [full path of php.ini] -p [process name]
$ /usr/whatap/php/install.sh -l xxxxx -s 1.1.1.1/2.2.2.2 -v 7.0 -i /etc/php.ini -p httpd [-z]
$ /usr/whatap/php/install.sh -l [generated access key] -s [generated server IP] -e [PHP Cli] -p [process name]
$ /usr/whatap/php/install.sh -l xxxxx -s 1.1.1.1/2.2.2.2 -e /opt/php/bin/php -p apache2
$ /usr/whatap/php/install.sh -l xxxxx -s 1.1.1.1/2.2.2.2 -e /opt/php/bin/php-fpm -p php-fpm
The setting is applied after Apache and PHP-FPM have been restarted.