Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

You need to run yum in order to use PHP after setup your CentOS 7. Even though you have httpd, PHP may need to be installed manually.

First of all, you need to check if you have httpd on your CentOS 8 server as following:

Code Block
ls /usr/sbin/httpd

If it does not exist, you can install it simple as following:

Code Block
yum -y install httpd

If everything is okay, please run below commands to install PHP packages you need.

Code Block
yum -y update
sudo yum -y install epel-release yum-utils
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y update
sudo yum -y install php php-common php-devel php-bcmath php-gd php-pdo php-pear php-mysqlnd php-mbstring php-xml tidy php-tidy php-soap php-pecl-apcu php-pecl-ssh2 mcrypt php-mcrypt php-pecl-memcache php-intl php-zip redis ImageMagick-devel
sudo yum -y update


You may need to install php-pcel-ssh2 as following

Code Block
wget http://rpms.remirepo.net/enterprise/8/remi/x86_64/php73-php-pecl-ssh2-1.2-1.el8.remi.x86_64.rpm
rpm -i php73-php-pecl-ssh2-1.2-1.el8.remi.x86_64.rpm

You can find other version at https://pkgs.org/search/?q=php-pecl-ssh2


Code Block
wget http://rpms.remirepo.net/enterprise/8/remi/x86_64/php73-php-pecl-ssh2-1.2-1.el8.remi.x86_64.rpm
rpm -i php73-php-pecl-ssh2-1.2-1.el8.remi.x86_64.rpm

You can find other version at https://pkgs.org/search/?q=php-pecl-apcu


Actually I faced below errors while I install PHP packages

Code Block
No match for argument: php-tidy
No match for argument: php-pecl-ssh2
No match for argument: php-mcrypt
No match for argument: php-pecl-memcache