How to install php-pear mail on CentOS or RHEL

PEAR – PHP Extension and Application Repository, PEAR is a framework and distribution system for reusable PHP components. The mail() function is using for sending emails from a php script. This is the most simplest way to send emails from a server and also its not secure process. Here, CryBit going to explain the steps to install php-pear on a CentOS or RHEL based server.

The mail sending scripts will shows some errors or warning while sending emails due to the absence of mail function [mail()].


Step 1 : Check PhPear is already installed or not

rpm -qa|grep php-pear

If it is not installed on the server, please install it by executing the following command from the server CLI (Command Line Interface).

yum install php-pear

Test whether it’s installed correctly

rpm -qa|grep php-pear

Step 2 : Install Php-mail extension by executing the following command;

pear install Mail

Step 3 : Restart web-server

service httpd restart

That’s it!
Let me know if you have any questions.

Arunlal Ashok

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

You may also like...

7 Responses

  1. Mark says:

    Thanks, Arun!

  2. Frank says:

    Its works! Thanks you.

  3. Halfnoodle says:

    It works beautiful, thank you very much.

  1. December 30, 2013

    […] links: How to install Git on a cpanel server (CentOS) How to install php-pear mail on CentOS or RHEL How to install IonCube loader on server iftop installation on Unix/Linux […]

Leave a Reply

Your email address will not be published. Required fields are marked *