Wednesday, October 16, 2019

php: Enable PHP7 yum installation on CentOS7

When I tried to use phpunit 8.4, I was required to use PHP7.
Since I am using CentOS7, I did needed to following method to install/setting up PHP7.

Found a really helpful site below:
How to Install PHP 7.3 in CentOS 7

# After installed phpunit 8.4, that says it requires PHP7.
[root@08-00-27-2C-51-D6 ~]# php phpunit-8.4.phar --version
PHPUnit 8.4.1 by Sebastian Bergmann and contributors.

This version of PHPUnit is supported on PHP 7.2, PHP 7.3, and PHP 7.4.
You are using PHP 5.4.16 (/usr/bin/php).


# Enable EPEL.
[root@08-00-27-2C-51-D6 ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Loaded plugins: fastestmirror
epel-release-latest-7.noarch.rpm                                                                 |  15 kB  00:00:00
Examining /var/tmp/yum-root-RVhXhS/epel-release-latest-7.noarch.rpm: epel-release-7-12.noarch
Marking /var/tmp/yum-root-RVhXhS/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-12 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                    Arch                 Version              Repository                                   Size
========================================================================================================================
Installing:
 epel-release               noarch               7-12                 /epel-release-latest-7.noarch                24 k

Transaction Summary
========================================================================================================================
Install  1 Package

Total size: 24 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-12.noarch                                                                             1/1
  Verifying  : epel-release-7-12.noarch                                                                             1/1

Installed:
  epel-release.noarch 0:7-12

Complete!
# Enable REMI as well.
[root@08-00-27-2C-51-D6 ~]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Loaded plugins: fastestmirror
remi-release-7.rpm                                                                               |  17 kB  00:00:00
Examining /var/tmp/yum-root-RVhXhS/remi-release-7.rpm: remi-release-7.7-1.el7.remi.noarch
Marking /var/tmp/yum-root-RVhXhS/remi-release-7.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package remi-release.noarch 0:7.7-1.el7.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                     Arch                  Version                         Repository                      Size
========================================================================================================================
Installing:
 remi-release                noarch                7.7-1.el7.remi                  /remi-release-7                 23 k

Transaction Summary
========================================================================================================================
Install  1 Package

Total size: 23 k
Installed size: 23 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : remi-release-7.7-1.el7.remi.noarch                                                                   1/1
  Verifying  : remi-release-7.7-1.el7.remi.noarch                                                                   1/1

Installed:
  remi-release.noarch 0:7.7-1.el7.remi

Complete!



# Install yum-utils.
[root@08-00-27-2C-51-D6 ~]# yum install yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                             | 6.0 kB  00:00:00
 * base: ftp.jaist.ac.jp
 * epel: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.jaist.ac.jp
epel                                                                                             | 5.3 kB  00:00:00
remi-safe                                                                                        | 3.0 kB  00:00:00
(1/4): epel/x86_64/group_gz                                                                      |  88 kB  00:00:00
(2/4): epel/x86_64/updateinfo                                                                    | 1.0 MB  00:00:03
(3/4): epel/x86_64/primary_db                                                                    | 6.9 MB  00:00:03
(4/4): remi-safe/primary_db                                                                      | 1.6 MB  00:00:09
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-52.el7 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-52.el7.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-52.el7.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7_2.3 will be installed
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
--> Running transaction check
---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                         Arch                    Version                            Repository             Size
========================================================================================================================
Installing:
 yum-utils                       noarch                  1.1.31-52.el7                      base                  121 k
Installing for dependencies:
 libxml2-python                  x86_64                  2.9.1-6.el7_2.3                    base                  247 k
 python-chardet                  noarch                  2.2.1-3.el7                        base                  227 k
 python-kitchen                  noarch                  1.1.1-5.el7                        base                  267 k

Transaction Summary
========================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 862 k
Installed size: 4.3 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): yum-utils-1.1.31-52.el7.noarch.rpm                                                        | 121 kB  00:00:00
(2/4): python-kitchen-1.1.1-5.el7.noarch.rpm                                                     | 267 kB  00:00:00
(3/4): python-chardet-2.2.1-3.el7.noarch.rpm                                                     | 227 kB  00:00:00
(4/4): libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm                                                 | 247 kB  00:00:01
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   565 kB/s | 862 kB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-chardet-2.2.1-3.el7.noarch                                                                    1/4
  Installing : python-kitchen-1.1.1-5.el7.noarch                                                                    2/4
  Installing : libxml2-python-2.9.1-6.el7_2.3.x86_64                                                                3/4
  Installing : yum-utils-1.1.31-52.el7.noarch                                                                       4/4
  Verifying  : python-kitchen-1.1.1-5.el7.noarch                                                                    1/4
  Verifying  : yum-utils-1.1.31-52.el7.noarch                                                                       2/4
  Verifying  : libxml2-python-2.9.1-6.el7_2.3.x86_64                                                                3/4
  Verifying  : python-chardet-2.2.1-3.el7.noarch                                                                    4/4

Installed:
  yum-utils.noarch 0:1.1.31-52.el7

Dependency Installed:
  libxml2-python.x86_64 0:2.9.1-6.el7_2.3   python-chardet.noarch 0:2.2.1-3.el7   python-kitchen.noarch 0:1.1.1-5.el7

Complete!


# Enable PHP7 installation with yum-config-manager.
[root@08-00-27-2C-51-D6 ~]# yum-config-manager --enable remi-php70
Loaded plugins: fastestmirror
=================================================== repo: remi-php70 ===================================================
[remi-php70]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php70
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = 1
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php70/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php70/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php70/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist = http://cdn.remirepo.net/enterprise/7/php70/mirror
mirrorlist_expire = 86400
name = Remi's PHP 7.0 RPM repository for Enterprise Linux 7 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php70
pkgdir = /var/cache/yum/x86_64/7/remi-php70/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = remi-php70
ui_repoid_vars = releasever,
   basearch
username =



[root@08-00-27-2C-51-D6 ~]# yum-config-manager --enable remi-php71

[root@08-00-27-2C-51-D6 ~]# yum-config-manager --enable remi-php72

[root@08-00-27-2C-51-D6 ~]# yum-config-manager --enable remi-php73


# Install php.
[root@08-00-27-2C-51-D6 ~]# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * epel: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * remi-php70: ftp.riken.jp
 * remi-php71: ftp.riken.jp
 * remi-php72: ftp.riken.jp
 * remi-php73: ftp.riken.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.jaist.ac.jp
remi-php70                                                                                       | 3.0 kB  00:00:00
remi-php71                                                                                       | 3.0 kB  00:00:00
remi-php72                                                                                       | 3.0 kB  00:00:00
remi-php73                                                                                       | 3.0 kB  00:00:00
(1/4): remi-php73/primary_db                                                                     | 206 kB  00:00:02
(2/4): remi-php72/primary_db                                                                     | 228 kB  00:00:02
(3/4): remi-php70/primary_db                                                                     | 231 kB  00:00:02
(4/4): remi-php71/primary_db                                                                     | 242 kB  00:00:02
Package php-mcrypt is obsoleted by php-pecl-mcrypt, trying to install php-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64 instead
Package php-mysql is obsoleted by php-mysqlnd, trying to install php-mysqlnd-7.3.10-1.el7.remi.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-46.el7 will be updated
---> Package php.x86_64 0:7.3.10-1.el7.remi will be an update
--> Processing Dependency: libargon2.so.0()(64bit) for package: php-7.3.10-1.el7.remi.x86_64
---> Package php-cli.x86_64 0:5.4.16-46.el7 will be updated
---> Package php-cli.x86_64 0:7.3.10-1.el7.remi will be an update
---> Package php-common.x86_64 0:5.4.16-46.el7 will be updated
--> Processing Dependency: php-json(x86-64) = 7.3.10-1.el7.remi for package: php-common-7.3.10-1.el7.remi.x86_64
---> Package php-common.x86_64 0:7.3.10-1.el7.remi will be an update
---> Package php-gd.x86_64 0:7.3.10-1.el7.remi will be installed
--> Processing Dependency: gd-last(x86-64) >= 2.1.1 for package: php-gd-7.3.10-1.el7.remi.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: php-gd-7.3.10-1.el7.remi.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-7.3.10-1.el7.remi.x86_64
--> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-7.3.10-1.el7.remi.x86_64
--> Processing Dependency: libjpeg.so.62()(64bit) for package: php-gd-7.3.10-1.el7.remi.x86_64
---> Package php-ldap.x86_64 0:7.3.10-1.el7.remi will be installed
---> Package php-mysqlnd.x86_64 0:7.3.10-1.el7.remi will be installed
--> Processing Dependency: php-pdo(x86-64) = 7.3.10-1.el7.remi for package: php-mysqlnd-7.3.10-1.el7.remi.x86_64
---> Package php-pecl-mcrypt.x86_64 0:1.0.3-1.el7.remi.7.3 will be installed
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64
---> Package php-pecl-zip.x86_64 0:1.15.5-1.el7.remi.7.3 will be installed
--> Processing Dependency: libzip5(x86-64) >= 1.5.2 for package: php-pecl-zip-1.15.5-1.el7.remi.7.3.x86_64
--> Processing Dependency: libzip.so.5()(64bit) for package: php-pecl-zip-1.15.5-1.el7.remi.7.3.x86_64
--> Running transaction check
---> Package gd-last.x86_64 0:2.2.5-8.el7.remi will be installed
--> Processing Dependency: libtiff.so.5(LIBTIFF_4.0)(64bit) for package: gd-last-2.2.5-8.el7.remi.x86_64
--> Processing Dependency: libfontconfig.so.1()(64bit) for package: gd-last-2.2.5-8.el7.remi.x86_64
--> Processing Dependency: libtiff.so.5()(64bit) for package: gd-last-2.2.5-8.el7.remi.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: gd-last-2.2.5-8.el7.remi.x86_64
---> Package libX11.x86_64 0:1.6.7-2.el7 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.el7.x86_64
---> Package libXpm.x86_64 0:3.5.12-1.el7 will be installed
---> Package libargon2.x86_64 0:20161029-3.el7 will be installed
---> Package libjpeg-turbo.x86_64 0:1.2.90-8.el7 will be installed
---> Package libmcrypt.x86_64 0:2.5.8-13.el7 will be installed
---> Package libzip5.x86_64 0:1.5.2-1.el7.remi will be installed
---> Package php-json.x86_64 0:7.3.10-1.el7.remi will be installed
---> Package php-pdo.x86_64 0:7.3.10-1.el7.remi will be installed
--> Running transaction check
---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64
---> Package libX11-common.noarch 0:1.6.7-2.el7 will be installed
---> Package libtiff.x86_64 0:4.0.3-32.el7 will be installed
--> Processing Dependency: libjbig.so.2.0()(64bit) for package: libtiff-4.0.3-32.el7.x86_64
---> Package libwebp7.x86_64 0:1.0.2-1.el7.remi will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.13-1.el7.x86_64
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
---> Package jbigkit-libs.x86_64 0:2.0-11.el7 will be installed
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                             Arch               Version                            Repository              Size
========================================================================================================================
Installing:
 php-gd                              x86_64             7.3.10-1.el7.remi                  remi-php73              80 k
 php-ldap                            x86_64             7.3.10-1.el7.remi                  remi-php73              83 k
 php-mysqlnd                         x86_64             7.3.10-1.el7.remi                  remi-php73             234 k
 php-pecl-mcrypt                     x86_64             1.0.3-1.el7.remi.7.3               remi-php73              30 k
 php-pecl-zip                        x86_64             1.15.5-1.el7.remi.7.3              remi-php73              51 k
Updating:
 php                                 x86_64             7.3.10-1.el7.remi                  remi-php73             3.2 M
 php-cli                             x86_64             7.3.10-1.el7.remi                  remi-php73             4.9 M
 php-common                          x86_64             7.3.10-1.el7.remi                  remi-php73             1.1 M
Installing for dependencies:
 dejavu-fonts-common                 noarch             2.33-6.el7                         base                    64 k
 dejavu-sans-fonts                   noarch             2.33-6.el7                         base                   1.4 M
 fontconfig                          x86_64             2.13.0-4.3.el7                     base                   254 k
 fontpackages-filesystem             noarch             1.44-8.el7                         base                   9.9 k
 gd-last                             x86_64             2.2.5-8.el7.remi                   remi-safe              134 k
 jbigkit-libs                        x86_64             2.0-11.el7                         base                    46 k
 libX11                              x86_64             1.6.7-2.el7                        base                   607 k
 libX11-common                       noarch             1.6.7-2.el7                        base                   164 k
 libXau                              x86_64             1.0.8-2.1.el7                      base                    29 k
 libXpm                              x86_64             3.5.12-1.el7                       base                    55 k
 libargon2                           x86_64             20161029-3.el7                     epel                    23 k
 libjpeg-turbo                       x86_64             1.2.90-8.el7                       base                   135 k
 libmcrypt                           x86_64             2.5.8-13.el7                       epel                    99 k
 libtiff                             x86_64             4.0.3-32.el7                       base                   171 k
 libwebp7                            x86_64             1.0.2-1.el7.remi                   remi-safe              265 k
 libxcb                              x86_64             1.13-1.el7                         base                   214 k
 libzip5                             x86_64             1.5.2-1.el7.remi                   remi-safe               56 k
 php-json                            x86_64             7.3.10-1.el7.remi                  remi-php73              66 k
 php-pdo                             x86_64             7.3.10-1.el7.remi                  remi-php73             127 k

Transaction Summary
========================================================================================================================
Install  5 Packages (+19 Dependent packages)
Upgrade  3 Packages

Total download size: 14 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/27): fontpackages-filesystem-1.44-8.el7.noarch.rpm                                            | 9.9 kB  00:00:00
(2/27): dejavu-fonts-common-2.33-6.el7.noarch.rpm                                                |  64 kB  00:00:00
(3/27): jbigkit-libs-2.0-11.el7.x86_64.rpm                                                       |  46 kB  00:00:00
(4/27): fontconfig-2.13.0-4.3.el7.x86_64.rpm                                                     | 254 kB  00:00:00
(5/27): libXau-1.0.8-2.1.el7.x86_64.rpm                                                          |  29 kB  00:00:00
(6/27): dejavu-sans-fonts-2.33-6.el7.noarch.rpm                                                  | 1.4 MB  00:00:01
(7/27): libXpm-3.5.12-1.el7.x86_64.rpm                                                           |  55 kB  00:00:00
(8/27): libjpeg-turbo-1.2.90-8.el7.x86_64.rpm                                                    | 135 kB  00:00:00
(9/27): libX11-common-1.6.7-2.el7.noarch.rpm                                                     | 164 kB  00:00:00
warning: /var/cache/yum/x86_64/7/epel/packages/libargon2-20161029-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for libargon2-20161029-3.el7.x86_64.rpm is not installed
(10/27): libargon2-20161029-3.el7.x86_64.rpm                                                     |  23 kB  00:00:00
warning: /var/cache/yum/x86_64/7/remi-safe/packages/gd-last-2.2.5-8.el7.remi.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Public key for gd-last-2.2.5-8.el7.remi.x86_64.rpm is not installed
(11/27): gd-last-2.2.5-8.el7.remi.x86_64.rpm                                                     | 134 kB  00:00:01
(12/27): libtiff-4.0.3-32.el7.x86_64.rpm                                                         | 171 kB  00:00:00
(13/27): libxcb-1.13-1.el7.x86_64.rpm                                                            | 214 kB  00:00:00
(14/27): libmcrypt-2.5.8-13.el7.x86_64.rpm                                                       |  99 kB  00:00:00
(15/27): libzip5-1.5.2-1.el7.remi.x86_64.rpm                                                     |  56 kB  00:00:00
(16/27): libX11-1.6.7-2.el7.x86_64.rpm                                                           | 607 kB  00:00:02
(17/27): libwebp7-1.0.2-1.el7.remi.x86_64.rpm                                                    | 265 kB  00:00:01
Public key for php-gd-7.3.10-1.el7.remi.x86_64.rpm is not installed                   ] 1.2 MB/s | 4.9 MB  00:00:07 ETA
(18/27): php-gd-7.3.10-1.el7.remi.x86_64.rpm                                                     |  80 kB  00:00:01
(19/27): php-ldap-7.3.10-1.el7.remi.x86_64.rpm                                                   |  83 kB  00:00:01
(20/27): php-cli-7.3.10-1.el7.remi.x86_64.rpm                                                    | 4.9 MB  00:00:03
(21/27): php-pdo-7.3.10-1.el7.remi.x86_64.rpm                                                    | 127 kB  00:00:00
(22/27): php-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64.rpm                                         |  30 kB  00:00:00
(23/27): php-json-7.3.10-1.el7.remi.x86_64.rpm                                                   |  66 kB  00:00:02
(24/27): php-mysqlnd-7.3.10-1.el7.remi.x86_64.rpm                                                | 234 kB  00:00:01
(25/27): php-common-7.3.10-1.el7.remi.x86_64.rpm                                                 | 1.1 MB  00:00:04
(26/27): php-pecl-zip-1.15.5-1.el7.remi.7.3.x86_64.rpm                                           |  51 kB  00:00:00
(27/27): php-7.3.10-1.el7.remi.x86_64.rpm                                                        | 3.2 MB  00:00:10
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   1.1 MB/s |  14 MB  00:00:12
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
 Userid     : "Remi Collet "
 Fingerprint: 1ee0 4cce 88a4 ae4a a29a 5df5 004e 6f47 00f9 7f56
 Package    : remi-release-7.7-1.el7.remi.noarch (@/remi-release-7)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) "
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-12.noarch (@/epel-release-latest-7.noarch)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libjpeg-turbo-1.2.90-8.el7.x86_64                                                                   1/30
  Installing : fontpackages-filesystem-1.44-8.el7.noarch                                                           2/30
  Installing : libargon2-20161029-3.el7.x86_64                                                                     3/30
  Installing : dejavu-fonts-common-2.33-6.el7.noarch                                                               4/30
  Installing : dejavu-sans-fonts-2.33-6.el7.noarch                                                                 5/30
  Installing : fontconfig-2.13.0-4.3.el7.x86_64                                                                    6/30
  Updating   : php-common-7.3.10-1.el7.remi.x86_64                                                                 7/30
  Installing : php-json-7.3.10-1.el7.remi.x86_64                                                                   8/30
  Installing : php-pdo-7.3.10-1.el7.remi.x86_64                                                                    9/30
  Updating   : php-cli-7.3.10-1.el7.remi.x86_64                                                                   10/30
  Installing : libXau-1.0.8-2.1.el7.x86_64                                                                        11/30
  Installing : libxcb-1.13-1.el7.x86_64                                                                           12/30
  Installing : libwebp7-1.0.2-1.el7.remi.x86_64                                                                   13/30
  Installing : libX11-common-1.6.7-2.el7.noarch                                                                   14/30
  Installing : libX11-1.6.7-2.el7.x86_64                                                                          15/30
  Installing : libXpm-3.5.12-1.el7.x86_64                                                                         16/30
  Installing : libzip5-1.5.2-1.el7.remi.x86_64                                                                    17/30
  Installing : jbigkit-libs-2.0-11.el7.x86_64                                                                     18/30
  Installing : libtiff-4.0.3-32.el7.x86_64                                                                        19/30
  Installing : gd-last-2.2.5-8.el7.remi.x86_64                                                                    20/30
  Installing : libmcrypt-2.5.8-13.el7.x86_64                                                                      21/30
  Installing : php-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64                                                        22/30
  Installing : php-gd-7.3.10-1.el7.remi.x86_64                                                                    23/30
  Installing : php-pecl-zip-1.15.5-1.el7.remi.7.3.x86_64                                                          24/30
  Updating   : php-7.3.10-1.el7.remi.x86_64                                                                       25/30
  Installing : php-mysqlnd-7.3.10-1.el7.remi.x86_64                                                               26/30
  Installing : php-ldap-7.3.10-1.el7.remi.x86_64                                                                  27/30
  Cleanup    : php-5.4.16-46.el7.x86_64                                                                           28/30
  Cleanup    : php-cli-5.4.16-46.el7.x86_64                                                                       29/30
  Cleanup    : php-common-5.4.16-46.el7.x86_64                                                                    30/30
  Verifying  : fontconfig-2.13.0-4.3.el7.x86_64                                                                    1/30
  Verifying  : php-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64                                                         2/30
  Verifying  : php-ldap-7.3.10-1.el7.remi.x86_64                                                                   3/30
  Verifying  : php-pdo-7.3.10-1.el7.remi.x86_64                                                                    4/30
  Verifying  : php-7.3.10-1.el7.remi.x86_64                                                                        5/30
  Verifying  : libargon2-20161029-3.el7.x86_64                                                                     6/30
  Verifying  : php-cli-7.3.10-1.el7.remi.x86_64                                                                    7/30
  Verifying  : libmcrypt-2.5.8-13.el7.x86_64                                                                       8/30
  Verifying  : fontpackages-filesystem-1.44-8.el7.noarch                                                           9/30
  Verifying  : jbigkit-libs-2.0-11.el7.x86_64                                                                     10/30
  Verifying  : dejavu-fonts-common-2.33-6.el7.noarch                                                              11/30
  Verifying  : php-json-7.3.10-1.el7.remi.x86_64                                                                  12/30
  Verifying  : php-common-7.3.10-1.el7.remi.x86_64                                                                13/30
  Verifying  : libzip5-1.5.2-1.el7.remi.x86_64                                                                    14/30
  Verifying  : libX11-common-1.6.7-2.el7.noarch                                                                   15/30
  Verifying  : libxcb-1.13-1.el7.x86_64                                                                           16/30
  Verifying  : libX11-1.6.7-2.el7.x86_64                                                                          17/30
  Verifying  : libXpm-3.5.12-1.el7.x86_64                                                                         18/30
  Verifying  : libjpeg-turbo-1.2.90-8.el7.x86_64                                                                  19/30
  Verifying  : dejavu-sans-fonts-2.33-6.el7.noarch                                                                20/30
  Verifying  : gd-last-2.2.5-8.el7.remi.x86_64                                                                    21/30
  Verifying  : libwebp7-1.0.2-1.el7.remi.x86_64                                                                   22/30
  Verifying  : php-gd-7.3.10-1.el7.remi.x86_64                                                                    23/30
  Verifying  : php-mysqlnd-7.3.10-1.el7.remi.x86_64                                                               24/30
  Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                                        25/30
  Verifying  : libtiff-4.0.3-32.el7.x86_64                                                                        26/30
  Verifying  : php-pecl-zip-1.15.5-1.el7.remi.7.3.x86_64                                                          27/30
  Verifying  : php-cli-5.4.16-46.el7.x86_64                                                                       28/30
  Verifying  : php-5.4.16-46.el7.x86_64                                                                           29/30
  Verifying  : php-common-5.4.16-46.el7.x86_64                                                                    30/30

Installed:
  php-gd.x86_64 0:7.3.10-1.el7.remi                         php-ldap.x86_64 0:7.3.10-1.el7.remi
  php-mysqlnd.x86_64 0:7.3.10-1.el7.remi                    php-pecl-mcrypt.x86_64 0:1.0.3-1.el7.remi.7.3
  php-pecl-zip.x86_64 0:1.15.5-1.el7.remi.7.3

Dependency Installed:
  dejavu-fonts-common.noarch 0:2.33-6.el7     dejavu-sans-fonts.noarch 0:2.33-6.el7 fontconfig.x86_64 0:2.13.0-4.3.el7
  fontpackages-filesystem.noarch 0:1.44-8.el7 gd-last.x86_64 0:2.2.5-8.el7.remi     jbigkit-libs.x86_64 0:2.0-11.el7
  libX11.x86_64 0:1.6.7-2.el7                 libX11-common.noarch 0:1.6.7-2.el7    libXau.x86_64 0:1.0.8-2.1.el7
  libXpm.x86_64 0:3.5.12-1.el7                libargon2.x86_64 0:20161029-3.el7     libjpeg-turbo.x86_64 0:1.2.90-8.el7
  libmcrypt.x86_64 0:2.5.8-13.el7             libtiff.x86_64 0:4.0.3-32.el7         libwebp7.x86_64 0:1.0.2-1.el7.remi
  libxcb.x86_64 0:1.13-1.el7                  libzip5.x86_64 0:1.5.2-1.el7.remi     php-json.x86_64 0:7.3.10-1.el7.remi
  php-pdo.x86_64 0:7.3.10-1.el7.remi

Updated:
  php.x86_64 0:7.3.10-1.el7.remi      php-cli.x86_64 0:7.3.10-1.el7.remi      php-common.x86_64 0:7.3.10-1.el7.remi

Complete!


# Check installed PHP version.
[root@08-00-27-2C-51-D6 ~]# php -v
PHP 7.3.10 (cli) (built: Sep 24 2019 09:20:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.10, Copyright (c) 1998-2018 Zend Technologies


Now all done and ready to use PHPUnit!

Tuesday, October 1, 2019

docker: Setup Wordpress site with linode/lamp container

This time I tried to setup Wordpress website with deploying linode/lamp container. Here's how I did it.
# Start docker service, and retrieve linode/lamp image.
service docker start

docker pull linode/lamp
# Create docker volume for Wordpress contents.
docker volume create my-vol
# Primarily download Wordpress contents.
curl https://wordpress.org/wordpress-5.0.6.zip -o wordpress-5.0.6.zip
unzip wordpress-5.0.6.zip
mv wordpress/* /var/lib/docker/volumes/my-vol/_data
# Run pulled linode/lamp image with mounting created docker volume.
docker run --name linode-dev -it -v my-vol:/var/www/html -p 80:80  linode/lamp /bin/bash
# Update softwares on linode/lamp.
apt-get update
apt-get install  php5-mysqlnd-ms
# Reconfigure MySQL root password
dpkg-reconfigure mysql-server-5.5
# Setup Wordpress database
mysql -uroot -p
CREATE DATABASE awswp;
GRANT ALL PRIVILEGES ON awswp.* TO "wpdbuser"@"localhost" IDENTIFIED BY "xxxxxx";
# Edit apache2 config file to point Wordpress contents.
vi /etc/apache2/sites-available/example.com.conf
 # domain: example.com
 # public: /var/www/example.com/public_html/

 
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin webmaster@example.com
  ServerName  www.example.com
  ServerAlias example.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  #DocumentRoot /var/www/example.com/public_html
  DocumentRoot /var/www/html
  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/wp/log/error.log
  CustomLog /var/www/wp/log/access.log combined
  #ErrorLog  /var/www/example.com/log/error.log
  #CustomLog /var/www/example.com/log/access.log combined
 
# Start MySQL and Apache daemon
service mysql start
service apache2 start

Now you will see Wordpress page and ready for configuration!