User Tools

Site Tools


archive:centos_install_php

CentOS install Remi Php

Install Remi Php

First we need to enable the Remi php repo.

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Install yum-utils

Next we will install yum-utils which is a collection of usefull programs for managing repositories.

yum install yum-utils

Choosing a php version

Now we can utilize which version of php we want to install. You can choose between the following.

yum-config-manager --enable remi-php70   [Install PHP 7.0]
yum-config-manager --enable remi-php71   [Install PHP 7.1]
yum-config-manager --enable remi-php72   [Install PHP 7.2]
yum-config-manager --enable remi-php73   [Install PHP 7.3]

Install php and modules

yum install php php-cli

Remi will installs the following modules as default so no need to install these again. Btw you can allways check what's installed using "php -m"

bz2 calendar core ctype curl date exif fileinfo filter ftp gettext hash iconv json libxml openssl pcntl pcre phar readline reflection session sockets spl standard tokenizer zlib

The list below is an example and does not necessarily reflect your needs.

yum install php-dom php-gd php-imagick php-mbstring php-pdo_mysql php-posix php-simplexml php-soap php-xml php-zip

Check php version

php -v

Tweak php.ini

Adjust the php.ini located here /etc/php.ini if needed remember to restart apache after you made modifications.

archive/centos_install_php.txt · Last modified: 24/11/2023 12:39 by Allan