Thursday, July 9, 2020

Install PHP 7.3 on CentOS 7 / Fedora

Pada kesempatan ini saya mau berbagi cara install php 7.3 di centos 7 /Fedora

Step 1: Add PHP 7.3 Remi repository

Tambahkan repository pada sistem centos agar dapat berjalan pada saat install php

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

Step 2: Disable repo for PHP 5.4



Kalian dapat melakukan disable dan enable dapa suistem repo

       #  sudo yum-config-manager --disable remi-php54
       #  sudo yum-config-manager --enable remi-php73

Step 3: Install PHP 7.3 on CentOS 7 / Fedora

      #  sudo yum -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json

Lakukan pengecekan pada sistem php yang telah di install

     #  php -v
         PHP 7.3.1 (cli) (built: Jan  8 2019 13:55:51) ( NTS )
         Copyright (c) 1997-2018 The PHP Group
         Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies

Step 4: Installing other PHP 7.3 Extensions

Install PHP 7.3 extensions
     #  sudo yum install php-<entension-name>
     #  sudo yum install php-mysql
     #  sudo yum install php-mysqlnd

Langkah terakhir pengecekan versi php yang telah di install

# rpm -qi php-mysqlnd
 Name        : php-mysqlnd
 Version     : 7.3.1
 Release     : 1.el7.remi
 Architecture: x86_64
 Install Date: Thu 10 Jan 2019 06:56:47 PM UTC
 Group       : Development/Languages
 Size        : 856852
 License     : PHP
 Signature   : DSA/SHA1, Tue 08 Jan 2019 06:44:21 PM UTC, Key ID 004e6f4700f97f56
 Source RPM  : php-7.3.1-1.el7.remi.src.rpm
 Build Date  : Tue 08 Jan 2019 06:24:34 PM UTC
 Build Host  : builder.remirepo.net
 Relocations : (not relocatable)
 Packager    : https://blog.remirepo.net/
 Vendor      : Remi Collet
 URL         : http://www.php.net/
 Bug URL     : https://forum.remirepo.net/
 Summary     : A module for PHP applications that use MySQL databases
 Description :
 The php-mysqlnd package contains a dynamic shared object that will add
 MySQL database support to PHP. MySQL is an object-relational database
 management system. PHP is an HTML-embeddable scripting language. If
 you need MySQL support for PHP applications, you will need to install
 this package and the php package.
 This package use the MySQL Native Driver