Installing PHP/MYSQL with Apache on CentOS

Hayek's Linux Manual


This guide will walk you through installing PHP/MYSQL for your Apache server on a CentOS virtual machine.


  • You can do this in one step
     # yum install mysql mysql-server php
  • If Apache is running restart it
     # service httpd restart
  • To test
     # echo "" > /var/www/html/index.php
  • Navigate to localhost in your browser. You should see something like this:


QR Code
QR Code installing_php_mysql_for_apache_on_centos_hayek.0 (generated for current page)