Dalam artikel ini, kami akan membahas langkah-langkah terperinci untuk menginstal PHP 7.3 pada sistem operasi CentOS 7. Mulai dari menambahkan repositori yang diperlukan, mengaktifkan repositori Remi, hingga memasang PHP 7.3 dan modul terkait untuk Apache. Tutorial ini dirancang untuk membantu Anda meningkatkan versi PHP pada server CentOS 7 Anda, memastikan kinerja dan keamanan yang optimal untuk aplikasi web Anda. Ikuti panduan ini untuk setup PHP 7.3 yang lancar dan efektif.

sudo yum -y install epel-release
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Menginstall epel-release

[root@mysrv ~]# yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                            Arch                                         Version                                    Repository                                    Size
===============================================================================================================================================================================================
Installing:
 epel-release                                       noarch                                       7-11                                       extras                                        15 k

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

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

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

Complete!
[root@mysrv ~]#

Install repository Remi

[root@mysrv ~]# yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Loaded plugins: fastestmirror
remi-release-7.rpm                                                                                                                                                      |  28 kB  00:00:00
Examining /var/tmp/yum-root-1z99ih/remi-release-7.rpm: remi-release-7.9-6.el7.remi.noarch
Marking /var/tmp/yum-root-1z99ih/remi-release-7.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package remi-release.noarch 0:7.9-6.el7.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                       Arch                                    Version                                          Repository                                        Size
===============================================================================================================================================================================================
Installing:
 remi-release                                  noarch                                  7.9-6.el7.remi                                   /remi-release-7                                   39 k

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

Total size: 39 k
Installed size: 39 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : remi-release-7.9-6.el7.remi.noarch                                                                                                                                          1/1
  Verifying  : remi-release-7.9-6.el7.remi.noarch                                                                                                                                          1/1

Installed:
  remi-release.noarch 0:7.9-6.el7.remi

Complete!
[root@mysrv ~]#

Menginstall yum utils

sudo yum -y install yum-utils
[root@mysrv ~]# yum -y install yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                                                                    | 5.1 kB  00:00:00
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * remi-safe: cdn.centos.no
epel                                                                                                                                                                    | 4.3 kB  00:00:00
remi-safe                                                                                                                                                               | 3.0 kB  00:00:00
(1/4): remi-safe/primary_db                                                                                                                                             | 2.6 MB  00:00:00
(2/4): epel/x86_64/group                                                                                                                                                | 399 kB  00:00:00
(3/4): epel/x86_64/updateinfo                                                                                                                                           | 1.0 MB  00:00:02
(4/4): epel/x86_64/primary_db                                                                                                                                           | 8.7 MB  00:00:09
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-54.el7_8 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-54.el7_8.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-54.el7_8.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7_9.6 will be installed
--> Processing Dependency: libxml2 = 2.9.1-6.el7_9.6 for package: libxml2-python-2.9.1-6.el7_9.6.x86_64
---> 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 libxml2.x86_64 0:2.9.1-6.el7.5 will be updated
---> Package libxml2.x86_64 0:2.9.1-6.el7_9.6 will be an update
---> 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-54.el7_8                                     base                                      122 k
Installing for dependencies:
 libxml2-python                                   x86_64                                   2.9.1-6.el7_9.6                                     updates                                   247 k
 python-chardet                                   noarch                                   2.2.1-3.el7                                         base                                      227 k
 python-kitchen                                   noarch                                   1.1.1-5.el7                                         base                                      267 k
Updating for dependencies:
 libxml2                                          x86_64                                   2.9.1-6.el7_9.6                                     updates                                   668 k

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

Total download size: 1.5 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/5): libxml2-python-2.9.1-6.el7_9.6.x86_64.rpm                                                                                                                        | 247 kB  00:00:00
(2/5): python-chardet-2.2.1-3.el7.noarch.rpm                                                                                                                            | 227 kB  00:00:00
(3/5): python-kitchen-1.1.1-5.el7.noarch.rpm                                                                                                                            | 267 kB  00:00:00
(4/5): yum-utils-1.1.31-54.el7_8.noarch.rpm                                                                                                                             | 122 kB  00:00:00
(5/5): libxml2-2.9.1-6.el7_9.6.x86_64.rpm                                                                                                                               | 668 kB  00:00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                          2.6 MB/s | 1.5 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libxml2-2.9.1-6.el7_9.6.x86_64                                                                                                                                              1/6
  Installing : libxml2-python-2.9.1-6.el7_9.6.x86_64                                                                                                                                       2/6
  Installing : python-chardet-2.2.1-3.el7.noarch                                                                                                                                           3/6
  Installing : python-kitchen-1.1.1-5.el7.noarch                                                                                                                                           4/6
  Installing : yum-utils-1.1.31-54.el7_8.noarch                                                                                                                                            5/6
  Cleanup    : libxml2-2.9.1-6.el7.5.x86_64                                                                                                                                                6/6
  Verifying  : python-chardet-2.2.1-3.el7.noarch                                                                                                                                           1/6
  Verifying  : libxml2-2.9.1-6.el7_9.6.x86_64                                                                                                                                              2/6
  Verifying  : libxml2-python-2.9.1-6.el7_9.6.x86_64                                                                                                                                       3/6
  Verifying  : python-kitchen-1.1.1-5.el7.noarch                                                                                                                                           4/6
  Verifying  : yum-utils-1.1.31-54.el7_8.noarch                                                                                                                                            5/6
  Verifying  : libxml2-2.9.1-6.el7.5.x86_64                                                                                                                                                6/6

Installed:
  yum-utils.noarch 0:1.1.31-54.el7_8

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

Dependency Updated:
  libxml2.x86_64 0:2.9.1-6.el7_9.6

Complete!
[root@mysrv ~]#

Disable repository remi php

[root@mysrv ~]# yum-config-manager --disable 'remi-php*'
[root@mysrv ~]# yum-config-manager --disable 'remi-php*'
Loaded plugins: fastestmirror
====================================================================================== repo: remi-php54 =======================================================================================
[remi-php54]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php54
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = False
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php54/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php54/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php54/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/php54/mirror
mirrorlist_expire = 86400
name = Remi's PHP 5.4 RPM repository for Enterprise Linux 7 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php54
pkgdir = /var/cache/yum/x86_64/7/remi-php54/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-php54
ui_repoid_vars = releasever,
   basearch
username =
....
....
=============================================================================== repo: remi-php83-test-debuginfo ===============================================================================
[remi-php83-test-debuginfo]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl = http://rpms.remirepo.net/enterprise/7/debug-test83/x86_64/
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php83-test-debuginfo
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = False
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php83-test-debuginfo/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php83-test-debuginfo/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php83-test-debuginfo/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 =
mirrorlist_expire = 86400
name = Remi's PHP 8.3 test RPM repository for Enterprise Linux 7 - x86_64 - debuginfo
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php83-test-debuginfo
pkgdir = /var/cache/yum/x86_64/7/remi-php83-test-debuginfo/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-php83-test-debuginfo/x86_64
ui_repoid_vars = releasever,
   basearch
username =

[root@mysrv ~]#

Enable php 7.3 pada repository remi

sudo yum-config-manager --enable remi-php73
[root@mysrv ~]# yum-config-manager --enable remi-php73
Loaded plugins: fastestmirror
====================================================================================== repo: remi-php73 =======================================================================================
[remi-php73]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php73
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-php73/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php73/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php73/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/php73/mirror
mirrorlist_expire = 86400
name = Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php73
pkgdir = /var/cache/yum/x86_64/7/remi-php73/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-php73
ui_repoid_vars = releasever,
   basearch
username =

[root@mysrv ~]#
sudo yum install php php-cli php-fpm php-gd php-mysqlnd php-pdo php-xml php-mbstring php-intl php-json php-zip php-pecl-apcu -y
[root@mysrv ~]# sudo yum install php php-cli php-fpm php-gd php-mysqlnd php-pdo php-xml php-mbstring php-intl php-json php-zip php-pecl-apcu -y
[root@mysrv ~]# yum install php php-cli php-fpm php-gd php-mysqlnd php-pdo php-xml php-mbstring php-intl php-json php-zip php-pecl-apcu -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * remi-php73: cdn.centos.no
 * remi-safe: cdn.centos.no
remi-php73                                                                                                                                                              | 3.0 kB  00:00:00
remi-php73/primary_db                                                                                                                                                   | 262 kB  00:00:00
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
--> Running transaction check
---> Package php.x86_64 0:7.3.33-14.el7.remi will be installed
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: php-7.3.33-14.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.3.33-14.el7.remi for package: php-7.3.33-14.el7.remi.x86_64
--> Processing Dependency: httpd for package: php-7.3.33-14.el7.remi.x86_64
--> Processing Dependency: libargon2.so.0()(64bit) for package: php-7.3.33-14.el7.remi.x86_64
---> Package php-cli.x86_64 0:5.4.16-48.el7 will be updated
---> Package php-cli.x86_64 0:7.3.33-14.el7.remi will be an update
---> Package php-fpm.x86_64 0:7.3.33-14.el7.remi will be installed
---> Package php-gd.x86_64 0:7.3.33-14.el7.remi will be installed
--> Processing Dependency: libX11.so.6()(64bit) for package: php-gd-7.3.33-14.el7.remi.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-7.3.33-14.el7.remi.x86_64
--> Processing Dependency: libgd.so.103()(64bit) for package: php-gd-7.3.33-14.el7.remi.x86_64

...
...
  Verifying  : php-cli-5.4.16-48.el7.x86_64                                                                                                                                              41/44
  Verifying  : php-common-5.4.16-48.el7.x86_64                                                                                                                                           42/44
  Verifying  : php-process-5.4.16-48.el7.x86_64                                                                                                                                          43/44
  Verifying  : php-pdo-5.4.16-48.el7.x86_64                                                                                                                                              44/44

Installed:
  php.x86_64 0:7.3.33-14.el7.remi                  php-fpm.x86_64 0:7.3.33-14.el7.remi           php-gd.x86_64 0:7.3.33-14.el7.remi           php-intl.x86_64 0:7.3.33-14.el7.remi
  php-json.x86_64 0:7.3.33-14.el7.remi             php-mbstring.x86_64 0:7.3.33-14.el7.remi      php-mysqlnd.x86_64 0:7.3.33-14.el7.remi      php-pecl-apcu.x86_64 0:5.1.23-1.el7.remi.7.3
  php-pecl-zip.x86_64 0:1.22.3-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
  fribidi.x86_64 0:1.0.2-1.el7_7.1                gd3php.x86_64 0:2.3.3-7.el7.remi              graphite2.x86_64 0:1.3.10-1.el7_3          harfbuzz.x86_64 0:1.7.5-2.el7
  httpd.x86_64 0:2.4.6-99.el7.centos.1            jbigkit-libs.x86_64 0:2.0-11.el7              libX11.x86_64 0:1.6.7-5.el7_9              libX11-common.noarch 0:1.6.7-5.el7_9
  libXau.x86_64 0:1.0.8-2.1.el7                   libXpm.x86_64 0:3.5.12-2.el7_9                libargon2.x86_64 0:20161029-3.el7          libicu69.x86_64 0:69.1-4.el7.remi
  libjpeg-turbo.x86_64 0:1.2.90-8.el7             libraqm.x86_64 0:0.7.0-4.el7                  libtiff.x86_64 0:4.0.3-35.el7              libwebp7.x86_64 0:1.0.3-2.el7.remi
  libxcb.x86_64 0:1.13-1.el7                      libzip5.x86_64 0:1.10.1-1.el7.remi            libzstd.x86_64 0:1.5.5-1.el7               mailcap.noarch 0:2.1.41-2.el7
  oniguruma5php.x86_64 0:6.9.9-1.el7.remi

Updated:
  php-cli.x86_64 0:7.3.33-14.el7.remi                            php-pdo.x86_64 0:7.3.33-14.el7.remi                            php-xml.x86_64 0:7.3.33-14.el7.remi

Dependency Updated:
  php-common.x86_64 0:7.3.33-14.el7.remi                                                        php-process.x86_64 0:7.3.33-14.el7.remi

Complete!
[root@mysrv ~]#

sudo yum install php74-php mod_php
[root@cloud-one ~]# yum install php74-php mod_php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirror.gi.co.id
 * remi-php74: cdn.centos.no
 * remi-safe: cdn.centos.no
Package php-7.4.33-15.el7.remi.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package php74-php.x86_64 0:7.4.33-15.el7.remi will be installed
--> Processing Dependency: php74-php-common(x86-64) = 7.4.33-15.el7.remi for package: php74-php-7.4.33-15.el7.remi.x86_64
--> Processing Dependency: php74-php-cli(x86-64) = 7.4.33-15.el7.remi for package: php74-php-7.4.33-15.el7.remi.x86_64
--> Processing Dependency: php74-php-sodium(x86-64) = 7.4.33-15.el7.remi for package: php74-php-7.4.33-15.el7.remi.x86_64
--> Running transaction check
---> Package php74-php-cli.x86_64 0:7.4.33-15.el7.remi will be installed
---> Package php74-php-common.x86_64 0:7.4.33-15.el7.remi will be installed
--> Processing Dependency: php74-php-json(x86-64) = 7.4.33-15.el7.remi for package: php74-php-common-7.4.33-15.el7.remi.x86_64
--> Processing Dependency: php74-runtime for package: php74-php-common-7.4.33-15.el7.remi.x86_64
---> Package php74-php-sodium.x86_64 0:7.4.33-15.el7.remi will be installed
--> Running transaction check
---> Package php74-php-json.x86_64 0:7.4.33-15.el7.remi will be installed
---> Package php74-runtime.x86_64 0:7.4-3.el7.remi will be installed
--> Processing Dependency: environment-modules for package: php74-runtime-7.4-3.el7.remi.x86_64
--> Processing Dependency: scl-utils for package: php74-runtime-7.4-3.el7.remi.x86_64
--> Running transaction check
---> Package environment-modules.x86_64 0:3.2.10-10.el7 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: environment-modules-3.2.10-10.el7.x86_64
---> Package scl-utils.x86_64 0:20130529-19.el7 will be installed
--> Running transaction check
---> Package tcl.x86_64 1:8.5.13-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================
 Package                         Arch               Version                        Repository             Size
===============================================================================================================
Installing:
 php74-php                       x86_64             7.4.33-15.el7.remi             remi-safe             1.7 M
Installing for dependencies:
 environment-modules             x86_64             3.2.10-10.el7                  base                  107 k
 php74-php-cli                   x86_64             7.4.33-15.el7.remi             remi-safe             3.5 M
 php74-php-common                x86_64             7.4.33-15.el7.remi             remi-safe             702 k
 php74-php-json                  x86_64             7.4.33-15.el7.remi             remi-safe              80 k
 php74-php-sodium                x86_64             7.4.33-15.el7.remi             remi-safe              85 k
 php74-runtime                   x86_64             7.4-3.el7.remi                 remi-safe             1.1 M
 scl-utils                       x86_64             20130529-19.el7                base                   24 k
 tcl                             x86_64             1:8.5.13-8.el7                 base                  1.9 M

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

Total download size: 9.2 M
Installed size: 29 M
Is this ok [y/d/N]: y
Downloading packages:
(1/9): php74-php-7.4.33-15.el7.remi.x86_64.rpm                                          | 1.7 MB  00:00:00
(2/9): php74-php-common-7.4.33-15.el7.remi.x86_64.rpm                                   | 702 kB  00:00:00
(3/9): php74-php-cli-7.4.33-15.el7.remi.x86_64.rpm                                      | 3.5 MB  00:00:00
(4/9): php74-php-json-7.4.33-15.el7.remi.x86_64.rpm                                     |  80 kB  00:00:00
(5/9): php74-php-sodium-7.4.33-15.el7.remi.x86_64.rpm                                   |  85 kB  00:00:00
(6/9): php74-runtime-7.4-3.el7.remi.x86_64.rpm                                          | 1.1 MB  00:00:00
(7/9): scl-utils-20130529-19.el7.x86_64.rpm                                             |  24 kB  00:00:00
(8/9): tcl-8.5.13-8.el7.x86_64.rpm                                                      | 1.9 MB  00:00:00
(9/9): environment-modules-3.2.10-10.el7.x86_64.rpm                                     | 107 kB  00:00:01
---------------------------------------------------------------------------------------------------------------
Total                                                                          6.1 MB/s | 9.2 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : scl-utils-20130529-19.el7.x86_64                                                            1/9
  Installing : 1:tcl-8.5.13-8.el7.x86_64                                                                   2/9
  Installing : environment-modules-3.2.10-10.el7.x86_64                                                    3/9
  Installing : php74-runtime-7.4-3.el7.remi.x86_64                                                         4/9
  Installing : php74-php-json-7.4.33-15.el7.remi.x86_64                                                    5/9
  Installing : php74-php-common-7.4.33-15.el7.remi.x86_64                                                  6/9
  Installing : php74-php-sodium-7.4.33-15.el7.remi.x86_64                                                  7/9
  Installing : php74-php-cli-7.4.33-15.el7.remi.x86_64                                                     8/9
  Installing : php74-php-7.4.33-15.el7.remi.x86_64                                                         9/9
=====================================================================

  WARNING : PHP 7.4 have reached its "End of Life" in
  November 2022. Even, if this package includes some of
  the important security fixes, backported from 8.1, the
  UPGRADE to a maintained version is very strongly RECOMMENDED.

=====================================================================
  Verifying  : php74-php-7.4.33-15.el7.remi.x86_64                                                         1/9
  Verifying  : 1:tcl-8.5.13-8.el7.x86_64                                                                   2/9
  Verifying  : scl-utils-20130529-19.el7.x86_64                                                            3/9
  Verifying  : php74-php-sodium-7.4.33-15.el7.remi.x86_64                                                  4/9
  Verifying  : environment-modules-3.2.10-10.el7.x86_64                                                    5/9
  Verifying  : php74-php-json-7.4.33-15.el7.remi.x86_64                                                    6/9
  Verifying  : php74-runtime-7.4-3.el7.remi.x86_64                                                         7/9
  Verifying  : php74-php-common-7.4.33-15.el7.remi.x86_64                                                  8/9
  Verifying  : php74-php-cli-7.4.33-15.el7.remi.x86_64                                                     9/9

Installed:
  php74-php.x86_64 0:7.4.33-15.el7.remi

Dependency Installed:
  environment-modules.x86_64 0:3.2.10-10.el7              php74-php-cli.x86_64 0:7.4.33-15.el7.remi
  php74-php-common.x86_64 0:7.4.33-15.el7.remi            php74-php-json.x86_64 0:7.4.33-15.el7.remi
  php74-php-sodium.x86_64 0:7.4.33-15.el7.remi            php74-runtime.x86_64 0:7.4-3.el7.remi
  scl-utils.x86_64 0:20130529-19.el7                      tcl.x86_64 1:8.5.13-8.el7

Complete!
[root@cloud-one ~]#

Check Versi PHP

[root@mysrv ~]# php -v
PHP 7.3.33 (cli) (built: Jun  5 2024 05:42:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
[root@mysrv ~]#
[root@mysrv ~]#

Restart Web Server

[root@mysrv ~]# systemctl restart httpd
[root@mysrv ~]#

Menambahkan file php info pada directory webserver

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/phpinfo.php
[root@mysrv ~]# echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/phpinfo.php
<?php phpinfo(); ?>
[root@mysrv ~]#

Membuka firewall os untuk service webserver

[root@mysrv ~]# firewall-cmd --add-service=http --permanent
success
[root@mysrv ~]# firewall-cmd --reload
success
[root@mysrv ~]#

Leave a Reply

Your email address will not be published. Required fields are marked *