aws, amazon linux 2,

How to Install PHP Soap on Amazon Linux 2

Mar 09, 2023 · 1 min read · Post a comment

Soap as an independent platform allows you to send and receive messages on the app level. It’s a kind of communication protocol that works on the application level and can be enabled as a module in PHP. Let’s see how to install PHP Soap on Amazon Linux 2.

Prerequisites

  • Amazon Linux 2
  • sudo privileges
  • PHP installed

Install PHP Soap on Amazon Linux 2

Step 1. Enable the desired PHP version.

sudo amazon-linux-extras enable php{version}

For example:

sudo amazon-linux-extras enable php7.4

Step 2. Install php-soap.

sudo yum clean metadata
sudo yum install php php-soap

Step 3. Restart your web server service.

sudo systemctl restart nginx
sudo systemctl restart php-fpm

Step 4. Create the phpinfo file.

echo "<?php phpinfo(); ?>" > /var/www/html/info.php

Step 5. Verify the installation.

http://server_ip/info.php

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.