I know that to send e-mail from localhost on Windows, you need to change SMTP server in php.ini however this is valid only on Windows:
[mail function]
; For
There should be a stub in your php.ini file already, something like:
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i
Check that the command specified exists on your filesystem and you have (installed and) configured the MTA correctly.
If you've not already got an MTA set up, there are lots of MTAs available for Linux systems, I'd recommend sendmail (comples/difficult to configure but great performance and amazing flexibility) or postfix (easier to configure, good security out of the box).
Learn how to use the 'mail' cli client or run a different MUA on the server to seperate configuring the MTA from PHP integration.