Depending on which operation system you're using, you should check for a instruction on how to installl LAMP.
For Ubuntu you can use this guide
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu.
This will install and web server, which supports PHP and MySQL. If the linux machine is at your home, and you want to make it accessable from outside, you should think of setting up a firewall and open the ports at your router (instructions can get found online).
Friendly Regards
- SkycityVictorians