Now for the most complicated aspect of the whole exercise in my view - setting up MailWatch. Before commencing, if you're creating this within a VM I highly advise you take a snapshot of your system before starting. If you're doing this on physical hardware create an image of your current state using backup imaging software like Clonezilla. Let's begin.
First we need to install PHP, MySQL and Apache. Open up Putty and type the following:
yum install mysql mysql-server
Next set MySQL to start automatically when the OS is rebooted:
chkconfig --levels 235 mysqld on service mysqld start
Next, set passwords for the MySQL root account:
Follow the prompts for setting the root password for MySQL.
Now we'll install Apache:
yum install httpd
Now edit the /etc/httpd/conf/httpd.conf file:
Change mx.Matrix7.com.au to reflect the FQDN of your server.
Now configure your system to start Apache at when the OS is rebooted:
chkconfig --levels 235 httpd on service httpd start
Now direct your browser to http://192.168.0.100, and you should see the Apache Default Test Page:
Finally, we'll install PHP:
yum install php
For PHP to become available to Apache we need to restart the Apache service:
service httpd restart
Now to test our install of PHP we need to create a file called info.php in the following location:
Within the info.php file paste the following:
Save and close the info.php file. Now direct your browser to http://192.168.0.100/info.php and if PHP is configured correctly you should see the following page: