Install PHP SOAP on CentOS / RHEL

SOAP ( Simple Object Access Protocol) is a message protocol that allows distributed elements of an application to communicate.

Table of Contents

  1. Install Latest EPEL Repository
  2. Install SoapClient
  3. Restart Web Server
  4. Check SOAP is Installed

Step 1 : Install Latest EPEL Repository

If your server doesn’t have EPEL repo, then install this first:

# RHEL/CentOS 6:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

# RHEL/CentOS 7:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# RHEL/CentOS 8:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Step 2 : Install SoapClient

Run this command to install SoapClient:

sudo yum install php-soap

Step 3 : Restart Webserver

We have successfully installed php-soap on our server. Now we have to restart the web server:

# Apache:
sudo systemctl restart httpd

# Nginx:
sudo systemctl restart nginx

Step 4 : Check SOAP is Installed

Run this command to confirm that SOAP is installed or not:

php -m | grep -i soap

Response:

soap

That’s all. Thanks for reading.


Software Engineer | Ethical Hacker & Cybersecurity...

Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.