Senin, 29 Oktober 2018

How to install and configure php 5.6.37 from source centos 7

  Tidak ada komentar
Install epel-release repository
[root@WebApps ~]# yum install epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.axarva.id
 * epel: mirror.poliwangi.ac.id
 * extras: mirror.axarva.id
 * ius: ftp.acc.umu.se
 * remi-safe: rpms.remirepo.net
 * updates: mirror.axarva.id
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
[root@WebApps ~]#
Install some needed library
[root@WebApps ~]# sudo yum install autoconf libtool re2c bison libxml2-devel bzip2-devel libcurl-devel libpng-devel libicu-devel gcc-c++ libmcrypt-devel libwebp-devel libjpeg-devel openssl-devel -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.axarva.id
 * epel: mirror.poliwangi.ac.id
 * extras: mirror.axarva.id
 * ius: mirrors.ircam.fr
 * remi-safe: mirror.xeonbd.com
 * updates: mirror.axarva.id
Resolving Dependencies
--> Running transaction check
---> Package autoconf.noarch 0:2.69-11.el7 will be installed
--> Processing Dependency: m4 >= 1.4.14 for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Data::Dumper) for package: autoconf-2.69-11.el7.noarch
---> Package bison.x86_64 0:3.0.4-1.el7 will be installed
---> Package bzip2-devel.x86_64 0:1.0.6-13.el7 will be installed
---> Package gcc-c++.x86_64 0:4.8.5-28.el7_5.1 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-28.el7_5.1 for package: gcc-c++-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: gcc = 4.8.5-28.el7_5.1 for package: gcc-c++-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-c++-4.8.5-28.el7_5.1.x86_64
---> Package libcurl-devel.x86_64 0:7.29.0-46.el7 will be installed
epel/x86_64/filelists                                                                                          |  10 MB  00:00:00
base/7/x86_64/filelists_db                                                                                     | 6.9 MB  00:00:00
updates/7/x86_64/filelists_db                                                                                  | 3.4 MB  00:00:00
---> Package libicu-devel.x86_64 0:50.1.2-15.el7 will be installed
---> Package libjpeg-turbo-devel.x86_64 0:1.2.90-5.el7 will be installed
---> Package libmcrypt-devel.x86_64 0:2.5.8-13.el7 will be installed
--> Processing Dependency: libmcrypt = 2.5.8-13.el7 for package: libmcrypt-devel-2.5.8-13.el7.x86_64
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: libmcrypt-devel-2.5.8-13.el7.x86_64
---> Package libpng-devel.x86_64 2:1.5.13-7.el7_2 will be installed
--> Processing Dependency: zlib-devel(x86-64) for package: 2:libpng-devel-1.5.13-7.el7_2.x86_64
---> Package libtool.x86_64 0:2.4.2-22.el7_3 will be installed
--> Processing Dependency: automake for package: libtool-2.4.2-22.el7_3.x86_64
---> Package libwebp-devel.x86_64 0:0.3.0-7.el7 will be installed
---> Package libxml2-devel.x86_64 0:2.9.1-6.el7_2.3 will be installed
--> Processing Dependency: xz-devel for package: libxml2-devel-2.9.1-6.el7_2.3.x86_64
---> Package openssl-devel.x86_64 1:1.0.2k-12.el7 will be installed
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.2k-12.el7.x86_64
---> Package re2c.x86_64 0:0.14.3-2.el7 will be installed
--> Running transaction check
---> Package automake.noarch 0:1.13.4-3.el7 will be installed
--> Processing Dependency: perl(Thread::Queue) for package: automake-1.13.4-3.el7.noarch
--> Processing Dependency: perl(TAP::Parser) for package: automake-1.13.4-3.el7.noarch
---> Package gcc.x86_64 0:4.8.5-28.el7_5.1 will be installed
--> Processing Dependency: cpp = 4.8.5-28.el7_5.1 for package: gcc-4.8.5-28.el7_5.1.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-28.el7_5.1.x86_64
---> Package krb5-devel.x86_64 0:1.15.1-19.el7 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.15.1-19.el7 for package: krb5-devel-1.15.1-19.el7.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-19.el7.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-19.el7.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-19.el7.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-19.el7.x86_64
---> Package libmcrypt.x86_64 0:2.5.8-13.el7 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-28.el7_5.1 will be installed
---> Package m4.x86_64 0:1.4.16-10.el7 will be installed
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
---> Package xz-devel.x86_64 0:5.2.2-1.el7 will be installed
---> Package zlib-devel.x86_64 0:1.2.7-17.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-28.el7_5.1 will be installed
---> Package glibc-devel.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-222.el7 for package: glibc-devel-2.17-222.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-222.el7.x86_64
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package libcom_err-devel.x86_64 0:1.42.9-12.el7_5 will be installed
---> Package libkadm5.x86_64 0:1.15.1-19.el7 will be installed
---> Package libselinux-devel.x86_64 0:2.5-12.el7 will be installed
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-6 for package: libselinux-devel-2.5-12.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-12.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.5-12.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package perl-Test-Harness.noarch 0:3.28-3.el7 will be installed
---> Package perl-Thread-Queue.noarch 0:3.02-2.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-222.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-222.el7.x86_64
---> Package libsepol-devel.x86_64 0:2.5-8.1.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-862.14.4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================
 Package                               Arch                     Version                               Repository                 Size
======================================================================================================================================
Installing:
 autoconf                              noarch                   2.69-11.el7                           base                      701 k
 bison                                 x86_64                   3.0.4-1.el7                           base                      674 k
 bzip2-devel                           x86_64                   1.0.6-13.el7                          base                      218 k
 gcc-c++                               x86_64                   4.8.5-28.el7_5.1                      updates                   7.2 M
 libcurl-devel                         x86_64                   7.29.0-46.el7                         base                      300 k
 libicu-devel                          x86_64                   50.1.2-15.el7                         base                      702 k
 libjpeg-turbo-devel                   x86_64                   1.2.90-5.el7                          base                       98 k
 libmcrypt-devel                       x86_64                   2.5.8-13.el7                          epel                       13 k
 libpng-devel                          x86_64                   2:1.5.13-7.el7_2                      base                      122 k
 libtool                               x86_64                   2.4.2-22.el7_3                        base                      588 k
 libwebp-devel                         x86_64                   0.3.0-7.el7                           base                       23 k
 libxml2-devel                         x86_64                   2.9.1-6.el7_2.3                       base                      1.0 M
 openssl-devel                         x86_64                   1:1.0.2k-12.el7                       base                      1.5 M
 re2c                                  x86_64                   0.14.3-2.el7                          epel                      230 k
Installing for dependencies:
 automake                              noarch                   1.13.4-3.el7                          base                      679 k
 cpp                                   x86_64                   4.8.5-28.el7_5.1                      updates                   5.9 M
 gcc                                   x86_64                   4.8.5-28.el7_5.1                      updates                    16 M
 glibc-devel                           x86_64                   2.17-222.el7                          base                      1.1 M
 glibc-headers                         x86_64                   2.17-222.el7                          base                      678 k
 kernel-headers                        x86_64                   3.10.0-862.14.4.el7                   updates                   7.1 M
 keyutils-libs-devel                   x86_64                   1.5.8-3.el7                           base                       37 k
 krb5-devel                            x86_64                   1.15.1-19.el7                         updates                   269 k
 libcom_err-devel                      x86_64                   1.42.9-12.el7_5                       updates                    31 k
 libkadm5                              x86_64                   1.15.1-19.el7                         updates                   175 k
 libmcrypt                             x86_64                   2.5.8-13.el7                          epel                       99 k
 libmpc                                x86_64                   1.0.1-3.el7                           base                       51 k
 libselinux-devel                      x86_64                   2.5-12.el7                            base                      186 k
 libsepol-devel                        x86_64                   2.5-8.1.el7                           base                       77 k
 libstdc++-devel                       x86_64                   4.8.5-28.el7_5.1                      updates                   1.5 M
 libverto-devel                        x86_64                   0.2.5-4.el7                           base                       12 k
 m4                                    x86_64                   1.4.16-10.el7                         base                      256 k
 pcre-devel                            x86_64                   8.32-17.el7                           base                      480 k
 perl-Data-Dumper                      x86_64                   2.145-3.el7                           base                       47 k
 perl-Test-Harness                     noarch                   3.28-3.el7                            base                      302 k
 perl-Thread-Queue                     noarch                   3.02-2.el7                            base                       17 k
 xz-devel                              x86_64                   5.2.2-1.el7                           base                       46 k
 zlib-devel                            x86_64                   1.2.7-17.el7                          base                       50 k

Transaction Summary
======================================================================================================================================
Install  14 Packages (+23 Dependent packages)

Total download size: 49 M
Installed size: 114 M
Downloading packages:
(1/37): autoconf-2.69-11.el7.noarch.rpm                                                                        | 701 kB  00:00:00
(2/37): automake-1.13.4-3.el7.noarch.rpm                                                                       | 679 kB  00:00:00
(3/37): bzip2-devel-1.0.6-13.el7.x86_64.rpm                                                                    | 218 kB  00:00:00
(4/37): bison-3.0.4-1.el7.x86_64.rpm                                                                           | 674 kB  00:00:00
(5/37): cpp-4.8.5-28.el7_5.1.x86_64.rpm                                                                        | 5.9 MB  00:00:01
(6/37): glibc-headers-2.17-222.el7.x86_64.rpm                                                                  | 678 kB  00:00:00
(7/37): glibc-devel-2.17-222.el7.x86_64.rpm                                                                    | 1.1 MB  00:00:00
(8/37): gcc-c++-4.8.5-28.el7_5.1.x86_64.rpm                                                                    | 7.2 MB  00:00:01
(9/37): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm                                                             |  37 kB  00:00:00
(10/37): gcc-4.8.5-28.el7_5.1.x86_64.rpm                                                                       |  16 MB  00:00:03
(11/37): krb5-devel-1.15.1-19.el7.x86_64.rpm                                                                   | 269 kB  00:00:00
(12/37): libcom_err-devel-1.42.9-12.el7_5.x86_64.rpm                                                           |  31 kB  00:00:00
(13/37): kernel-headers-3.10.0-862.14.4.el7.x86_64.rpm                                                         | 7.1 MB  00:00:01
(14/37): libcurl-devel-7.29.0-46.el7.x86_64.rpm                                                                | 300 kB  00:00:00
(15/37): libicu-devel-50.1.2-15.el7.x86_64.rpm                                                                 | 702 kB  00:00:00
(16/37): libjpeg-turbo-devel-1.2.90-5.el7.x86_64.rpm                                                           |  98 kB  00:00:00
(17/37): libkadm5-1.15.1-19.el7.x86_64.rpm                                                                     | 175 kB  00:00:00
(18/37): libmcrypt-2.5.8-13.el7.x86_64.rpm                                                                     |  99 kB  00:00:00
(19/37): libmpc-1.0.1-3.el7.x86_64.rpm                                                                         |  51 kB  00:00:00
(20/37): libselinux-devel-2.5-12.el7.x86_64.rpm                                                                | 186 kB  00:00:00
(21/37): libsepol-devel-2.5-8.1.el7.x86_64.rpm                                                                 |  77 kB  00:00:00
(22/37): libtool-2.4.2-22.el7_3.x86_64.rpm                                                                     | 588 kB  00:00:00
(23/37): libverto-devel-0.2.5-4.el7.x86_64.rpm                                                                 |  12 kB  00:00:00
(24/37): libwebp-devel-0.3.0-7.el7.x86_64.rpm                                                                  |  23 kB  00:00:00
(25/37): libmcrypt-devel-2.5.8-13.el7.x86_64.rpm                                                               |  13 kB  00:00:00
(26/37): libxml2-devel-2.9.1-6.el7_2.3.x86_64.rpm                                                              | 1.0 MB  00:00:00
(27/37): libstdc++-devel-4.8.5-28.el7_5.1.x86_64.rpm                                                           | 1.5 MB  00:00:00
(28/37): m4-1.4.16-10.el7.x86_64.rpm                                                                           | 256 kB  00:00:00
(29/37): libpng-devel-1.5.13-7.el7_2.x86_64.rpm                                                                | 122 kB  00:00:00
(30/37): openssl-devel-1.0.2k-12.el7.x86_64.rpm                                                                | 1.5 MB  00:00:00
(31/37): perl-Data-Dumper-2.145-3.el7.x86_64.rpm                                                               |  47 kB  00:00:00
(32/37): pcre-devel-8.32-17.el7.x86_64.rpm                                                                     | 480 kB  00:00:00
(33/37): perl-Test-Harness-3.28-3.el7.noarch.rpm                                                               | 302 kB  00:00:00
(34/37): perl-Thread-Queue-3.02-2.el7.noarch.rpm                                                               |  17 kB  00:00:00
(35/37): xz-devel-5.2.2-1.el7.x86_64.rpm                                                                       |  46 kB  00:00:00
(36/37): zlib-devel-1.2.7-17.el7.x86_64.rpm                                                                    |  50 kB  00:00:00
(37/37): re2c-0.14.3-2.el7.x86_64.rpm                                                                          | 230 kB  00:00:00
--------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                 9.4 MB/s |  49 MB  00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libmpc-1.0.1-3.el7.x86_64                                                                                         1/37
  Installing : zlib-devel-1.2.7-17.el7.x86_64                                                                                    2/37
  Installing : m4-1.4.16-10.el7.x86_64                                                                                           3/37
  Installing : cpp-4.8.5-28.el7_5.1.x86_64                                                                                       4/37
  Installing : libkadm5-1.15.1-19.el7.x86_64                                                                                     5/37
  Installing : libsepol-devel-2.5-8.1.el7.x86_64                                                                                 6/37
  Installing : xz-devel-5.2.2-1.el7.x86_64                                                                                       7/37
  Installing : kernel-headers-3.10.0-862.14.4.el7.x86_64                                                                         8/37
  Installing : glibc-headers-2.17-222.el7.x86_64                                                                                 9/37
  Installing : glibc-devel-2.17-222.el7.x86_64                                                                                  10/37
  Installing : gcc-4.8.5-28.el7_5.1.x86_64                                                                                      11/37
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                                              12/37
  Installing : autoconf-2.69-11.el7.noarch                                                                                      13/37
  Installing : libcom_err-devel-1.42.9-12.el7_5.x86_64                                                                          14/37
  Installing : perl-Thread-Queue-3.02-2.el7.noarch                                                                              15/37
  Installing : perl-Test-Harness-3.28-3.el7.noarch                                                                              16/37
  Installing : automake-1.13.4-3.el7.noarch                                                                                     17/37
  Installing : libstdc++-devel-4.8.5-28.el7_5.1.x86_64                                                                          18/37
  Installing : libverto-devel-0.2.5-4.el7.x86_64                                                                                19/37
  Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                           20/37
  Installing : libmcrypt-2.5.8-13.el7.x86_64                                                                                    21/37
  Installing : pcre-devel-8.32-17.el7.x86_64                                                                                    22/37
  Installing : libselinux-devel-2.5-12.el7.x86_64                                                                               23/37
  Installing : krb5-devel-1.15.1-19.el7.x86_64                                                                                  24/37
  Installing : 1:openssl-devel-1.0.2k-12.el7.x86_64                                                                             25/37
  Installing : libmcrypt-devel-2.5.8-13.el7.x86_64                                                                              26/37
  Installing : gcc-c++-4.8.5-28.el7_5.1.x86_64                                                                                  27/37
  Installing : libtool-2.4.2-22.el7_3.x86_64                                                                                    28/37
  Installing : libxml2-devel-2.9.1-6.el7_2.3.x86_64                                                                             29/37
  Installing : bison-3.0.4-1.el7.x86_64                                                                                         30/37
  Installing : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                             31/37
  Installing : libicu-devel-50.1.2-15.el7.x86_64                                                                                32/37
  Installing : libcurl-devel-7.29.0-46.el7.x86_64                                                                               33/37
  Installing : libjpeg-turbo-devel-1.2.90-5.el7.x86_64                                                                          34/37
  Installing : libwebp-devel-0.3.0-7.el7.x86_64                                                                                 35/37
  Installing : bzip2-devel-1.0.6-13.el7.x86_64                                                                                  36/37
  Installing : re2c-0.14.3-2.el7.x86_64                                                                                         37/37
  Verifying  : krb5-devel-1.15.1-19.el7.x86_64                                                                                   1/37
  Verifying  : zlib-devel-1.2.7-17.el7.x86_64                                                                                    2/37
  Verifying  : libxml2-devel-2.9.1-6.el7_2.3.x86_64                                                                              3/37
  Verifying  : automake-1.13.4-3.el7.noarch                                                                                      4/37
  Verifying  : glibc-devel-2.17-222.el7.x86_64                                                                                   5/37
  Verifying  : pcre-devel-8.32-17.el7.x86_64                                                                                     6/37
  Verifying  : glibc-headers-2.17-222.el7.x86_64                                                                                 7/37
  Verifying  : re2c-0.14.3-2.el7.x86_64                                                                                          8/37
  Verifying  : libmcrypt-devel-2.5.8-13.el7.x86_64                                                                               9/37
  Verifying  : m4-1.4.16-10.el7.x86_64                                                                                          10/37
  Verifying  : libmcrypt-2.5.8-13.el7.x86_64                                                                                    11/37
  Verifying  : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                           12/37
  Verifying  : bzip2-devel-1.0.6-13.el7.x86_64                                                                                  13/37
  Verifying  : libwebp-devel-0.3.0-7.el7.x86_64                                                                                 14/37
  Verifying  : 1:openssl-devel-1.0.2k-12.el7.x86_64                                                                             15/37
  Verifying  : libverto-devel-0.2.5-4.el7.x86_64                                                                                16/37
  Verifying  : libjpeg-turbo-devel-1.2.90-5.el7.x86_64                                                                          17/37
  Verifying  : libselinux-devel-2.5-12.el7.x86_64                                                                               18/37
  Verifying  : libstdc++-devel-4.8.5-28.el7_5.1.x86_64                                                                          19/37
  Verifying  : perl-Test-Harness-3.28-3.el7.noarch                                                                              20/37
  Verifying  : gcc-4.8.5-28.el7_5.1.x86_64                                                                                      21/37
  Verifying  : perl-Thread-Queue-3.02-2.el7.noarch                                                                              22/37
  Verifying  : libcurl-devel-7.29.0-46.el7.x86_64                                                                               23/37
  Verifying  : libcom_err-devel-1.42.9-12.el7_5.x86_64                                                                          24/37
  Verifying  : libtool-2.4.2-22.el7_3.x86_64                                                                                    25/37
  Verifying  : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                             26/37
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                                              27/37
  Verifying  : bison-3.0.4-1.el7.x86_64                                                                                         28/37
  Verifying  : cpp-4.8.5-28.el7_5.1.x86_64                                                                                      29/37
  Verifying  : libmpc-1.0.1-3.el7.x86_64                                                                                        30/37
  Verifying  : kernel-headers-3.10.0-862.14.4.el7.x86_64                                                                        31/37
  Verifying  : gcc-c++-4.8.5-28.el7_5.1.x86_64                                                                                  32/37
  Verifying  : xz-devel-5.2.2-1.el7.x86_64                                                                                      33/37
  Verifying  : autoconf-2.69-11.el7.noarch                                                                                      34/37
  Verifying  : libicu-devel-50.1.2-15.el7.x86_64                                                                                35/37
  Verifying  : libsepol-devel-2.5-8.1.el7.x86_64                                                                                36/37
  Verifying  : libkadm5-1.15.1-19.el7.x86_64                                                                                    37/37

Installed:
  autoconf.noarch 0:2.69-11.el7                 bison.x86_64 0:3.0.4-1.el7                bzip2-devel.x86_64 0:1.0.6-13.el7
  gcc-c++.x86_64 0:4.8.5-28.el7_5.1             libcurl-devel.x86_64 0:7.29.0-46.el7      libicu-devel.x86_64 0:50.1.2-15.el7
  libjpeg-turbo-devel.x86_64 0:1.2.90-5.el7     libmcrypt-devel.x86_64 0:2.5.8-13.el7     libpng-devel.x86_64 2:1.5.13-7.el7_2
  libtool.x86_64 0:2.4.2-22.el7_3               libwebp-devel.x86_64 0:0.3.0-7.el7        libxml2-devel.x86_64 0:2.9.1-6.el7_2.3
  openssl-devel.x86_64 1:1.0.2k-12.el7          re2c.x86_64 0:0.14.3-2.el7

Dependency Installed:
  automake.noarch 0:1.13.4-3.el7              cpp.x86_64 0:4.8.5-28.el7_5.1            gcc.x86_64 0:4.8.5-28.el7_5.1
  glibc-devel.x86_64 0:2.17-222.el7           glibc-headers.x86_64 0:2.17-222.el7      kernel-headers.x86_64 0:3.10.0-862.14.4.el7
  keyutils-libs-devel.x86_64 0:1.5.8-3.el7    krb5-devel.x86_64 0:1.15.1-19.el7        libcom_err-devel.x86_64 0:1.42.9-12.el7_5
  libkadm5.x86_64 0:1.15.1-19.el7             libmcrypt.x86_64 0:2.5.8-13.el7          libmpc.x86_64 0:1.0.1-3.el7
  libselinux-devel.x86_64 0:2.5-12.el7        libsepol-devel.x86_64 0:2.5-8.1.el7      libstdc++-devel.x86_64 0:4.8.5-28.el7_5.1
  libverto-devel.x86_64 0:0.2.5-4.el7         m4.x86_64 0:1.4.16-10.el7                pcre-devel.x86_64 0:8.32-17.el7
  perl-Data-Dumper.x86_64 0:2.145-3.el7       perl-Test-Harness.noarch 0:3.28-3.el7    perl-Thread-Queue.noarch 0:3.02-2.el7
  xz-devel.x86_64 0:5.2.2-1.el7               zlib-devel.x86_64 0:1.2.7-17.el7

Complete!
[root@WebApps ~]#
[root@WebApps ~]#
Download php from official website
[root@WebApps ~]# wget http://id1.php.net/distributions/php-5.6.37.tar.gz
--2018-10-30 08:45:47--  http://id1.php.net/distributions/php-5.6.37.tar.gz
Resolving id1.php.net (id1.php.net)... 202.182.182.181
Connecting to id1.php.net (id1.php.net)|202.182.182.181|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19300783 (18M) [application/x-gzip]
Saving to: ‘php-5.6.37.tar.gz’

100%[============================================================================================>] 19,300,783  9.79MB/s   in 1.9s

2018-10-30 08:45:49 (9.79 MB/s) - ‘php-5.6.37.tar.gz’ saved [19300783/19300783]

[root@WebApps ~]# ls
anaconda-ks.cfg  php-5.6.27  php-5.6.27.tar.gz  php-5.6.37.tar.gz
[root@WebApps ~]#
Extract php source
[root@WebApps ~]# tar -zxf php-5.6.37.tar.gz
[root@WebApps ~]# ls
anaconda-ks.cfg  php-5.6.27  php-5.6.27.tar.gz  php-5.6.37  php-5.6.37.tar.gz
[root@WebApps ~]#
Change working directory to php extracted folder
[root@WebApps ~]# cd php-5.6.37/
[root@WebApps php-5.6.37]# ls
acinclude.m4      generated_lists  mkinstalldirs             README.NEW-OUTPUT-API             server-tests-config.php
aclocal.m4        genfiles         netware                   README.PARAMETER_PARSING_API      server-tests.php
build             header           NEWS                      README.REDIST.BINS                snapshot
buildconf         INSTALL          pear                      README.RELEASE_PROCESS            stamp-h.in
buildconf.bat     install-sh       php5.spec.in              README.SELF-CONTAINED-EXTENSIONS  stub.c
CODING_STANDARDS  LICENSE          php.gif                   README.STREAMS                    tests
config.guess      ltmain.sh        php.ini-development       README.SUBMITTING_PATCH           travis
config.sub        main             php.ini-production        README.TESTING                    TSRM
configure         makedist         README.EXT_SKEL           README.TESTING2                   UPGRADING
configure.in      Makefile.frag    README.GIT-RULES          README.UNIX-BUILD-SYSTEM          UPGRADING.INTERNALS
CREDITS           Makefile.gcov    README.input_filter       README.WIN32-BUILD-SYSTEM         vcsclean
ext               Makefile.global  README.MAILINGLIST_RULES  run-tests.php                     win32
EXTENSIONS        makerpm          README.md                 sapi                              Zend
footer            missing          README.namespaces         scripts
[root@WebApps php-5.6.37]#

Execute Configure help to show the configure option and documentation
[root@WebApps php-5.6.37]# ./buildconf --force
Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.69 (ok)
[root@WebApps php-5.6.37]#
PHP Configuration

You can find more option of configure by typing ./configure help
[root@WebApps php-5.6.37]# ./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
...
Configure the php
[root@WebApps php-5.6.37]# ./buildconf --force
Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.69 (ok)
[root@WebApps php-5.6.37]#
If you install httpd with yum, don't forget to install httpd devel first

https://www.wachid.web.id/2019/08/how-to-install-apxs2-with-httpd-devel.html

PHP Configuration
[root@WebApps php-5.6.37]# ./configure --prefix=/usr/local/php5  --with-config-file-path=/usr/local/php5/etc --with-config-file-scan-dir=/usr/local/php5/etc/conf.d --disable-short-tags --with-openssl --with-pcre-regex --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --with-gd --enable-intl --enable-mbstring  --with-mcrypt --with-mysqli --enable-pcntl --with-pdo-mysql --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-jpeg-dir --with-png-dir --with-apxs2
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... 
..
..
Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
[root@WebApps php-5.6.37]#
Make the php

[root@WebApps php-5.6.37]# make
/bin/sh /root/php-5.6.37/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -D HAVE_TIMELIB_CONFIG_H=1 -Iext/date/ -I/root/php-5.6.37/ext/date/ -DPHP_ATOM_INC -I/root/php-5.6.37/include -I/root/php-5.6.37/main -I/root/php-5.6.37 -I/root/php-5.6.37/ext/date/lib -I/root/php-5.6.37/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.6.37/ext/mbstring/oniguruma -I/root/php-5.6.37/ext/mbstring/libmbfl -I/root/php-5.6.37/ext/mbstring/libmbfl/mbfl -I/root/php-5.6.37/ext/sqlite3/libsqlite -I/root/php-5.6.37/ext/zip/lib -I/root/php-5.6.37/TSRM -I/root/php-5.6.37/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.6.37/ext/date/php_date.c -o ext/date/php_date.lo
/bin/sh /root/php-5.6.37/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -D HAVE_TIMELIB_CONFIG_H=1 -Iext/date/ -I/root/php-5.6.37/ext/date/ -DPHP_ATOM_INC -I/root/php-5.6.37/include -I/root/php-5.6.37/main -I/root/php-5.6.37 -I/root/php-5.6.37/ext/date/lib -I/root/php-5.6.37/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.6.37/ext/mbstring/oniguruma -I/root/php-5.6.37/ext/mbstring/libmbfl -I/root/php-5.6.37/ext/mbstring/libmbfl/mbfl -I/root/php-5.6.37/ext/sqlite3/libsqlite -I/root/php-5.6.37/ext/zip/lib -I/root/php-5.6.37/TSRM -I/root/php-5.6.37/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.6.37/ext/date/lib/astro.c -o ext/date/lib/astro.lo
/bin/sh /root/php-5.6.37/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -D HAVE_TIMELIB_CONFIG_H=1 -Iext/date/ -I/root/php-5.6.37/ext/date/ -DPHP_ATOM_INC -I/root/php-5.6.37/include -I/root/php-5.6.37/main -I/root/php-5.6.37 -I/root/php-5.6.37/ext/date/lib -I/root/php-5.6.37/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.6.37/ext/mbstring/oniguruma -I/root/php-5.6.37/ext/mbstring/libmbfl -I/root/php-5.6.37/ext/mbstring/libmbfl/mbfl -I/root/php-5.6.37/ext/sqlite3/libsqlite -I/root/php-5.6.37/ext/zip/lib -I/root/php-5.6.37/TSRM -I/root/php-5.6.37/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.6.37/ext/date/lib/dow.c -o ext/date/lib/dow.lo
/bin/sh /root/php-5.6.37/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -D HAVE_TIMELIB_CONFIG_H=1 -Iext/date/ -I/root/php-5.6.37/ext/date/ -DPHP_ATOM_INC -I/root/php-5.6.37/include -I/root/php-5.6.37/main -I/root/php-5.6.37 -I/root/php-5.6.37/ext/date/lib -I/root/php-5.6.37/ext/ereg/regex -I/usr/include/libxml2 -I/root/php-5.6.37/ext/mbstring/oniguruma -I/root/php-5.6.37/ext/mbstring/libmbfl -I/root/php-5.6.37/ext/mbstring/libmbfl/mbfl -I/root/php-5.6.37/ext/sqlite3/libsqlite -I/root/php-5.6.37/ext/zip/lib -I/root/php-5.6.37/TSRM -I/root/php-5.6.37/Zend    -I/usr/include -g -O2 -fvisibility=hidden  -c /root/php-5.6.37/ext/date/lib/parse_date.c -o ext/date/lib/parse_da
..
..
 -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lssl -lcrypto -lcrypt  -o sapi/cgi/php-cgi
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
invertedregexiterator.inc
directorygraphiterator.inc
clicommand.inc
directorytreeiterator.inc
pharcommand.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

[root@WebApps php-5.6.37]#
Make install the php
[root@WebApps php-5.6.37]# make install
Installing PHP SAPI module:       apache2handler
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' libphp5.la /usr/lib64/httpd/modules
/usr/lib64/apr-1/build/libtool --mode=install install libphp5.la /usr/lib64/httpd/modules/
libtool: install: install .libs/libphp5.so /usr/lib64/httpd/modules/libphp5.so
libtool: install: install .libs/libphp5.lai /usr/lib64/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /root/php-5.6.37/libs'
chmod 755 /usr/lib64/httpd/modules/libphp5.so
[activating module `php5' in /etc/httpd/conf/httpd.conf]
Installing shared extensions:     /usr/local/php5/lib/php/extensions/no-debug-non-zts-20131226/
Installing PHP CLI binary:        /usr/local/php5/bin/
Installing PHP CLI man page:      /usr/local/php5/php/man/man1/
Installing PHP CGI binary:        /usr/local/php5/bin/
Installing PHP CGI man page:      /usr/local/php5/php/man/man1/
Installing build environment:     /usr/local/php5/lib/php/build/
Installing header files:           /usr/local/php5/include/php/
Installing helper programs:       /usr/local/php5/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php5/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php5/lib/php/
[PEAR] Archive_Tar    - installed: 1.4.3
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.2
[PEAR] PEAR           - installed: 1.10.5
Wrote PEAR system config file at: /usr/local/php5/etc/pear.conf
You may want to add: /usr/local/php5/lib/php to your php.ini include_path
/root/php-5.6.37/build/shtool install -c ext/phar/phar.phar /usr/local/php5/bin
ln -s -f phar.phar /usr/local/php5/bin/phar
Installing PDO headers:           /usr/local/php5/include/php/ext/pdo/
[root@WebApps php-5.6.37]#

PHP Configuration

Symlink the php executable file to sbin
[root@WebApps php-5.6.37]# php -v
bash: php: command not found...
[root@WebApps php-5.6.37]#
[root@WebApps php-5.6.37]# ln -s /usr/local/php5/bin/php /sbin/php
[root@WebApps php-5.6.37]# php -v
PHP 5.6.27 (cli) (built: Oct 30 2018 06:31:17)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[root@WebApps php-5.6.37]#
Find php ini configuration path and configuration folder
[root@WebApps php-5.6.37]# php -i | grep "Configuration File"
Configuration File (php.ini) Path => /usr/local/php5/etc
Loaded Configuration File => (none)
[root@WebApps php-5.6.37]# php -i | grep "Scan this"
Scan this dir for additional .ini files => /usr/local/php5/etc/conf.d
[root@WebApps php-5.6.37]#

Copy php.ini template to configuration folder, and simlink the file to /etc folder 
[root@WebApps php-5.6.37]# cp php.ini-production /usr/local/php5/etc/php.ini
[root@WebApps php-5.6.37]# ls -l /usr/local/php5/etc/php.ini
-rw-r--r-- 1 root root 72819 Oct 30 06:39 /usr/local/php5/etc/php.ini
[root@WebApps php-5.6.37]# ln -s /usr/local/php5/etc/php.ini /etc/php.ini
[root@WebApps php-5.6.37]# ls -l /etc/php.ini
lrwxrwxrwx 1 root root 37 Oct 30 06:40 /etc/php.ini -> /usr/local/php5/etc/php.ini
[root@WebApps php-5.6.37]#
Check the php version
[root@WebApps php-5.6.37]# php -v
PHP 5.6.37 (cli) (built: Oct 30 2018 08:58:08)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[root@WebApps php-5.6.37]#
Check the php modules
[root@WebApps php-5.6.37]# php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
gd
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
zip
zlib

[Zend Modules]

[root@WebApps php-5.6.37]#

Tidak ada komentar :

Posting Komentar